Documentation ¶
Index ¶
- Constants
- Variables
- type ACLsController
- func (ac *ACLsController) CreateRule(user, resource, rights string, zone ...string) (int, error)
- func (ac *ACLsController) CreateRuleContext(ctx context.Context, user, resource, rights string, zone ...string) (int, error)
- func (ac *ACLsController) DeleteRule(aclID int) error
- func (ac *ACLsController) DeleteRuleContext(ctx context.Context, aclID int) error
- func (ac *ACLsController) Info() (*acl.Pool, error)
- func (ac *ACLsController) InfoContext(ctx context.Context) (*acl.Pool, error)
- type BackupJobController
- func (bjc *BackupJobController) Backup() error
- func (bjc *BackupJobController) BackupContext(ctx context.Context) error
- func (bjc *BackupJobController) Cancel() error
- func (bjc *BackupJobController) CancelContext(ctx context.Context) error
- func (bjc *BackupJobController) Chmod(perm shared.Permissions) error
- func (bjc *BackupJobController) ChmodContext(ctx context.Context, perm shared.Permissions) error
- func (bjc *BackupJobController) Chown(uid, gid int) error
- func (bjc *BackupJobController) ChownContext(ctx context.Context, uid, gid int) error
- func (bjc *BackupJobController) Delete() error
- func (bjc *BackupJobController) DeleteContext(ctx context.Context) error
- func (bjc *BackupJobController) Info() (*backupjob.BackupJob, error)
- func (bjc *BackupJobController) InfoContext(ctx context.Context) (*backupjob.BackupJob, error)
- func (bjc *BackupJobController) Lock(level shared.LockLevel) error
- func (bjc *BackupJobController) LockContext(ctx context.Context, level shared.LockLevel) error
- func (bjc *BackupJobController) Priority(prio int) error
- func (bjc *BackupJobController) PriorityContext(ctx context.Context, prio int) error
- func (bjc *BackupJobController) Rename(newName string) error
- func (bjc *BackupJobController) RenameContext(ctx context.Context, newName string) error
- func (bjc *BackupJobController) Retry() error
- func (bjc *BackupJobController) RetryContext(ctx context.Context) error
- func (bjc *BackupJobController) SchedAdd(description string) (int, error)
- func (bjc *BackupJobController) SchedAddContext(ctx context.Context, description string) (int, error)
- func (bjc *BackupJobController) SchedDelete(saID int) error
- func (bjc *BackupJobController) SchedDeleteContext(ctx context.Context, saID int) error
- func (bjc *BackupJobController) SchedUpdate(saID int, description string) (int, error)
- func (bjc *BackupJobController) SchedUpdateContext(ctx context.Context, saID int, description string) (int, error)
- func (bjc *BackupJobController) Unlock() error
- func (bjc *BackupJobController) UnlockContext(ctx context.Context) error
- func (bjc *BackupJobController) Update(tpl string, uType parameters.UpdateType) error
- func (bjc *BackupJobController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
- type BackupJobsController
- func (c *BackupJobsController) ByName(name string, args ...int) (int, error)
- func (c *BackupJobsController) ByNameContext(ctx context.Context, name string, args ...int) (int, error)
- func (bjc *BackupJobsController) Create(template string) (int, error)
- func (bjc *BackupJobsController) CreateContext(ctx context.Context, template string) (int, error)
- func (bjc *BackupJobsController) Info(args ...int) (*backupjob.Pool, error)
- func (bjc *BackupJobsController) InfoContext(ctx context.Context, args ...int) (*backupjob.Pool, error)
- type Client
- type ClusterController
- func (cc *ClusterController) AddDatastore(dsID int) error
- func (cc *ClusterController) AddDatastoreContext(ctx context.Context, dsID int) error
- func (cc *ClusterController) AddHost(hostID int) error
- func (cc *ClusterController) AddHostContext(ctx context.Context, hostID int) error
- func (cc *ClusterController) AddVnet(vnetID int) error
- func (cc *ClusterController) AddVnetContext(ctx context.Context, vnetID int) error
- func (cc *ClusterController) DelDatastore(dsID int) error
- func (cc *ClusterController) DelDatastoreContext(ctx context.Context, dsID int) error
- func (cc *ClusterController) DelHost(hostID int) error
- func (cc *ClusterController) DelHostContext(ctx context.Context, hostID int) error
- func (cc *ClusterController) DelVnet(vnetID int) error
- func (cc *ClusterController) DelVnetContext(ctx context.Context, vnetID int) error
- func (cc *ClusterController) Delete() error
- func (cc *ClusterController) DeleteContext(ctx context.Context) error
- func (cc *ClusterController) Info() (*cluster.Cluster, error)
- func (cc *ClusterController) InfoContext(ctx context.Context) (*cluster.Cluster, error)
- func (cc *ClusterController) Rename(newName string) error
- func (cc *ClusterController) RenameContext(ctx context.Context, newName string) error
- func (cc *ClusterController) Update(tpl string, uType parameters.UpdateType) error
- func (cc *ClusterController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
- type ClustersController
- func (c *ClustersController) ByName(name string) (int, error)
- func (c *ClustersController) ByNameContext(ctx context.Context, name string) (int, error)
- func (cc *ClustersController) Create(name string) (int, error)
- func (cc *ClustersController) CreateContext(ctx context.Context, name string) (int, error)
- func (cc *ClustersController) Info(decrypt bool) (*cluster.Pool, error)
- func (cc *ClustersController) InfoContext(ctx context.Context, decrypt bool) (*cluster.Pool, error)
- type Controller
- func (c *Controller) ACLs() *ACLsController
- func (c *Controller) BackupJob(id int) *BackupJobController
- func (c *Controller) BackupJobs() *BackupJobsController
- func (c *Controller) ByName(name string) (int, error)
- func (c *Controller) ByNameContext(ctx context.Context, name string) (int, error)
- func (c *Controller) Cluster(id int) *ClusterController
- func (c *Controller) Clusters() *ClustersController
- func (c *Controller) Datastore(id int) *DatastoreController
- func (c *Controller) Datastores() *DatastoresController
- func (c *Controller) Document(id int) *DocumentController
- func (c *Controller) Documents(dType int) *DocumentsController
- func (c *Controller) Group(id int) *GroupController
- func (c *Controller) Groups() *GroupsController
- func (c *Controller) Hook(id int) *HookController
- func (c *Controller) HookLog() *HookLogController
- func (c *Controller) Hooks() *HooksController
- func (c *Controller) Host(id int) *HostController
- func (c *Controller) Hosts() *HostsController
- func (c *Controller) Image(id int) *ImageController
- func (c *Controller) Images() *ImagesController
- func (c *Controller) MarketPlace(id int) *MarketPlaceController
- func (c *Controller) MarketPlaceApp(id int) *MarketPlaceAppController
- func (c *Controller) MarketPlaceApps() *MarketPlaceAppsController
- func (c *Controller) MarketPlaces() *MarketPlacesController
- func (c *Controller) STemplate(id int) *STemplateController
- func (c *Controller) STemplates() *STemplatesController
- func (c *Controller) SecurityGroup(id int) *SecurityGroupController
- func (c *Controller) SecurityGroups() *SecurityGroupsController
- func (c *Controller) Service(id int) *ServiceController
- func (c *Controller) Services() *ServicesController
- func (c *Controller) SystemConfig() (string, error)
- func (c *Controller) SystemConfigContext(ctx context.Context) (string, error)
- func (c *Controller) SystemVersion() (string, error)
- func (c *Controller) SystemVersionContext(ctx context.Context) (string, error)
- func (c *Controller) Template(id int) *TemplateController
- func (c *Controller) Templates() *TemplatesController
- func (c *Controller) User(id int) *UserController
- func (c *Controller) UserByName(name string) *UserByNameController
- func (c *Controller) Users() *UsersController
- func (c *Controller) VDC(id int) *VDCController
- func (c *Controller) VDCs() *VDCsController
- func (c *Controller) VM(id int) *VMController
- func (c *Controller) VMGroup(id int) *VMGroupController
- func (c *Controller) VMGroups() *VMGroupsController
- func (c *Controller) VMs() *VMsController
- func (c *Controller) VNTemplate(id int) *VNTemplateController
- func (c *Controller) VNTemplates() *VNTemplatesController
- func (c *Controller) VirtualNetwork(id int) *VirtualNetworkController
- func (c *Controller) VirtualNetworks() *VirtualNetworksController
- func (c *Controller) VirtualRouter(id int) *VirtualRouterController
- func (c *Controller) VirtualRouterByName(name string, args ...int) (int, error)
- func (c *Controller) VirtualRouterByNameContext(ctx context.Context, name string, args ...int) (int, error)
- func (c *Controller) VirtualRouters() *VirtualRoutersController
- func (c *Controller) Zone(id int) *ZoneController
- func (c *Controller) Zones() *ZonesController
- type DatastoreController
- func (dc *DatastoreController) Chmod(perm *shared.Permissions) error
- func (dc *DatastoreController) ChmodContext(ctx context.Context, perm *shared.Permissions) error
- func (dc *DatastoreController) Chown(userID, groupID int) error
- func (dc *DatastoreController) ChownContext(ctx context.Context, userID, groupID int) error
- func (dc *DatastoreController) Delete() error
- func (dc *DatastoreController) DeleteContext(ctx context.Context) error
- func (dc *DatastoreController) Enable(enable bool) error
- func (dc *DatastoreController) EnableContext(ctx context.Context, enable bool) error
- func (dc *DatastoreController) Info(decrypt bool) (*datastore.Datastore, error)
- func (dc *DatastoreController) InfoContext(ctx context.Context, decrypt bool) (*datastore.Datastore, error)
- func (dc *DatastoreController) Rename(newName string) error
- func (dc *DatastoreController) RenameContext(ctx context.Context, newName string) error
- func (dc *DatastoreController) Update(tpl string, uType parameters.UpdateType) error
- func (dc *DatastoreController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
- type DatastoresController
- func (dc *DatastoresController) Create(tpl string, clusterID int) (int, error)
- func (dc *DatastoresController) CreateContext(ctx context.Context, tpl string, clusterID int) (int, error)
- func (dc *DatastoresController) Info() (*datastore.Pool, error)
- func (dc *DatastoresController) InfoContext(ctx context.Context) (*datastore.Pool, error)
- type DocumentController
- func (dc *DocumentController) Chmod(perm shared.Permissions) error
- func (dc *DocumentController) ChmodContext(ctx context.Context, perm shared.Permissions) error
- func (dc *DocumentController) Chown(userID, groupID int) error
- func (dc *DocumentController) ChownContext(ctx context.Context, userID, groupID int) error
- func (dc *DocumentController) Clone(newName string) error
- func (dc *DocumentController) CloneContext(ctx context.Context, newName string) error
- func (dc *DocumentController) Delete() error
- func (dc *DocumentController) DeleteContext(ctx context.Context) error
- func (dc *DocumentController) Info(decrypt bool) (*document.Document, error)
- func (dc *DocumentController) InfoContext(ctx context.Context, decrypt bool) (*document.Document, error)
- func (dc *DocumentController) Lock(level shared.LockLevel) error
- func (dc *DocumentController) LockContext(ctx context.Context, level shared.LockLevel) error
- func (dc *DocumentController) Rename(newName string) error
- func (dc *DocumentController) RenameContext(ctx context.Context, newName string) error
- func (dc *DocumentController) Unlock() error
- func (dc *DocumentController) UnlockContext(ctx context.Context) error
- func (dc *DocumentController) Update(tpl string, uType parameters.UpdateType) error
- func (dc *DocumentController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
- type DocumentsController
- func (dc *DocumentsController) ByName(name string, args ...int) (int, error)
- func (dc *DocumentsController) ByNameContext(ctx context.Context, name string, args ...int) (int, error)
- func (dc *DocumentsController) Create(tpl string) (int, error)
- func (dc *DocumentsController) CreateContext(ctx context.Context, tpl string) (int, error)
- func (dc *DocumentsController) Info(args ...int) (*document.Pool, error)
- func (dc *DocumentsController) InfoContext(ctx context.Context, args ...int) (*document.Pool, error)
- type GroupController
- func (gc *GroupController) AddAdmin(userID int) error
- func (gc *GroupController) AddAdminContext(ctx context.Context, userID int) error
- func (gc *GroupController) DelAdmin(userID int) error
- func (gc *GroupController) DelAdminContext(ctx context.Context, userID int) error
- func (gc *GroupController) Delete() error
- func (gc *GroupController) DeleteContext(ctx context.Context) error
- func (gc *GroupController) Info(decrypt bool) (*group.Group, error)
- func (gc *GroupController) InfoContext(ctx context.Context, decrypt bool) (*group.Group, error)
- func (gc *GroupController) Quota(tpl string) error
- func (gc *GroupController) QuotaContext(ctx context.Context, tpl string) error
- func (gc *GroupController) Update(tpl string, uType parameters.UpdateType) error
- func (gc *GroupController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
- type GroupsController
- func (c *GroupsController) ByName(name string) (int, error)
- func (c *GroupsController) ByNameContext(ctx context.Context, name string) (int, error)
- func (gc *GroupsController) Create(name string) (int, error)
- func (gc *GroupsController) CreateContext(ctx context.Context, name string) (int, error)
- func (gc *GroupsController) Info() (*group.Pool, error)
- func (gc *GroupsController) InfoContext(ctx context.Context) (*group.Pool, error)
- type HTTPAuth
- type HTTPCaller
- type HookController
- func (hc *HookController) Delete() error
- func (hc *HookController) DeleteContext(ctx context.Context) error
- func (hc *HookController) Info(decrypt bool) (*hook.Hook, error)
- func (hc *HookController) InfoContext(ctx context.Context, decrypt bool) (*hook.Hook, error)
- func (hc *HookController) Lock(level shared.LockLevel) error
- func (hc *HookController) LockContext(ctx context.Context, level shared.LockLevel) error
- func (hc *HookController) Rename(newName string) error
- func (hc *HookController) RenameContext(ctx context.Context, newName string) error
- func (hc *HookController) Retry(exec_id int) error
- func (hc *HookController) RetryContext(ctx context.Context, exec_id int) error
- func (hc *HookController) Unlock() error
- func (hc *HookController) UnlockContext(ctx context.Context) error
- func (hc *HookController) Update(tpl string, uType parameters.UpdateType) error
- func (hc *HookController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
- type HookLogController
- type HooksController
- func (c *HooksController) ByName(name string) (int, error)
- func (c *HooksController) ByNameContext(ctx context.Context, name string) (int, error)
- func (hc *HooksController) Create(template string) (int, error)
- func (hc *HooksController) CreateContext(ctx context.Context, template string) (int, error)
- func (hc *HooksController) Info(args ...int) (*hook.Pool, error)
- func (hc *HooksController) InfoContext(ctx context.Context, args ...int) (*hook.Pool, error)
- type HostController
- func (hc *HostController) Delete() error
- func (hc *HostController) DeleteContext(ctx context.Context) error
- func (hc *HostController) Info(decrypt bool) (*host.Host, error)
- func (hc *HostController) InfoContext(ctx context.Context, decrypt bool) (*host.Host, error)
- func (hc *HostController) Monitoring() (*host.Monitoring, error)
- func (hc *HostController) MonitoringContext(ctx context.Context) (*host.Monitoring, error)
- func (hc *HostController) Rename(newName string) error
- func (hc *HostController) RenameContext(ctx context.Context, newName string) error
- func (hc *HostController) Status(status int) error
- func (hc *HostController) StatusContext(ctx context.Context, status int) error
- func (hc *HostController) Update(tpl string, uType parameters.UpdateType) error
- func (hc *HostController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
- type HostsController
- func (c *HostsController) ByName(name string) (int, error)
- func (c *HostsController) ByNameContext(ctx context.Context, name string) (int, error)
- func (hc *HostsController) Create(name, im, vm string, clusterID int) (int, error)
- func (hc *HostsController) CreateContext(ctx context.Context, name, im, vm string, clusterID int) (int, error)
- func (hc *HostsController) Info() (*host.Pool, error)
- func (hc *HostsController) InfoContext(ctx context.Context) (*host.Pool, error)
- func (hc *HostsController) Monitoring(num int) (*host.PoolMonitoring, error)
- func (hc *HostsController) MonitoringContext(ctx context.Context, num int) (*host.PoolMonitoring, error)
- type ImageController
- func (ic *ImageController) Chmod(perm shared.Permissions) error
- func (ic *ImageController) ChmodContext(ctx context.Context, perm shared.Permissions) error
- func (ic *ImageController) Chown(uid, gid int) error
- func (ic *ImageController) ChownContext(ctx context.Context, uid, gid int) error
- func (ic *ImageController) Chtype(newType string) error
- func (ic *ImageController) ChtypeContext(ctx context.Context, newType string) error
- func (ic *ImageController) Clone(cloneName string, dsid int) (int, error)
- func (ic *ImageController) CloneContext(ctx context.Context, cloneName string, dsid int) (int, error)
- func (ic *ImageController) Delete() error
- func (ic *ImageController) DeleteContext(ctx context.Context) error
- func (ic *ImageController) Enable(enable bool) error
- func (ic *ImageController) EnableContext(ctx context.Context, enable bool) error
- func (ic *ImageController) Info(decrypt bool) (*image.Image, error)
- func (ic *ImageController) InfoContext(ctx context.Context, decrypt bool) (*image.Image, error)
- func (ic *ImageController) Lock(level shared.LockLevel) error
- func (ic *ImageController) LockContext(ctx context.Context, level shared.LockLevel) error
- func (ic *ImageController) Persistent(persistent bool) error
- func (ic *ImageController) PersistentContext(ctx context.Context, persistent bool) error
- func (ic *ImageController) Rename(newName string) error
- func (ic *ImageController) RenameContext(ctx context.Context, newName string) error
- func (ic *ImageController) Snapshot(id int) *ImageSnapshotController
- func (ic *ImageController) Unlock() error
- func (ic *ImageController) UnlockContext(ctx context.Context) error
- func (ic *ImageController) Update(tpl string, uType parameters.UpdateType) error
- func (ic *ImageController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
- type ImageSnapshotController
- func (ic *ImageSnapshotController) Delete() error
- func (ic *ImageSnapshotController) DeleteContext(ctx context.Context) error
- func (ic *ImageSnapshotController) Flatten() error
- func (ic *ImageSnapshotController) FlattenContext(ctx context.Context) error
- func (ic *ImageSnapshotController) Revert() error
- func (ic *ImageSnapshotController) RevertContext(ctx context.Context) error
- type ImagesController
- func (c *ImagesController) ByName(name string, args ...int) (int, error)
- func (c *ImagesController) ByNameContext(ctx context.Context, name string, args ...int) (int, error)
- func (ic *ImagesController) Create(template string, dsid uint) (int, error)
- func (ic *ImagesController) CreateContext(ctx context.Context, template string, dsid uint) (int, error)
- func (ic *ImagesController) Info(args ...int) (*image.Pool, error)
- func (ic *ImagesController) InfoContext(ctx context.Context, args ...int) (*image.Pool, error)
- type MarketPlaceAppController
- func (mc *MarketPlaceAppController) Chmod(perm shared.Permissions) error
- func (mc *MarketPlaceAppController) ChmodContext(ctx context.Context, perm shared.Permissions) error
- func (mc *MarketPlaceAppController) Chown(userID, groupID int) error
- func (mc *MarketPlaceAppController) ChownContext(ctx context.Context, userID, groupID int) error
- func (mc *MarketPlaceAppController) Delete() error
- func (mc *MarketPlaceAppController) DeleteContext(ctx context.Context) error
- func (mc *MarketPlaceAppController) Enable(enable bool) error
- func (mc *MarketPlaceAppController) EnableContext(ctx context.Context, enable bool) error
- func (mc *MarketPlaceAppController) Info(decrypt bool) (*marketplaceapp.MarketPlaceApp, error)
- func (mc *MarketPlaceAppController) InfoContext(ctx context.Context, decrypt bool) (*marketplaceapp.MarketPlaceApp, error)
- func (mc *MarketPlaceAppController) Lock(level shared.LockLevel) error
- func (mc *MarketPlaceAppController) LockContext(ctx context.Context, level shared.LockLevel) error
- func (mc *MarketPlaceAppController) Rename(newName string) error
- func (mc *MarketPlaceAppController) RenameContext(ctx context.Context, newName string) error
- func (mc *MarketPlaceAppController) Unlock() error
- func (mc *MarketPlaceAppController) UnlockContext(ctx context.Context) error
- func (mc *MarketPlaceAppController) Update(tpl string, uType parameters.UpdateType) error
- func (mc *MarketPlaceAppController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
- type MarketPlaceAppsController
- func (c *MarketPlaceAppsController) ByName(name string, args ...int) (int, error)
- func (c *MarketPlaceAppsController) ByNameContext(ctx context.Context, name string, args ...int) (int, error)
- func (mc *MarketPlaceAppsController) Create(tpl string, market int) (int, error)
- func (mc *MarketPlaceAppsController) CreateContext(ctx context.Context, tpl string, market int) (int, error)
- func (mc *MarketPlaceAppsController) Info(args ...int) (*marketplaceapp.Pool, error)
- func (mc *MarketPlaceAppsController) InfoContext(ctx context.Context, args ...int) (*marketplaceapp.Pool, error)
- type MarketPlaceController
- func (mc *MarketPlaceController) Chmod(perm shared.Permissions) error
- func (mc *MarketPlaceController) ChmodContext(ctx context.Context, perm shared.Permissions) error
- func (mc *MarketPlaceController) Chown(userID, groupID int) error
- func (mc *MarketPlaceController) ChownContext(ctx context.Context, userID, groupID int) error
- func (mc *MarketPlaceController) Delete() error
- func (mc *MarketPlaceController) DeleteContext(ctx context.Context) error
- func (mc *MarketPlaceController) Enable(enable bool) error
- func (mc *MarketPlaceController) EnableContext(ctx context.Context, enable bool) error
- func (mc *MarketPlaceController) Info(decrypt bool) (*marketplace.MarketPlace, error)
- func (mc *MarketPlaceController) InfoContext(ctx context.Context, decrypt bool) (*marketplace.MarketPlace, error)
- func (mc *MarketPlaceController) Rename(newName string) error
- func (mc *MarketPlaceController) RenameContext(ctx context.Context, newName string) error
- func (mc *MarketPlaceController) Update(tpl string, uType parameters.UpdateType) error
- func (mc *MarketPlaceController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
- type MarketPlacesController
- func (c *MarketPlacesController) ByName(name string) (int, error)
- func (c *MarketPlacesController) ByNameContext(ctx context.Context, name string) (int, error)
- func (mc *MarketPlacesController) Create(tpl string) (int, error)
- func (mc *MarketPlacesController) CreateContext(ctx context.Context, tpl string) (int, error)
- func (mc *MarketPlacesController) Info(args ...int) (*marketplace.Pool, error)
- func (mc *MarketPlacesController) InfoContext(ctx context.Context, args ...int) (*marketplace.Pool, error)
- type OneConfig
- type RESTClient
- type RPCCaller
- type Response
- type STemplateController
- func (tc *STemplateController) Chgrp(gid int) error
- func (tc *STemplateController) Chmod(perm shared.Permissions) error
- func (tc *STemplateController) Chown(uid, gid int) error
- func (tc *STemplateController) Clone(clone_name string, recursive bool) (*srv_tmpl.ServiceTemplate, error)
- func (tc *STemplateController) Delete() error
- func (tc *STemplateController) Info() (*srv_tmpl.ServiceTemplate, error)
- func (tc *STemplateController) Instantiate(extra_tmpl string) (*service.Service, error)
- func (tc *STemplateController) Rename(new_name string) error
- func (tc *STemplateController) Update(st *srv_tmpl.ServiceTemplate, append bool) error
- type STemplatesController
- type SecurityGroupController
- func (sc *SecurityGroupController) Chmod(perm shared.Permissions) error
- func (sc *SecurityGroupController) ChmodContext(ctx context.Context, perm shared.Permissions) error
- func (sc *SecurityGroupController) Chown(userID, groupID int) error
- func (sc *SecurityGroupController) ChownContext(ctx context.Context, userID, groupID int) error
- func (sc *SecurityGroupController) Clone(cloneName string) (int, error)
- func (sc *SecurityGroupController) CloneContext(ctx context.Context, cloneName string) (int, error)
- func (sc *SecurityGroupController) Commit(recovery bool) error
- func (sc *SecurityGroupController) CommitContext(ctx context.Context, recovery bool) error
- func (sc *SecurityGroupController) Delete() error
- func (sc *SecurityGroupController) DeleteContext(ctx context.Context) error
- func (sc *SecurityGroupController) Info(decrypt bool) (*securitygroup.SecurityGroup, error)
- func (sc *SecurityGroupController) InfoContext(ctx context.Context, decrypt bool) (*securitygroup.SecurityGroup, error)
- func (sc *SecurityGroupController) Rename(newName string) error
- func (sc *SecurityGroupController) RenameContext(ctx context.Context, newName string) error
- func (sc *SecurityGroupController) Update(tpl string, uType parameters.UpdateType) error
- func (sc *SecurityGroupController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
- type SecurityGroupsController
- func (c *SecurityGroupsController) ByName(name string, args ...int) (int, error)
- func (c *SecurityGroupsController) ByNameContext(ctx context.Context, name string, args ...int) (int, error)
- func (sc *SecurityGroupsController) Create(tpl string) (int, error)
- func (sc *SecurityGroupsController) CreateContext(ctx context.Context, tpl string) (int, error)
- func (sc *SecurityGroupsController) Info(args ...int) (*securitygroup.Pool, error)
- func (sc *SecurityGroupsController) InfoContext(ctx context.Context, args ...int) (*securitygroup.Pool, error)
- type ServiceController
- func (sc *ServiceController) Chgrp(gid int) error
- func (sc *ServiceController) Chmod(perm shared.Permissions) error
- func (sc *ServiceController) Chown(uid, gid int) error
- func (sc *ServiceController) Delete() error
- func (sc *ServiceController) Info() (*service.Service, error)
- func (sc *ServiceController) Recover(delete bool) error
- func (sc *ServiceController) Rename(new_name string) error
- func (sc *ServiceController) Scale(role string, cardinality int, force bool) error
- func (sc *ServiceController) VMAction(role, action string, params map[string]interface{}) error
- type ServicesController
- type TemplateController
- func (tc *TemplateController) Chmod(perm shared.Permissions) error
- func (tc *TemplateController) ChmodContext(ctx context.Context, perm shared.Permissions) error
- func (tc *TemplateController) Chown(uid, gid int) error
- func (tc *TemplateController) ChownContext(ctx context.Context, uid, gid int) error
- func (tc *TemplateController) Clone(name string, recursive bool) error
- func (tc *TemplateController) CloneContext(ctx context.Context, name string, recursive bool) error
- func (tc *TemplateController) Delete() error
- func (tc *TemplateController) DeleteContext(ctx context.Context) error
- func (tc *TemplateController) Info(extended, decrypt bool) (*template.Template, error)
- func (tc *TemplateController) InfoContext(ctx context.Context, extended, decrypt bool) (*template.Template, error)
- func (tc *TemplateController) Instantiate(name string, pending bool, extra string, clone bool) (int, error)
- func (tc *TemplateController) InstantiateContext(ctx context.Context, name string, pending bool, extra string, clone bool) (int, error)
- func (tc *TemplateController) Lock(level shared.LockLevel) error
- func (tc *TemplateController) LockContext(ctx context.Context, level shared.LockLevel) error
- func (tc *TemplateController) Rename(newName string) error
- func (tc *TemplateController) RenameContext(ctx context.Context, newName string) error
- func (tc *TemplateController) Unlock() error
- func (tc *TemplateController) UnlockContext(ctx context.Context) error
- func (tc *TemplateController) Update(tpl string, uType parameters.UpdateType) error
- func (tc *TemplateController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
- type TemplatesController
- func (c *TemplatesController) ByName(name string, args ...int) (int, error)
- func (c *TemplatesController) ByNameContext(ctx context.Context, name string, args ...int) (int, error)
- func (tc *TemplatesController) Create(template string) (int, error)
- func (tc *TemplatesController) CreateContext(ctx context.Context, template string) (int, error)
- func (tc *TemplatesController) Info(args ...int) (*template.Pool, error)
- func (tc *TemplatesController) InfoContext(ctx context.Context, args ...int) (*template.Pool, error)
- type UserByNameController
- type UserController
- func (uc *UserController) AddGroup(groupID int) error
- func (uc *UserController) AddGroupContext(ctx context.Context, groupID int) error
- func (uc *UserController) Chauth(authDriver, password string) error
- func (uc *UserController) ChauthContext(ctx context.Context, authDriver, password string) error
- func (uc *UserController) Chgrp(groupID int) error
- func (uc *UserController) ChgrpContext(ctx context.Context, groupID int) error
- func (uc *UserController) DelGroup(groupID int) error
- func (uc *UserController) DelGroupContext(ctx context.Context, groupID int) error
- func (uc *UserController) Delete() error
- func (uc *UserController) DeleteContext(ctx context.Context) error
- func (uc *UserController) Info(decrypt bool) (*user.User, error)
- func (uc *UserController) InfoContext(ctx context.Context, decrypt bool) (*user.User, error)
- func (uc *UserController) Login(token string, timeSeconds int, effectiveGID int) error
- func (uc *UserController) LoginContext(ctx context.Context, token string, timeSeconds int, effectiveGID int) error
- func (uc *UserController) Passwd(password string) error
- func (uc *UserController) PasswdContext(ctx context.Context, password string) error
- func (uc *UserController) Quota(tpl string) error
- func (uc *UserController) QuotaContext(ctx context.Context, tpl string) error
- func (uc *UserController) Update(tpl string, uType parameters.UpdateType) error
- func (uc *UserController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
- type UsersController
- func (c *UsersController) ByName(name string) (int, error)
- func (c *UsersController) ByNameContext(ctx context.Context, name string) (int, error)
- func (uc *UsersController) Create(name, password, authDriver string, groupIDs []int) (int, error)
- func (uc *UsersController) CreateContext(ctx context.Context, name, password, authDriver string, groupIDs []int) (int, error)
- func (uc *UsersController) Info() (*user.Pool, error)
- func (uc *UsersController) InfoContext(ctx context.Context) (*user.Pool, error)
- type VDCController
- func (vc *VDCController) AddCluster(zoneID, clusterID int) error
- func (vc *VDCController) AddClusterContext(ctx context.Context, zoneID, clusterID int) error
- func (vc *VDCController) AddDatastore(zoneID, dsID int) error
- func (vc *VDCController) AddDatastoreContext(ctx context.Context, zoneID, dsID int) error
- func (vc *VDCController) AddGroup(groupID int) error
- func (vc *VDCController) AddGroupContext(ctx context.Context, groupID int) error
- func (vc *VDCController) AddHost(zoneID, hostID int) error
- func (vc *VDCController) AddHostContext(ctx context.Context, zoneID, hostID int) error
- func (vc *VDCController) AddVnet(zoneID, vnetID int) error
- func (vc *VDCController) AddVnetContext(ctx context.Context, zoneID, vnetID int) error
- func (vc *VDCController) DelCluster(zoneID, clusterID int) error
- func (vc *VDCController) DelClusterContext(ctx context.Context, zoneID, clusterID int) error
- func (vc *VDCController) DelDatastore(zoneID, dsID int) error
- func (vc *VDCController) DelDatastoreContext(ctx context.Context, zoneID, dsID int) error
- func (vc *VDCController) DelGroup(groupID int) error
- func (vc *VDCController) DelGroupContext(ctx context.Context, groupID int) error
- func (vc *VDCController) DelHost(zoneID, hostID int) error
- func (vc *VDCController) DelHostContext(ctx context.Context, zoneID, hostID int) error
- func (vc *VDCController) DelVnet(zoneID, vnetID int) error
- func (vc *VDCController) DelVnetContext(ctx context.Context, zoneID, vnetID int) error
- func (vc *VDCController) Delete() error
- func (vc *VDCController) DeleteContext(ctx context.Context) error
- func (vc *VDCController) Info(decrypt bool) (*vdc.VDC, error)
- func (vc *VDCController) InfoContext(ctx context.Context, decrypt bool) (*vdc.VDC, error)
- func (vc *VDCController) Rename(newName string) error
- func (vc *VDCController) RenameContext(ctx context.Context, newName string) error
- func (vc *VDCController) Update(tpl string, uType parameters.UpdateType) error
- func (vc *VDCController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
- type VDCsController
- func (c *VDCsController) ByName(name string) (int, error)
- func (c *VDCsController) ByNameContext(ctx context.Context, name string) (int, error)
- func (vc *VDCsController) Create(tpl string, clusterID int) (int, error)
- func (vc *VDCsController) CreateContext(ctx context.Context, tpl string, clusterID int) (int, error)
- func (vc *VDCsController) Info() (*vdc.Pool, error)
- func (vc *VDCsController) InfoContext(ctx context.Context) (*vdc.Pool, error)
- type VMController
- func (vc *VMController) Action(action string) error
- func (vc *VMController) ActionContext(ctx context.Context, action string) error
- func (vc *VMController) AddSchedAction(action *vm.SchedAction) error
- func (vc *VMController) AddSchedActionContext(ctx context.Context, action *vm.SchedAction) error
- func (vc *VMController) AttachNIC(tpl string) error
- func (vc *VMController) AttachNICContext(ctx context.Context, tpl string) error
- func (vc *VMController) AttachPCI(pciTemplate string) error
- func (vc *VMController) AttachPCIContext(ctx context.Context, pciTemplate string) error
- func (vc *VMController) AttachSG(nicID int, sgID int) error
- func (vc *VMController) AttachSGContext(ctx context.Context, nicID int, sgID int) error
- func (vc *VMController) Backup(dsID int, reset bool) error
- func (vc *VMController) BackupCancel() error
- func (vc *VMController) BackupCancelContext(ctx context.Context) error
- func (vc *VMController) BackupContext(ctx context.Context, dsID int, reset bool) error
- func (vc *VMController) Chmod(perm shared.Permissions) error
- func (vc *VMController) ChmodContext(ctx context.Context, perm shared.Permissions) error
- func (vc *VMController) Chown(uid, gid int) error
- func (vc *VMController) ChownContext(ctx context.Context, uid, gid int) error
- func (vc *VMController) DeleteSchedAction(actionId int) error
- func (vc *VMController) DeleteSchedActionContext(ctx context.Context, actionId int) error
- func (vc *VMController) Deploy(hostID int, enforce bool, dsID int) error
- func (vc *VMController) DeployContext(ctx context.Context, hostID int, enforce bool, dsID int) error
- func (vc *VMController) DetachNIC(nicID int) error
- func (vc *VMController) DetachNICContext(ctx context.Context, nicID int) error
- func (vc *VMController) DetachPCI(pciID int) error
- func (vc *VMController) DetachPCIContext(ctx context.Context, pciID int) error
- func (vc *VMController) DetachSG(nicID int, sgID int) error
- func (vc *VMController) DetachSGContext(ctx context.Context, nicID int, sgID int) error
- func (vc *VMController) Disk(id int) *VMDiskController
- func (vc *VMController) DiskAttach(diskTemplate string) error
- func (vc *VMController) DiskAttachContext(ctx context.Context, diskTemplate string) error
- func (vc *VMController) Hold() error
- func (vc *VMController) HoldContext(ctx context.Context) error
- func (vc *VMController) Info(decrypt bool) (*vm.VM, error)
- func (vc *VMController) InfoContext(ctx context.Context, decrypt bool) (*vm.VM, error)
- func (vc *VMController) Lock(level shared.LockLevel) error
- func (vc *VMController) LockContext(ctx context.Context, level shared.LockLevel) error
- func (vc *VMController) Migrate(hostID int, live, enforce bool, dsID int, migrationType int) error
- func (vc *VMController) MigrateContext(ctx context.Context, hostID int, live, enforce bool, dsID int, ...) error
- func (vc *VMController) Monitoring() (*vm.Monitoring, error)
- func (vc *VMController) MonitoringContext(ctx context.Context) (*vm.Monitoring, error)
- func (vc *VMController) Poweroff() error
- func (vc *VMController) PoweroffContext(ctx context.Context) error
- func (vc *VMController) PoweroffHard() error
- func (vc *VMController) PoweroffHardContext(ctx context.Context) error
- func (vc *VMController) Reboot() error
- func (vc *VMController) RebootContext(ctx context.Context) error
- func (vc *VMController) RebootHard() error
- func (vc *VMController) RebootHardContext(ctx context.Context) error
- func (vc *VMController) Recover(op int) error
- func (vc *VMController) RecoverContext(ctx context.Context, op int) error
- func (vc *VMController) RecoverDelete() error
- func (vc *VMController) RecoverDeleteContext(ctx context.Context) error
- func (vc *VMController) RecoverDeleteRecreate() error
- func (vc *VMController) RecoverDeleteRecreateContext(ctx context.Context) error
- func (vc *VMController) RecoverFailure() error
- func (vc *VMController) RecoverFailureContext(ctx context.Context) error
- func (vc *VMController) RecoverRetry() error
- func (vc *VMController) RecoverRetryContext(ctx context.Context) error
- func (vc *VMController) RecoverSuccess() error
- func (vc *VMController) RecoverSuccessContext(ctx context.Context) error
- func (vc *VMController) Release() error
- func (vc *VMController) ReleaseContext(ctx context.Context) error
- func (vc *VMController) Rename(newName string) error
- func (vc *VMController) RenameContext(ctx context.Context, newName string) error
- func (vc *VMController) Resched() error
- func (vc *VMController) ReschedContext(ctx context.Context) error
- func (vc *VMController) Resize(template string, enforce bool) error
- func (vc *VMController) ResizeContext(ctx context.Context, template string, enforce bool) error
- func (vc *VMController) Resume() error
- func (vc *VMController) ResumeContext(ctx context.Context) error
- func (vc *VMController) SnapshotCreate(name string) error
- func (vc *VMController) SnapshotCreateContext(ctx context.Context, name string) error
- func (vc *VMController) SnapshotDelete(snapID int) error
- func (vc *VMController) SnapshotDeleteContext(ctx context.Context, snapID int) error
- func (vc *VMController) SnapshotRevert(snapID int) error
- func (vc *VMController) SnapshotRevertContext(ctx context.Context, snapID int) error
- func (vc *VMController) Stop() error
- func (vc *VMController) StopContext(ctx context.Context) error
- func (vc *VMController) Suspend() error
- func (vc *VMController) SuspendContext(ctx context.Context) error
- func (vc *VMController) Terminate() error
- func (vc *VMController) TerminateContext(ctx context.Context) error
- func (vc *VMController) TerminateHard() error
- func (vc *VMController) TerminateHardContext(ctx context.Context) error
- func (vc *VMController) Undeploy() error
- func (vc *VMController) UndeployContext(ctx context.Context) error
- func (vc *VMController) UndeployHard() error
- func (vc *VMController) UndeployHardContext(ctx context.Context) error
- func (vc *VMController) Unlock() error
- func (vc *VMController) UnlockContext(ctx context.Context) error
- func (vc *VMController) Unresched() error
- func (vc *VMController) UnreschedContext(ctx context.Context) error
- func (vc *VMController) Update(tpl string, uType parameters.UpdateType) error
- func (vc *VMController) UpdateConf(tpl string) error
- func (vc *VMController) UpdateConfContext(ctx context.Context, tpl string) error
- func (vc *VMController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
- func (vc *VMController) UpdateSchedAction(action *vm.SchedAction) error
- func (vc *VMController) UpdateSchedActionContext(ctx context.Context, action *vm.SchedAction) error
- type VMDiskController
- func (vc *VMDiskController) Detach() error
- func (vc *VMDiskController) DetachContext(ctx context.Context) error
- func (vc *VMDiskController) Resize(size string) error
- func (vc *VMDiskController) ResizeContext(ctx context.Context, size string) error
- func (vc *VMDiskController) Saveas(imageName, imageType string, snapID int) (int, error)
- func (vc *VMDiskController) SaveasContext(ctx context.Context, imageName, imageType string, snapID int) (int, error)
- func (vc *VMDiskController) SnapshotCreate(description string) (int, error)
- func (vc *VMDiskController) SnapshotCreateContext(ctx context.Context, description string) (int, error)
- func (vc *VMDiskController) SnapshotDelete(snapID int) error
- func (vc *VMDiskController) SnapshotDeleteContext(ctx context.Context, snapID int) error
- func (vc *VMDiskController) SnapshotRename(snapID int, newName string) error
- func (vc *VMDiskController) SnapshotRenameContext(ctx context.Context, snapID int, newName string) error
- func (vc *VMDiskController) SnapshotRevert(snapID int) error
- func (vc *VMDiskController) SnapshotRevertContext(ctx context.Context, snapID int) error
- type VMFilter
- type VMGroupController
- func (vc *VMGroupController) Chmod(perm shared.Permissions) error
- func (vc *VMGroupController) ChmodContext(ctx context.Context, perm shared.Permissions) error
- func (vc *VMGroupController) Chown(userID, groupID int) error
- func (vc *VMGroupController) ChownContext(ctx context.Context, userID, groupID int) error
- func (vc *VMGroupController) Delete() error
- func (vc *VMGroupController) DeleteContext(ctx context.Context) error
- func (vc *VMGroupController) Info(decrypt bool) (*vmgroup.VMGroup, error)
- func (vc *VMGroupController) InfoContext(ctx context.Context, decrypt bool) (*vmgroup.VMGroup, error)
- func (vc *VMGroupController) Lock(level shared.LockLevel) error
- func (vc *VMGroupController) LockContext(ctx context.Context, level shared.LockLevel) error
- func (vc *VMGroupController) Rename(newName string) error
- func (vc *VMGroupController) RenameContext(ctx context.Context, newName string) error
- func (vc *VMGroupController) RoleAdd(roleTemplate string) error
- func (vc *VMGroupController) RoleAddContext(ctx context.Context, roleTemplate string) error
- func (vc *VMGroupController) RoleDelete(roleID int) error
- func (vc *VMGroupController) RoleDeleteContext(ctx context.Context, roleID int) error
- func (vc *VMGroupController) RoleUpdate(roleID int, roleTemplate string) error
- func (vc *VMGroupController) RoleUpdateContext(ctx context.Context, roleID int, roleTemplate string) error
- func (vc *VMGroupController) Unlock() error
- func (vc *VMGroupController) UnlockContext(ctx context.Context) error
- func (vc *VMGroupController) Update(tpl string, uType int) error
- func (vc *VMGroupController) UpdateContext(ctx context.Context, tpl string, uType int) error
- type VMGroupsController
- func (c *VMGroupsController) ByName(name string, args ...int) (int, error)
- func (c *VMGroupsController) ByNameContext(ctx context.Context, name string, args ...int) (int, error)
- func (vc *VMGroupsController) Create(tpl string) (int, error)
- func (vc *VMGroupsController) CreateContext(ctx context.Context, tpl string) (int, error)
- func (vc *VMGroupsController) Info(args ...int) (*vmgroup.Pool, error)
- func (vc *VMGroupsController) InfoContext(ctx context.Context, args ...int) (*vmgroup.Pool, error)
- type VMsController
- func (vc *VMsController) Accounting(filter, startTime, endTime int) error
- func (vc *VMsController) AccountingContext(ctx context.Context, filter, startTime, endTime int) error
- func (c *VMsController) ByName(name string, args ...int) (int, error)
- func (c *VMsController) ByNameContext(ctx context.Context, name string, args ...int) (int, error)
- func (vc *VMsController) CalculateShowback(firstMonth, firstYear, lastMonth, lastYear int) error
- func (vc *VMsController) CalculateShowbackContext(ctx context.Context, firstMonth, firstYear, lastMonth, lastYear int) error
- func (vc *VMsController) Create(template string, pending bool) (int, error)
- func (vc *VMsController) CreateContext(ctx context.Context, template string, pending bool) (int, error)
- func (vc *VMsController) Info(args ...int) (*vm.Pool, error)
- func (vc *VMsController) InfoContext(ctx context.Context, args ...int) (*vm.Pool, error)
- func (vc *VMsController) InfoExtended(args ...int) (*vm.Pool, error)
- func (vc *VMsController) InfoExtendedContext(ctx context.Context, args ...int) (*vm.Pool, error)
- func (vc *VMsController) InfoExtendedFilter(f *VMFilter) (*vm.Pool, error)
- func (vc *VMsController) InfoExtendedFilterContext(ctx context.Context, f *VMFilter) (*vm.Pool, error)
- func (vc *VMsController) InfoFilter(f *VMFilter) (*vm.Pool, error)
- func (vc *VMsController) InfoFilterContext(ctx context.Context, f *VMFilter) (*vm.Pool, error)
- func (vc *VMsController) InfoSet(vmIds string, extended bool) (*vm.Pool, error)
- func (vc *VMsController) InfoSetContext(ctx context.Context, vmIds string, extended bool) (*vm.Pool, error)
- func (vc *VMsController) Monitoring(filter, num int) (*vm.PoolMonitoring, error)
- func (vc *VMsController) MonitoringContext(ctx context.Context, filter, num int) (*vm.PoolMonitoring, error)
- func (vc *VMsController) Showback(filter, firstMonth, firstYear, lastMonth, lastYear int) error
- func (vc *VMsController) ShowbackContext(ctx context.Context, filter, firstMonth, firstYear, lastMonth, lastYear int) error
- type VNTemplateController
- func (vc *VNTemplateController) Chmod(perm shared.Permissions) error
- func (vc *VNTemplateController) ChmodContext(ctx context.Context, perm shared.Permissions) error
- func (vc *VNTemplateController) Chown(uid, gid int) error
- func (vc *VNTemplateController) ChownContext(ctx context.Context, uid, gid int) error
- func (vc *VNTemplateController) Clone(name string) error
- func (vc *VNTemplateController) CloneContext(ctx context.Context, name string) error
- func (vc *VNTemplateController) Create(vntemplate string) (int, error)
- func (vc *VNTemplateController) CreateContext(ctx context.Context, vntemplate string) (int, error)
- func (vc *VNTemplateController) Delete() error
- func (vc *VNTemplateController) DeleteContext(ctx context.Context) error
- func (vc *VNTemplateController) Info(decrypt bool) (*vntemplate.VNTemplate, error)
- func (vc *VNTemplateController) InfoContext(ctx context.Context, decrypt bool) (*vntemplate.VNTemplate, error)
- func (vc *VNTemplateController) Instantiate(name string, extra string) (int, error)
- func (vc *VNTemplateController) InstantiateContext(ctx context.Context, name string, extra string) (int, error)
- func (vc *VNTemplateController) Lock(level shared.LockLevel) error
- func (vc *VNTemplateController) LockContext(ctx context.Context, level shared.LockLevel) error
- func (vc *VNTemplateController) Rename(newName string) error
- func (vc *VNTemplateController) RenameContext(ctx context.Context, newName string) error
- func (vc *VNTemplateController) Unlock() error
- func (vc *VNTemplateController) UnlockContext(ctx context.Context) error
- func (vc *VNTemplateController) Update(tpl string, uType parameters.UpdateType) error
- func (vc *VNTemplateController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
- type VNTemplatesController
- func (c *VNTemplatesController) ByName(name string) (int, error)
- func (c *VNTemplatesController) ByNameContext(ctx context.Context, name string) (int, error)
- func (vc *VNTemplatesController) Info(args ...int) (*vntemplate.Pool, error)
- func (vc *VNTemplatesController) InfoContext(ctx context.Context, args ...int) (*vntemplate.Pool, error)
- type VirtualNetworkController
- func (vc *VirtualNetworkController) AddAR(tpl string) error
- func (vc *VirtualNetworkController) AddARContext(ctx context.Context, tpl string) error
- func (vc *VirtualNetworkController) Chmod(perm shared.Permissions) error
- func (vc *VirtualNetworkController) ChmodContext(ctx context.Context, perm shared.Permissions) error
- func (vc *VirtualNetworkController) Chown(userID, groupID int) error
- func (vc *VirtualNetworkController) ChownContext(ctx context.Context, userID, groupID int) error
- func (vc *VirtualNetworkController) Delete() error
- func (vc *VirtualNetworkController) DeleteContext(ctx context.Context) error
- func (vc *VirtualNetworkController) FreeAR(arID int) error
- func (vc *VirtualNetworkController) FreeARContext(ctx context.Context, arID int) error
- func (vc *VirtualNetworkController) Hold(tpl string) error
- func (vc *VirtualNetworkController) HoldContext(ctx context.Context, tpl string) error
- func (vc *VirtualNetworkController) Info(decrypt bool) (*vn.VirtualNetwork, error)
- func (vc *VirtualNetworkController) InfoContext(ctx context.Context, decrypt bool) (*vn.VirtualNetwork, error)
- func (vc *VirtualNetworkController) Lock(level shared.LockLevel) error
- func (vc *VirtualNetworkController) LockContext(ctx context.Context, level shared.LockLevel) error
- func (vc *VirtualNetworkController) Recover(op int) error
- func (vc *VirtualNetworkController) RecoverContext(ctx context.Context, op int) error
- func (vc *VirtualNetworkController) RecoverDelete() error
- func (vc *VirtualNetworkController) RecoverFailure() error
- func (vc *VirtualNetworkController) RecoverSuccess() error
- func (vc *VirtualNetworkController) Release(tpl string) error
- func (vc *VirtualNetworkController) ReleaseContext(ctx context.Context, tpl string) error
- func (vc *VirtualNetworkController) Rename(newName string) error
- func (vc *VirtualNetworkController) RenameContext(ctx context.Context, newName string) error
- func (vc *VirtualNetworkController) Reserve(tpl string) (int, error)
- func (vc *VirtualNetworkController) ReserveContext(ctx context.Context, tpl string) (int, error)
- func (vc *VirtualNetworkController) RmAR(arID int) error
- func (vc *VirtualNetworkController) RmARContext(ctx context.Context, arID int) error
- func (vc *VirtualNetworkController) Unlock() error
- func (vc *VirtualNetworkController) UnlockContext(ctx context.Context) error
- func (vc *VirtualNetworkController) Update(tpl string, uType parameters.UpdateType) error
- func (vc *VirtualNetworkController) UpdateAR(tpl string) error
- func (vc *VirtualNetworkController) UpdateARContext(ctx context.Context, tpl string) error
- func (vc *VirtualNetworkController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
- type VirtualNetworksController
- func (c *VirtualNetworksController) ByName(name string, args ...int) (int, error)
- func (c *VirtualNetworksController) ByNameContext(ctx context.Context, name string, args ...int) (int, error)
- func (vc *VirtualNetworksController) Create(tpl string, clusterID int) (int, error)
- func (vc *VirtualNetworksController) CreateContext(ctx context.Context, tpl string, clusterID int) (int, error)
- func (vc *VirtualNetworksController) Info(args ...int) (*vn.Pool, error)
- func (vc *VirtualNetworksController) InfoContext(ctx context.Context, args ...int) (*vn.Pool, error)
- type VirtualRouterController
- func (vc *VirtualRouterController) AttachNic(tpl string) error
- func (vc *VirtualRouterController) AttachNicContext(ctx context.Context, tpl string) error
- func (vc *VirtualRouterController) Chmod(perm shared.Permissions) error
- func (vc *VirtualRouterController) ChmodContext(ctx context.Context, perm shared.Permissions) error
- func (vc *VirtualRouterController) Chown(uid, gid int) error
- func (vc *VirtualRouterController) ChownContext(ctx context.Context, uid, gid int) error
- func (vc *VirtualRouterController) Delete() error
- func (vc *VirtualRouterController) DeleteContext(ctx context.Context) error
- func (vc *VirtualRouterController) DetachNic(nicid int) error
- func (vc *VirtualRouterController) DetachNicContext(ctx context.Context, nicid int) error
- func (vc *VirtualRouterController) Info(decrypt bool) (*vr.VirtualRouter, error)
- func (vc *VirtualRouterController) InfoContext(ctx context.Context, decrypt bool) (*vr.VirtualRouter, error)
- func (vc *VirtualRouterController) Instantiate(number, tplid int, name string, hold bool, extra string) (int, error)
- func (vc *VirtualRouterController) InstantiateContext(ctx context.Context, number, tplid int, name string, hold bool, extra string) (int, error)
- func (vc *VirtualRouterController) Lock(level shared.LockLevel) error
- func (vc *VirtualRouterController) LockContext(ctx context.Context, level shared.LockLevel) error
- func (vc *VirtualRouterController) Rename(newName string) error
- func (vc *VirtualRouterController) RenameContext(ctx context.Context, newName string) error
- func (vc *VirtualRouterController) Unlock() error
- func (vc *VirtualRouterController) UnlockContext(ctx context.Context) error
- func (vc *VirtualRouterController) Update(tpl string, uType parameters.UpdateType) error
- func (vc *VirtualRouterController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
- type VirtualRoutersController
- func (vc *VirtualRoutersController) Create(tpl string) (int, error)
- func (vc *VirtualRoutersController) CreateContext(ctx context.Context, tpl string) (int, error)
- func (vc *VirtualRoutersController) Info(args ...int) (*vr.Pool, error)
- func (vc *VirtualRoutersController) InfoContext(ctx context.Context, args ...int) (*vr.Pool, error)
- type ZoneController
- func (zc *ZoneController) Delete() error
- func (zc *ZoneController) DeleteContext(ctx context.Context) error
- func (zc *ZoneController) Info(decrypt bool) (*zone.Zone, error)
- func (zc *ZoneController) InfoContext(ctx context.Context, decrypt bool) (*zone.Zone, error)
- func (zc *ZoneController) Rename(newName string) error
- func (zc *ZoneController) RenameContext(ctx context.Context, newName string) error
- func (zc *ZoneController) Update(tpl string, uType parameters.UpdateType) error
- func (zc *ZoneController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
- type ZonesController
- func (c *ZonesController) ByName(name string) (int, error)
- func (c *ZonesController) ByNameContext(ctx context.Context, name string) (int, error)
- func (zc *ZonesController) Create(tpl string, clusterID int) (int, error)
- func (zc *ZonesController) CreateContext(ctx context.Context, tpl string, clusterID int) (int, error)
- func (zc *ZonesController) Info() (*zone.Pool, error)
- func (zc *ZonesController) InfoContext(ctx context.Context) (*zone.Pool, error)
- func (zc *ZonesController) ServerRaftStatus() (*zone.ServerRaftStatus, error)
- func (zc *ZonesController) ServerRaftStatusContext(ctx context.Context) (*zone.ServerRaftStatus, error)
Constants ¶
const Version = "0.1.0"
Version is the main version number that is being run at the moment.
Variables ¶
var GitCommit string
GitCommit is the git commit that was compiled. This will be filled in by the compiler.
var VersionPrerelease = ""
VersionPrerelease is the pre-release marker for the version. If this is "" (empty string) then it means that it is a final release. Otherwise, this is a pre-release such as "dev" (in development)
Functions ¶
This section is empty.
Types ¶
type ACLsController ¶
type ACLsController entitiesController
ACLsController is a controller for a pool of ACL
func (*ACLsController) CreateRule ¶
func (ac *ACLsController) CreateRule(user, resource, rights string, zone ...string) (int, error)
CreateRule adds a new ACL rule. * user: User component of the new rule. A string containing a hex number. * resource: Resource component of the new rule. A string containing a hex number. * rights: Rights component of the new rule. A string containing a hex number. * zone: Optional zone component of the new rule. A string containing a hex number.
func (*ACLsController) CreateRuleContext ¶
func (ac *ACLsController) CreateRuleContext(ctx context.Context, user, resource, rights string, zone ...string) (int, error)
CreateRuleContext adds a new ACL rule. * ctx: context for cancelation * user: User component of the new rule. A string containing a hex number. * resource: Resource component of the new rule. A string containing a hex number. * rights: Rights component of the new rule. A string containing a hex number. * zone: Optional zone component of the new rule. A string containing a hex number.
func (*ACLsController) DeleteRule ¶
func (ac *ACLsController) DeleteRule(aclID int) error
DeleteRule deletes an ACL rule.
func (*ACLsController) DeleteRuleContext ¶
func (ac *ACLsController) DeleteRuleContext(ctx context.Context, aclID int) error
DeleteRuleContext deletes an ACL rule.
func (*ACLsController) Info ¶
func (ac *ACLsController) Info() (*acl.Pool, error)
Info returns an acl pool. A connection to OpenNebula is performed.
func (*ACLsController) InfoContext ¶
InfoContext returns an acl pool. A connection to OpenNebula is performed.
type BackupJobController ¶
type BackupJobController entityController
BackupJobController is a controller for Backup Job entities
func (*BackupJobController) Backup ¶
func (bjc *BackupJobController) Backup() error
Backup runs the Backup Job
func (*BackupJobController) BackupContext ¶
func (bjc *BackupJobController) BackupContext(ctx context.Context) error
BackupContext runs the Backup Job
func (*BackupJobController) Cancel ¶
func (bjc *BackupJobController) Cancel() error
Cancel ongoing Backup Job execution
func (*BackupJobController) CancelContext ¶
func (bjc *BackupJobController) CancelContext(ctx context.Context) error
CancelContext ongoing Backup Job execution
func (*BackupJobController) Chmod ¶
func (bjc *BackupJobController) Chmod(perm shared.Permissions) error
Chmod changes the permissions of the Backup Job. If any perm is -1 it will not change
func (*BackupJobController) ChmodContext ¶
func (bjc *BackupJobController) ChmodContext(ctx context.Context, perm shared.Permissions) error
ChmodContext changes the permissions of the Backup Job. If any perm is -1 it will not change
func (*BackupJobController) Chown ¶
func (bjc *BackupJobController) Chown(uid, gid int) error
Chown changes the owner/group of the Backup Job. If uid or gid is -1 it will not change
func (*BackupJobController) ChownContext ¶
func (bjc *BackupJobController) ChownContext(ctx context.Context, uid, gid int) error
ChownContext changes the owner/group of the Backup Job. If uid or gid is -1 it will not change
func (*BackupJobController) Delete ¶
func (bjc *BackupJobController) Delete() error
Delete will remove the Backup Job from OpenNebula, which will remove it from the backend.
func (*BackupJobController) DeleteContext ¶
func (bjc *BackupJobController) DeleteContext(ctx context.Context) error
DeleteContext will remove the Backup Job from OpenNebula, which will remove it from the backend.
func (*BackupJobController) Info ¶
func (bjc *BackupJobController) Info() (*backupjob.BackupJob, error)
Info connects to OpenNebula and fetches the information of the Backup Job
func (*BackupJobController) InfoContext ¶
InfoContext connects to OpenNebula and fetches the information of the Backup Job
func (*BackupJobController) Lock ¶
func (bjc *BackupJobController) Lock(level shared.LockLevel) error
Lock locks the Backup Job following lock level. See levels in locks.go.
func (*BackupJobController) LockContext ¶
LockContext locks the Backup Job following lock level. See levels in locks.go.
func (*BackupJobController) Priority ¶
func (bjc *BackupJobController) Priority(prio int) error
Priority set priority for Backup Job, only admin can set priority over 50
func (*BackupJobController) PriorityContext ¶
func (bjc *BackupJobController) PriorityContext(ctx context.Context, prio int) error
PriorityContext set priority for Backup Job, only admin can set priority over 50
func (*BackupJobController) Rename ¶
func (bjc *BackupJobController) Rename(newName string) error
Rename changes the name of the image
func (*BackupJobController) RenameContext ¶
func (bjc *BackupJobController) RenameContext(ctx context.Context, newName string) error
RenameContext changes the name of the image
func (*BackupJobController) Retry ¶
func (bjc *BackupJobController) Retry() error
Retry backup for failed Virtual Machine
func (*BackupJobController) RetryContext ¶
func (bjc *BackupJobController) RetryContext(ctx context.Context) error
RetryContext backup for failed Virtual Machine
func (*BackupJobController) SchedAdd ¶
func (bjc *BackupJobController) SchedAdd(description string) (int, error)
SchedAdd creates a new Scheduled Action for the Backup Job
func (*BackupJobController) SchedAddContext ¶
func (bjc *BackupJobController) SchedAddContext(ctx context.Context, description string) (int, error)
SchedAddContext creates a new Scheduled Action for the Backup Job
func (*BackupJobController) SchedDelete ¶
func (bjc *BackupJobController) SchedDelete(saID int) error
SchedDelete deletes a Scheduled Action
func (*BackupJobController) SchedDeleteContext ¶
func (bjc *BackupJobController) SchedDeleteContext(ctx context.Context, saID int) error
SchedDeleteContext deletes a Scheduled Action
func (*BackupJobController) SchedUpdate ¶
func (bjc *BackupJobController) SchedUpdate(saID int, description string) (int, error)
SchedUpdate updates a Scheduled Action for the Backup Job
func (*BackupJobController) SchedUpdateContext ¶
func (bjc *BackupJobController) SchedUpdateContext(ctx context.Context, saID int, description string) (int, error)
SchedUpdateContext updates a Scheduled Action for the Backup Job
func (*BackupJobController) Unlock ¶
func (bjc *BackupJobController) Unlock() error
Unlock unlocks the BackupJob.
func (*BackupJobController) UnlockContext ¶
func (bjc *BackupJobController) UnlockContext(ctx context.Context) error
UnlockContext unlocks the BackupJob.
func (*BackupJobController) Update ¶
func (bjc *BackupJobController) Update(tpl string, uType parameters.UpdateType) error
Update adds Backup Job content. * tpl: The new Backup Job content. Syntax can be the usual attribute=value or XML.
func (*BackupJobController) UpdateContext ¶
func (bjc *BackupJobController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
UpdateContext adds Backup Job content. * tpl: The new Backup Job content. Syntax can be the usual attribute=value or XML.
type BackupJobsController ¶
type BackupJobsController entitiesController
BackupJobsController is a controller for Backup Jobs
func (*BackupJobsController) ByName ¶
func (c *BackupJobsController) ByName(name string, args ...int) (int, error)
ByName returns an Backup Job ID from name
func (*BackupJobsController) ByNameContext ¶
func (c *BackupJobsController) ByNameContext(ctx context.Context, name string, args ...int) (int, error)
ByNameContext returns an Backup Job ID from name
func (*BackupJobsController) Create ¶
func (bjc *BackupJobsController) Create(template string) (int, error)
Create allocates a new Backup Job based on the template string provided. It returns the Backup Job ID.
func (*BackupJobsController) CreateContext ¶
CreateContext allocates a new Backup Job based on the template string provided. It returns the Backup Job ID.
func (*BackupJobsController) Info ¶
func (bjc *BackupJobsController) Info(args ...int) (*backupjob.Pool, error)
Info returns a new Backup Job pool. It accepts the scope of the query.
func (*BackupJobsController) InfoContext ¶
func (bjc *BackupJobsController) InfoContext(ctx context.Context, args ...int) (*backupjob.Pool, error)
InfoContext returns a new Backup Job pool. It accepts the scope of the query.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a basic XML-RPC client implementing RPCCaller
func NewClient ¶
NewClient return a new one client that allows setting a custom http.Client. If the httpClient is nil, it will return a NewDefaultClient
func NewDefaultClient ¶
NewDefaultClient return a new basic one client
type ClusterController ¶
type ClusterController entityController
ClusterController is a controller for Cluster entity
func (*ClusterController) AddDatastore ¶
func (cc *ClusterController) AddDatastore(dsID int) error
AddDatastore adds a datastore to the given cluster. * dsID: The datastore ID.
func (*ClusterController) AddDatastoreContext ¶
func (cc *ClusterController) AddDatastoreContext(ctx context.Context, dsID int) error
AddDatastoreContext adds a datastore to the given cluster. * ctx: context for cancelation * dsID: The datastore ID.
func (*ClusterController) AddHost ¶
func (cc *ClusterController) AddHost(hostID int) error
AddHost adds a host to the given cluster. * hostID: The host ID.
func (*ClusterController) AddHostContext ¶
func (cc *ClusterController) AddHostContext(ctx context.Context, hostID int) error
AddHostContext adds a host to the given cluster. * ctx: context for cancelation * hostID: The host ID.
func (*ClusterController) AddVnet ¶
func (cc *ClusterController) AddVnet(vnetID int) error
AddVnet adds a vnet to the given cluster. * vnetID: The vnet ID.
func (*ClusterController) AddVnetContext ¶
func (cc *ClusterController) AddVnetContext(ctx context.Context, vnetID int) error
AddVnetContext adds a vnet to the given cluster. * ctx: context for cancelation * vnetID: The vnet ID.
func (*ClusterController) DelDatastore ¶
func (cc *ClusterController) DelDatastore(dsID int) error
DelDatastore removes a datastore from the given cluster. * dsID: The datastore ID.
func (*ClusterController) DelDatastoreContext ¶
func (cc *ClusterController) DelDatastoreContext(ctx context.Context, dsID int) error
DelDatastoreContext removes a datastore from the given cluster. * ctx: context for cancelation * dsID: The datastore ID.
func (*ClusterController) DelHost ¶
func (cc *ClusterController) DelHost(hostID int) error
DelHost removes a host from the given cluster. * hostID: The host ID.
func (*ClusterController) DelHostContext ¶
func (cc *ClusterController) DelHostContext(ctx context.Context, hostID int) error
DelHostContext removes a host from the given cluster. * ctx: context for cancelation * hostID: The host ID.
func (*ClusterController) DelVnet ¶
func (cc *ClusterController) DelVnet(vnetID int) error
DelVnet removes a vnet from the given cluster. * vnetID: The vnet ID.
func (*ClusterController) DelVnetContext ¶
func (cc *ClusterController) DelVnetContext(ctx context.Context, vnetID int) error
DelVnetContext removes a vnet from the given cluster. * ctx: context for cancelation * vnetID: The vnet ID.
func (*ClusterController) Delete ¶
func (cc *ClusterController) Delete() error
Delete deletes the given cluster from the pool.
func (*ClusterController) DeleteContext ¶
func (cc *ClusterController) DeleteContext(ctx context.Context) error
DeleteContext deletes the given cluster from the pool. * ctx: context for cancelation
func (*ClusterController) Info ¶
func (cc *ClusterController) Info() (*cluster.Cluster, error)
Info retrieves information for the cluster.
func (*ClusterController) InfoContext ¶
InfoContext retrieves information for the cluster.
func (*ClusterController) Rename ¶
func (cc *ClusterController) Rename(newName string) error
Rename renames a cluster. * newName: The new name.
func (*ClusterController) RenameContext ¶
func (cc *ClusterController) RenameContext(ctx context.Context, newName string) error
RenameContext renames a cluster. * ctx: context for cancelation * newName: The new name.
func (*ClusterController) Update ¶
func (cc *ClusterController) Update(tpl string, uType parameters.UpdateType) error
Update adds cluster content.
- tpl: The new cluster contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
func (*ClusterController) UpdateContext ¶
func (cc *ClusterController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
UpdateContext adds cluster content.
- ctx: context for cancelation
- tpl: The new cluster contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
type ClustersController ¶
type ClustersController entitiesController
ClustersController is a controller for Clusters
func (*ClustersController) ByName ¶
func (c *ClustersController) ByName(name string) (int, error)
ByName returns a Cluster ID from name
func (*ClustersController) ByNameContext ¶
ByNameContext returns a Cluster ID from name
func (*ClustersController) Create ¶
func (cc *ClustersController) Create(name string) (int, error)
Create allocates a new cluster. It returns the new cluster ID.
func (*ClustersController) CreateContext ¶
CreateContext allocates a new cluster. It returns the new cluster ID.
func (*ClustersController) Info ¶
func (cc *ClustersController) Info(decrypt bool) (*cluster.Pool, error)
Info returns a cluster pool. A connection to OpenNebula is performed.
func (*ClustersController) InfoContext ¶
InfoContext returns a cluster pool. A connection to OpenNebula is performed.
type Controller ¶
type Controller struct { Client RPCCaller ClientFlow HTTPCaller }
Controller is the controller used to make requets on various entities
func NewController ¶
func NewController(c RPCCaller) *Controller
NewController return a new one controller
func NewControllerFlow ¶
func NewControllerFlow(c HTTPCaller) *Controller
func NewGenericController ¶
func NewGenericController(cone RPCCaller, cflow HTTPCaller) *Controller
func (*Controller) ACLs ¶
func (c *Controller) ACLs() *ACLsController
ACLs returns a hosts controller.
func (*Controller) BackupJob ¶
func (c *Controller) BackupJob(id int) *BackupJobController
BackupJob returns an Backup Job controller
func (*Controller) BackupJobs ¶
func (c *Controller) BackupJobs() *BackupJobsController
BackupJobs returns an BackupJobs controller
func (*Controller) ByName ¶
func (c *Controller) ByName(name string) (int, error)
ByName returns a Datastore ID from name
func (*Controller) ByNameContext ¶
ByNameContext returns a Datastore ID from name
func (*Controller) Cluster ¶
func (c *Controller) Cluster(id int) *ClusterController
Cluster returns a Cluster controller.
func (*Controller) Clusters ¶
func (c *Controller) Clusters() *ClustersController
Clusters returns a Clusters controller.
func (*Controller) Datastore ¶
func (c *Controller) Datastore(id int) *DatastoreController
Datastore returns a Datastore controller
func (*Controller) Datastores ¶
func (c *Controller) Datastores() *DatastoresController
Datastores returns a Datastores controller
func (*Controller) Document ¶
func (c *Controller) Document(id int) *DocumentController
Document returns a Document controller
func (*Controller) Documents ¶
func (c *Controller) Documents(dType int) *DocumentsController
Documents returns a Documents controller
func (*Controller) Group ¶
func (c *Controller) Group(id int) *GroupController
Group returns a Group Controller
func (*Controller) Groups ¶
func (c *Controller) Groups() *GroupsController
Groups returns a Groups controller.
func (*Controller) Hook ¶
func (c *Controller) Hook(id int) *HookController
Hook return an hook controller with an ID.
func (*Controller) HookLog ¶
func (c *Controller) HookLog() *HookLogController
HookLog returns a Hook log.
func (*Controller) Hooks ¶
func (c *Controller) Hooks() *HooksController
Hooks returns a Hooks controller.
func (*Controller) Host ¶
func (c *Controller) Host(id int) *HostController
Host return an host controller with an ID.
func (*Controller) Hosts ¶
func (c *Controller) Hosts() *HostsController
Hosts returns a hosts controller.
func (*Controller) Image ¶
func (c *Controller) Image(id int) *ImageController
Image returns an Image controller
func (*Controller) Images ¶
func (c *Controller) Images() *ImagesController
Images returns an Images controller
func (*Controller) MarketPlace ¶
func (c *Controller) MarketPlace(id int) *MarketPlaceController
MarketPlace return MarketPlace controller
func (*Controller) MarketPlaceApp ¶
func (c *Controller) MarketPlaceApp(id int) *MarketPlaceAppController
MarketPlaceApp returns a MarketPlaceApp controller
func (*Controller) MarketPlaceApps ¶
func (c *Controller) MarketPlaceApps() *MarketPlaceAppsController
MarketPlaceApps returns a MarketPlaceApps controller
func (*Controller) MarketPlaces ¶
func (c *Controller) MarketPlaces() *MarketPlacesController
MarketPlaces returns a MarketPlaces controller
func (*Controller) STemplate ¶
func (c *Controller) STemplate(id int) *STemplateController
STemplate Controller constructor
func (*Controller) STemplates ¶
func (c *Controller) STemplates() *STemplatesController
STemplates Controller constructor
func (*Controller) SecurityGroup ¶
func (c *Controller) SecurityGroup(id int) *SecurityGroupController
SecurityGroup returns a SecurityGroup controller
func (*Controller) SecurityGroups ¶
func (c *Controller) SecurityGroups() *SecurityGroupsController
SecurityGroups returns a SecurityGroups controller.
func (*Controller) Service ¶
func (c *Controller) Service(id int) *ServiceController
Service Controller constructor
func (*Controller) Services ¶
func (c *Controller) Services() *ServicesController
Services Controller constructor
func (*Controller) SystemConfig ¶
func (c *Controller) SystemConfig() (string, error)
SystemConfig returns the current OpenNebula config
func (*Controller) SystemConfigContext ¶
func (c *Controller) SystemConfigContext(ctx context.Context) (string, error)
SystemConfigContext returns the current OpenNebula config
func (*Controller) SystemVersion ¶
func (c *Controller) SystemVersion() (string, error)
SystemVersion returns the current OpenNebula Version
func (*Controller) SystemVersionContext ¶
func (c *Controller) SystemVersionContext(ctx context.Context) (string, error)
SystemVersionContext returns the current OpenNebula Version
func (*Controller) Template ¶
func (c *Controller) Template(id int) *TemplateController
Template returns a Template controller
func (*Controller) Templates ¶
func (c *Controller) Templates() *TemplatesController
Templates returns a Templates controller.
func (*Controller) User ¶
func (c *Controller) User(id int) *UserController
User returns a User controller.
func (*Controller) UserByName ¶
func (c *Controller) UserByName(name string) *UserByNameController
UserByName returns a UserByName controller.
func (*Controller) Users ¶
func (c *Controller) Users() *UsersController
Users returns a Users controller.
func (*Controller) VDC ¶
func (c *Controller) VDC(id int) *VDCController
Vdc returns a Vdc controller
func (*Controller) VDCs ¶
func (c *Controller) VDCs() *VDCsController
VDCs returns a VDCs controller.
func (*Controller) VM ¶
func (c *Controller) VM(id int) *VMController
VM returns a new vm controller.
func (*Controller) VMGroup ¶
func (c *Controller) VMGroup(id int) *VMGroupController
VMGroup returns a VMGroup controller
func (*Controller) VMGroups ¶
func (c *Controller) VMGroups() *VMGroupsController
VMGroups returns a VMGroups controller
func (*Controller) VMs ¶
func (c *Controller) VMs() *VMsController
VMs returns a new vm pool controller.
func (*Controller) VNTemplate ¶
func (c *Controller) VNTemplate(id int) *VNTemplateController
VNTemplate return an VNTemplate controller.
func (*Controller) VNTemplates ¶
func (c *Controller) VNTemplates() *VNTemplatesController
VNTemplates returns a VNTemplates controller.
func (*Controller) VirtualNetwork ¶
func (c *Controller) VirtualNetwork(id int) *VirtualNetworkController
VirtualNetwork returns a VirtualNetwork controller
func (*Controller) VirtualNetworks ¶
func (c *Controller) VirtualNetworks() *VirtualNetworksController
VirtualNetworks returns a VirtualNetworks controller
func (*Controller) VirtualRouter ¶
func (c *Controller) VirtualRouter(id int) *VirtualRouterController
VirtualRouter returns a VirtualRouter controller.
func (*Controller) VirtualRouterByName ¶
func (c *Controller) VirtualRouterByName(name string, args ...int) (int, error)
VirtualRouterByName returns a VirtualRouter By name
func (*Controller) VirtualRouterByNameContext ¶
func (c *Controller) VirtualRouterByNameContext(ctx context.Context, name string, args ...int) (int, error)
VirtualRouterByNameContext returns a VirtualRouter By name
func (*Controller) VirtualRouters ¶
func (c *Controller) VirtualRouters() *VirtualRoutersController
VirtualRouters returns a VirtualRouters controller.
func (*Controller) Zone ¶
func (c *Controller) Zone(id int) *ZoneController
Zone returns a Zone controller
func (*Controller) Zones ¶
func (c *Controller) Zones() *ZonesController
Zones returns a Zones controller.
type DatastoreController ¶
type DatastoreController entityController
DatastoreController is a controller for Datastore entity
func (*DatastoreController) Chmod ¶
func (dc *DatastoreController) Chmod(perm *shared.Permissions) error
Chmod changes the permission bits of a datastore.
func (*DatastoreController) ChmodContext ¶
func (dc *DatastoreController) ChmodContext(ctx context.Context, perm *shared.Permissions) error
ChmodContext changes the permission bits of a datastore.
func (*DatastoreController) Chown ¶
func (dc *DatastoreController) Chown(userID, groupID int) error
Chown changes the ownership of a datastore. * userID: The User ID of the new owner. If set to -1, it will not change. * groupID: The Group ID of the new group. If set to -1, it will not change.
func (*DatastoreController) ChownContext ¶
func (dc *DatastoreController) ChownContext(ctx context.Context, userID, groupID int) error
ChownContext changes the ownership of a datastore. * ctx: context for cancelation * userID: The User ID of the new owner. If set to -1, it will not change. * groupID: The Group ID of the new group. If set to -1, it will not change.
func (*DatastoreController) Delete ¶
func (dc *DatastoreController) Delete() error
Delete deletes the given datastore from the pool.
func (*DatastoreController) DeleteContext ¶
func (dc *DatastoreController) DeleteContext(ctx context.Context) error
DeleteContext deletes the given datastore from the pool.
func (*DatastoreController) Enable ¶
func (dc *DatastoreController) Enable(enable bool) error
Enable enables or disables a datastore. * enable: True for enabling
func (*DatastoreController) EnableContext ¶
func (dc *DatastoreController) EnableContext(ctx context.Context, enable bool) error
Enable enables or disables a datastore. * ctx: context for cancelation * enable: True for enabling
func (*DatastoreController) Info ¶
func (dc *DatastoreController) Info(decrypt bool) (*datastore.Datastore, error)
Info retrieves information for the datastore.
func (*DatastoreController) InfoContext ¶
func (dc *DatastoreController) InfoContext(ctx context.Context, decrypt bool) (*datastore.Datastore, error)
InfoContext retrieves information for the datastore.
func (*DatastoreController) Rename ¶
func (dc *DatastoreController) Rename(newName string) error
Rename renames a datastore. * newName: The new name.
func (*DatastoreController) RenameContext ¶
func (dc *DatastoreController) RenameContext(ctx context.Context, newName string) error
RenameContext renames a datastore. * ctx: context for cancelation * newName: The new name.
func (*DatastoreController) Update ¶
func (dc *DatastoreController) Update(tpl string, uType parameters.UpdateType) error
Update replaces the datastore contents.
- tpl: The new datastore contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
func (*DatastoreController) UpdateContext ¶
func (dc *DatastoreController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
UpdateContext replaces the datastore contents.
- ctx: context for cancelation
- tpl: The new datastore contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
type DatastoresController ¶
type DatastoresController entitiesController
DatastoresController is a controller for Datastore entities
func (*DatastoresController) Create ¶
func (dc *DatastoresController) Create(tpl string, clusterID int) (int, error)
Create allocates a new datastore. It returns the new datastore ID. * tpl: template of the datastore * clusterID: The cluster ID. If it is -1, the default one will be used.
func (*DatastoresController) CreateContext ¶
func (dc *DatastoresController) CreateContext(ctx context.Context, tpl string, clusterID int) (int, error)
CreateContext allocates a new datastore. It returns the new datastore ID. * ctx: context for cancelation * tpl: template of the datastore * clusterID: The cluster ID. If it is -1, the default one will be used.
func (*DatastoresController) Info ¶
func (dc *DatastoresController) Info() (*datastore.Pool, error)
Info returns a datastore pool. A connection to OpenNebula is performed.
func (*DatastoresController) InfoContext ¶
InfoContext returns a datastore pool. A connection to OpenNebula is performed.
type DocumentController ¶
type DocumentController entityController
DocumentController is a controller for document entity
func (*DocumentController) Chmod ¶
func (dc *DocumentController) Chmod(perm shared.Permissions) error
Chmod changes the permission bits of a document.
func (*DocumentController) ChmodContext ¶
func (dc *DocumentController) ChmodContext(ctx context.Context, perm shared.Permissions) error
ChmodContext changes the permission bits of a document.
func (*DocumentController) Chown ¶
func (dc *DocumentController) Chown(userID, groupID int) error
Chown changes the ownership of a document. * userID: The User ID of the new owner. If set to -1, it will not change. * groupID: The Group ID of the new group. If set to -1, it will not change.
func (*DocumentController) ChownContext ¶
func (dc *DocumentController) ChownContext(ctx context.Context, userID, groupID int) error
ChownContext changes the ownership of a document. * ctx: context for cancelation * userID: The User ID of the new owner. If set to -1, it will not change. * groupID: The Group ID of the new group. If set to -1, it will not change.
func (*DocumentController) Clone ¶
func (dc *DocumentController) Clone(newName string) error
Clone clones an existing document. * newName: Name for the new document.
func (*DocumentController) CloneContext ¶
func (dc *DocumentController) CloneContext(ctx context.Context, newName string) error
CloneContext clones an existing document. * ctx: context for cancelation * newName: Name for the new document.
func (*DocumentController) Delete ¶
func (dc *DocumentController) Delete() error
Delete deletes the given document from the pool.
func (*DocumentController) DeleteContext ¶
func (dc *DocumentController) DeleteContext(ctx context.Context) error
DeleteContext deletes the given document from the pool.
func (*DocumentController) Info ¶
func (dc *DocumentController) Info(decrypt bool) (*document.Document, error)
Info retrieves information for the document.
func (*DocumentController) InfoContext ¶
func (dc *DocumentController) InfoContext(ctx context.Context, decrypt bool) (*document.Document, error)
InfoContext retrieves information for the document.
func (*DocumentController) Lock ¶
func (dc *DocumentController) Lock(level shared.LockLevel) error
Lock locks the document following lock level. See levels in locks.go.
func (*DocumentController) LockContext ¶
LockContext locks the document following lock level. See levels in locks.go.
func (*DocumentController) Rename ¶
func (dc *DocumentController) Rename(newName string) error
Rename renames a document. * newName: The new name.
func (*DocumentController) RenameContext ¶
func (dc *DocumentController) RenameContext(ctx context.Context, newName string) error
RenameContext renames a document. * ctx: context for cancelation * newName: The new name.
func (*DocumentController) Unlock ¶
func (dc *DocumentController) Unlock() error
Unlock unlocks the document.
func (*DocumentController) UnlockContext ¶
func (dc *DocumentController) UnlockContext(ctx context.Context) error
func (*DocumentController) Update ¶
func (dc *DocumentController) Update(tpl string, uType parameters.UpdateType) error
Update adds document content.
- tpl: The new document contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
func (*DocumentController) UpdateContext ¶
func (dc *DocumentController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
UpdateContext adds document content.
- ctx: context for cancelation
- tpl: The new document contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
type DocumentsController ¶
type DocumentsController struct {
// contains filtered or unexported fields
}
DocumentsController is a controller for documents entities
func (*DocumentsController) ByName ¶
func (dc *DocumentsController) ByName(name string, args ...int) (int, error)
ByName returns a Document ID from name
func (*DocumentsController) ByNameContext ¶
func (dc *DocumentsController) ByNameContext(ctx context.Context, name string, args ...int) (int, error)
ByNameContext returns a Document ID from name
func (*DocumentsController) Create ¶
func (dc *DocumentsController) Create(tpl string) (int, error)
Create allocates a new document. It returns the new document ID.
func (*DocumentsController) CreateContext ¶
CreateContext allocates a new document. It returns the new document ID.
func (*DocumentsController) Info ¶
func (dc *DocumentsController) Info(args ...int) (*document.Pool, error)
Info returns a document pool. A connection to OpenNebula is performed.
func (*DocumentsController) InfoContext ¶
func (dc *DocumentsController) InfoContext(ctx context.Context, args ...int) (*document.Pool, error)
InfoContext returns a document pool. A connection to OpenNebula is performed.
type GroupController ¶
type GroupController entityController
GroupController is a controller for Group entity
func (*GroupController) AddAdmin ¶
func (gc *GroupController) AddAdmin(userID int) error
AddAdmin adds a User to the Group administrators set * userID: The user ID.
func (*GroupController) AddAdminContext ¶
func (gc *GroupController) AddAdminContext(ctx context.Context, userID int) error
AddAdmin adds a User to the Group administrators set * ctx: context for cancelation * userID: The user ID.
func (*GroupController) DelAdmin ¶
func (gc *GroupController) DelAdmin(userID int) error
DelAdmin removes a User from the Group administrators set * userID: The user ID.
func (*GroupController) DelAdminContext ¶
func (gc *GroupController) DelAdminContext(ctx context.Context, userID int) error
DelAdmin removes a User from the Group administrators set * ctx: context for cancelation * userID: The user ID.
func (*GroupController) Delete ¶
func (gc *GroupController) Delete() error
Delete deletes the given group from the pool.
func (*GroupController) DeleteContext ¶
func (gc *GroupController) DeleteContext(ctx context.Context) error
DeleteContext deletes the given group from the pool.
func (*GroupController) Info ¶
func (gc *GroupController) Info(decrypt bool) (*group.Group, error)
Info retrieves information for the group.
func (*GroupController) InfoContext ¶
InfoContext retrieves information for the group.
func (*GroupController) Quota ¶
func (gc *GroupController) Quota(tpl string) error
Quota sets the group quota limits. * tpl: The new quota template contents. Syntax can be the usual attribute=value or XML.
func (*GroupController) QuotaContext ¶
func (gc *GroupController) QuotaContext(ctx context.Context, tpl string) error
Quota sets the group quota limits. * ctx: context for cancelation * tpl: The new quota template contents. Syntax can be the usual attribute=value or XML.
func (*GroupController) Update ¶
func (gc *GroupController) Update(tpl string, uType parameters.UpdateType) error
Update adds group content.
- tpl: The new group contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
func (*GroupController) UpdateContext ¶
func (gc *GroupController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
Update adds group content.
- ctx: context for cancelation
- tpl: The new group contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
type GroupsController ¶
type GroupsController entitiesController
GroupsController is a controller for a Groups
func (*GroupsController) ByName ¶
func (c *GroupsController) ByName(name string) (int, error)
ByName returns a Group ID from name
func (*GroupsController) ByNameContext ¶
ByNameContext returns a Group ID from name
func (*GroupsController) Create ¶
func (gc *GroupsController) Create(name string) (int, error)
Create allocates a new group. It returns the new group ID.
func (*GroupsController) CreateContext ¶
CreateContext allocates a new group. It returns the new group ID.
func (*GroupsController) Info ¶
func (gc *GroupsController) Info() (*group.Pool, error)
Info returns a group pool. A connection to OpenNebula is performed.
func (*GroupsController) InfoContext ¶
InfoContext returns a group pool. A connection to OpenNebula is performed.
type HTTPAuth ¶
type HTTPAuth struct {
// contains filtered or unexported fields
}
HTTPAuth holds credentials for a server address
func NewFlowConfig ¶
NewFlowConfig considering environment variables and such
type HTTPCaller ¶
type HTTPCaller interface {
HTTPMethod(method string, url string, args ...interface{}) (*Response, error)
}
HTTPCaller is the analogous to RPCCaller but for http endpoints
type HookController ¶
type HookController entityController
HookController is a controller for hook entities
func (*HookController) Delete ¶
func (hc *HookController) Delete() error
Delete deletes the given hook from the pool
func (*HookController) DeleteContext ¶
func (hc *HookController) DeleteContext(ctx context.Context) error
DeleteContext deletes the given hook from the pool
func (*HookController) Info ¶
func (hc *HookController) Info(decrypt bool) (*hook.Hook, error)
Info retrieves information for the hook from ID
func (*HookController) InfoContext ¶
InfoContext retrieves information for the hook from ID
func (*HookController) Lock ¶
func (hc *HookController) Lock(level shared.LockLevel) error
Lock locks the hook following lock level. See levels in locks.go.
func (*HookController) LockContext ¶
LockContext locks the hook following lock level. See levels in locks.go.
func (*HookController) Rename ¶
func (hc *HookController) Rename(newName string) error
Rename renames a hook. * newName: The new name.
func (*HookController) RenameContext ¶
func (hc *HookController) RenameContext(ctx context.Context, newName string) error
RenameContext renames a hook. * ctx: context for cancelation * newName: The new name.
func (*HookController) Retry ¶
func (hc *HookController) Retry(exec_id int) error
Retry retry a hook execution
func (*HookController) RetryContext ¶
func (hc *HookController) RetryContext(ctx context.Context, exec_id int) error
RetryContext retry a hook execution
func (*HookController) UnlockContext ¶
func (hc *HookController) UnlockContext(ctx context.Context) error
UnlockContext unlocks the hook.
func (*HookController) Update ¶
func (hc *HookController) Update(tpl string, uType parameters.UpdateType) error
Update replaces the hook content.
- tpl: The new hook contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
func (*HookController) UpdateContext ¶
func (hc *HookController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
UpdateContext replaces the hook content.
- ctx: context for cancelation
- tpl: The new hook contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
type HookLogController ¶
type HookLogController entitiesController
HookLogController is a controller for retrieve hook execution log information
func (*HookLogController) Info ¶
func (hc *HookLogController) Info(minTs, maxTs, hookId, hook_rc int) (*hook.HookLog, error)
Info retrieves information for the hook from ID * minTs: Min timestamp to filter for. * maxTs: Max timestamp to filter for * hookId: Hook ID to filer for. * rc: return code of the hook execution to filer for. (-1 error, 0 all, 1 success)
func (*HookLogController) InfoContext ¶
func (hc *HookLogController) InfoContext(ctx context.Context, minTs, maxTs, hookId, hook_rc int) (*hook.HookLog, error)
InfoContext retrieves information for the hook from ID * ctx: context for cancelation * minTs: Min timestamp to filter for. * maxTs: Max timestamp to filter for * hookId: Hook ID to filer for. * rc: return code of the hook execution to filer for. (-1 error, 0 all, 1 success)
type HooksController ¶
type HooksController entitiesController
HooksController is a controller for create a hook or a pool of hooks
func (*HooksController) ByName ¶
func (c *HooksController) ByName(name string) (int, error)
ByName finds a Hook ID from name
func (*HooksController) ByNameContext ¶
ByNameContext finds a Hook ID from name
func (*HooksController) Create ¶
func (hc *HooksController) Create(template string) (int, error)
Create allocates a new hook. It returns the new hook ID. * name: name of the hook * template: hook template.
func (*HooksController) CreateContext ¶
Create allocates a new hook. It returns the new hook ID. * ctx: context for cancelation * name: name of the hook * template: hook template.
func (*HooksController) Info ¶
func (hc *HooksController) Info(args ...int) (*hook.Pool, error)
Info returns a hook pool. A connection to OpenNebula is performed
func (*HooksController) InfoContext ¶
InfoContext returns a hook pool. A connection to OpenNebula is performed
type HostController ¶
type HostController entityController
HostController is a controller for host entities
func (*HostController) Delete ¶
func (hc *HostController) Delete() error
Delete deletes the given host from the pool
func (*HostController) DeleteContext ¶
func (hc *HostController) DeleteContext(ctx context.Context) error
DeleteContext deletes the given host from the pool
func (*HostController) Info ¶
func (hc *HostController) Info(decrypt bool) (*host.Host, error)
Info retrieves information for the host from ID
func (*HostController) InfoContext ¶
InfoContext retrieves information for the host from ID
func (*HostController) Monitoring ¶
func (hc *HostController) Monitoring() (*host.Monitoring, error)
Monitoring returns the host monitoring records.
func (*HostController) MonitoringContext ¶
func (hc *HostController) MonitoringContext(ctx context.Context) (*host.Monitoring, error)
MonitoringContext returns the host monitoring records.
func (*HostController) Rename ¶
func (hc *HostController) Rename(newName string) error
Rename renames a host. * newName: The new name.
func (*HostController) RenameContext ¶
func (hc *HostController) RenameContext(ctx context.Context, newName string) error
RenameContext renames a host. * ctx: context for cancelation * newName: The new name.
func (*HostController) Status ¶
func (hc *HostController) Status(status int) error
Status sets the status of the host * status: 0: ENABLED, 1: DISABLED, 2: OFFLINE
func (*HostController) StatusContext ¶
func (hc *HostController) StatusContext(ctx context.Context, status int) error
StatusContext sets the status of the host * ctx: context for cancelation * status: 0: ENABLED, 1: DISABLED, 2: OFFLINE
func (*HostController) Update ¶
func (hc *HostController) Update(tpl string, uType parameters.UpdateType) error
Update adds host content.
- tpl: The new host contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
func (*HostController) UpdateContext ¶
func (hc *HostController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
UpdateContext adds host content.
- ctx: context for cancelation
- tpl: The new host contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
type HostsController ¶
type HostsController entitiesController
HostsController is a controller for create an host or a pool of hosts
func (*HostsController) ByName ¶
func (c *HostsController) ByName(name string) (int, error)
ByName finds a Host ID from name
func (*HostsController) ByNameContext ¶
ByNameContext finds a Host ID from name
func (*HostsController) Create ¶
func (hc *HostsController) Create(name, im, vm string, clusterID int) (int, error)
Create allocates a new host. It returns the new host ID. * name: name of the host * im: information driver for the host * vm: virtualization driver for the host * clusterID: The cluster ID. If it is -1, the default one will be used.
func (*HostsController) CreateContext ¶
func (hc *HostsController) CreateContext(ctx context.Context, name, im, vm string, clusterID int) (int, error)
Create allocates a new host. It returns the new host ID. * ctx: context for cancelation * name: name of the host * im: information driver for the host * vm: virtualization driver for the host * clusterID: The cluster ID. If it is -1, the default one will be used.
func (*HostsController) Info ¶
func (hc *HostsController) Info() (*host.Pool, error)
Info returns a host pool. A connection to OpenNebula is performed
func (*HostsController) InfoContext ¶
InfoContext returns a host pool. A connection to OpenNebula is performed
func (*HostsController) Monitoring ¶
func (hc *HostsController) Monitoring(num int) (*host.PoolMonitoring, error)
Monitoring Returns the Hosts monitoring records num: Retrieve monitor records in the last num seconds. 0 just the last record, -1 all records
func (*HostsController) MonitoringContext ¶
func (hc *HostsController) MonitoringContext(ctx context.Context, num int) (*host.PoolMonitoring, error)
MonitoringContext Returns the Hosts monitoring records ctx: context for cancelation num: Retrieve monitor records in the last num seconds. 0 just the last record, -1 all records
type ImageController ¶
type ImageController entityController
ImageController is a controller for Image entities
func (*ImageController) Chmod ¶
func (ic *ImageController) Chmod(perm shared.Permissions) error
Chmod changes the permissions of the image. If any perm is -1 it will not change
func (*ImageController) ChmodContext ¶
func (ic *ImageController) ChmodContext(ctx context.Context, perm shared.Permissions) error
ChmodContext changes the permissions of the image. If any perm is -1 it will not change
func (*ImageController) Chown ¶
func (ic *ImageController) Chown(uid, gid int) error
Chown changes the owner/group of the image. If uid or gid is -1 it will not change
func (*ImageController) ChownContext ¶
func (ic *ImageController) ChownContext(ctx context.Context, uid, gid int) error
ChownContext changes the owner/group of the image. If uid or gid is -1 it will not change
func (*ImageController) Chtype ¶
func (ic *ImageController) Chtype(newType string) error
Chtype changes the type of the Image
func (*ImageController) ChtypeContext ¶
func (ic *ImageController) ChtypeContext(ctx context.Context, newType string) error
ChtypeContext changes the type of the Image
func (*ImageController) Clone ¶
func (ic *ImageController) Clone(cloneName string, dsid int) (int, error)
Clone clones an existing image. It returns the clone ID
func (*ImageController) CloneContext ¶
func (ic *ImageController) CloneContext(ctx context.Context, cloneName string, dsid int) (int, error)
CloneContext clones an existing image. It returns the clone ID
func (*ImageController) Delete ¶
func (ic *ImageController) Delete() error
Delete will remove the image from OpenNebula, which will remove it from the backend.
func (*ImageController) DeleteContext ¶
func (ic *ImageController) DeleteContext(ctx context.Context) error
DeleteContext will remove the image from OpenNebula, which will remove it from the backend.
func (*ImageController) Enable ¶
func (ic *ImageController) Enable(enable bool) error
Enable enables (or disables) the image
func (*ImageController) EnableContext ¶
func (ic *ImageController) EnableContext(ctx context.Context, enable bool) error
EnableContext enables (or disables) the image
func (*ImageController) Info ¶
func (ic *ImageController) Info(decrypt bool) (*image.Image, error)
Info connects to OpenNebula and fetches the information of the Image
func (*ImageController) InfoContext ¶
InfoContext connects to OpenNebula and fetches the information of the Image
func (*ImageController) Lock ¶
func (ic *ImageController) Lock(level shared.LockLevel) error
Lock locks the image following lock level. See levels in locks.go.
func (*ImageController) LockContext ¶
LockContext locks the image following lock level. See levels in locks.go.
func (*ImageController) Persistent ¶
func (ic *ImageController) Persistent(persistent bool) error
Persistent sets the image as persistent (or not)
func (*ImageController) PersistentContext ¶
func (ic *ImageController) PersistentContext(ctx context.Context, persistent bool) error
PersistentContext sets the image as persistent (or not)
func (*ImageController) Rename ¶
func (ic *ImageController) Rename(newName string) error
Rename changes the name of the image
func (*ImageController) RenameContext ¶
func (ic *ImageController) RenameContext(ctx context.Context, newName string) error
RenameContext changes the name of the image
func (*ImageController) Snapshot ¶
func (ic *ImageController) Snapshot(id int) *ImageSnapshotController
Snapshot returns an Image snapshot controller
func (*ImageController) Unlock ¶
func (ic *ImageController) Unlock() error
Unlock unlocks the image.
func (*ImageController) UnlockContext ¶
func (ic *ImageController) UnlockContext(ctx context.Context) error
UnlockContext unlocks the image.
func (*ImageController) Update ¶
func (ic *ImageController) Update(tpl string, uType parameters.UpdateType) error
Update adds image content.
- tpl: The new image contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
func (*ImageController) UpdateContext ¶
func (ic *ImageController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
UpdateContext adds image content.
- ctx: context for cancelation
- tpl: The new image contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
type ImageSnapshotController ¶
type ImageSnapshotController subEntityController
ImageSnapshotController is a controller for an Image snapshot
func (*ImageSnapshotController) Delete ¶
func (ic *ImageSnapshotController) Delete() error
Delete will delete a snapshot from the image
func (*ImageSnapshotController) DeleteContext ¶
func (ic *ImageSnapshotController) DeleteContext(ctx context.Context) error
DeleteContext will delete a snapshot from the image
func (*ImageSnapshotController) Flatten ¶
func (ic *ImageSnapshotController) Flatten() error
Flatten flattens the snapshot image and discards others
func (*ImageSnapshotController) FlattenContext ¶
func (ic *ImageSnapshotController) FlattenContext(ctx context.Context) error
FlattenContext flattens the snapshot image and discards others
func (*ImageSnapshotController) Revert ¶
func (ic *ImageSnapshotController) Revert() error
Revert reverts image state to a previous snapshot
func (*ImageSnapshotController) RevertContext ¶
func (ic *ImageSnapshotController) RevertContext(ctx context.Context) error
RevertContext reverts image state to a previous snapshot
type ImagesController ¶
type ImagesController entitiesController
ImagesController is a controller for Images
func (*ImagesController) ByName ¶
func (c *ImagesController) ByName(name string, args ...int) (int, error)
ByName returns an Image ID from name
func (*ImagesController) ByNameContext ¶
func (c *ImagesController) ByNameContext(ctx context.Context, name string, args ...int) (int, error)
ByNameContext returns an Image ID from name
func (*ImagesController) Create ¶
func (ic *ImagesController) Create(template string, dsid uint) (int, error)
Create allocates a new image based on the template string provided. It returns the image ID.
func (*ImagesController) CreateContext ¶
func (ic *ImagesController) CreateContext(ctx context.Context, template string, dsid uint) (int, error)
CreateContext allocates a new image based on the template string provided. It returns the image ID.
func (*ImagesController) Info ¶
func (ic *ImagesController) Info(args ...int) (*image.Pool, error)
Info returns a new image pool. It accepts the scope of the query.
func (*ImagesController) InfoContext ¶
InfoContext returns a new image pool. It accepts the scope of the query.
type MarketPlaceAppController ¶
type MarketPlaceAppController entityController
MarketPlaceAppController is a controller for MarketPlaceApp entities
func (*MarketPlaceAppController) Chmod ¶
func (mc *MarketPlaceAppController) Chmod(perm shared.Permissions) error
Chmod changes the permission bits of a marketplace app
func (*MarketPlaceAppController) ChmodContext ¶
func (mc *MarketPlaceAppController) ChmodContext(ctx context.Context, perm shared.Permissions) error
ChmodContext changes the permission bits of a marketplace app
func (*MarketPlaceAppController) Chown ¶
func (mc *MarketPlaceAppController) Chown(userID, groupID int) error
Chown changes the ownership of a marketplace app. * userID: The User ID of the new owner. If set to -1, it will not change. * groupID: The Group ID of the new group. If set to -1, it will not change.
func (*MarketPlaceAppController) ChownContext ¶
func (mc *MarketPlaceAppController) ChownContext(ctx context.Context, userID, groupID int) error
ChownContext changes the ownership of a marketplace app. * ctx: context for cancelation * userID: The User ID of the new owner. If set to -1, it will not change. * groupID: The Group ID of the new group. If set to -1, it will not change.
func (*MarketPlaceAppController) Delete ¶
func (mc *MarketPlaceAppController) Delete() error
Delete deletes the given marketplace app from the pool.
func (*MarketPlaceAppController) DeleteContext ¶
func (mc *MarketPlaceAppController) DeleteContext(ctx context.Context) error
DeleteContext deletes the given marketplace app from the pool.
func (*MarketPlaceAppController) Enable ¶
func (mc *MarketPlaceAppController) Enable(enable bool) error
Enable enables or disables a marketplace app. * enable: True for enabling, False for disabling
func (*MarketPlaceAppController) EnableContext ¶
func (mc *MarketPlaceAppController) EnableContext(ctx context.Context, enable bool) error
EnableContext enables or disables a marketplace app. * ctx: context for cancelation * enable: True for enabling, False for disabling
func (*MarketPlaceAppController) Info ¶
func (mc *MarketPlaceAppController) Info(decrypt bool) (*marketplaceapp.MarketPlaceApp, error)
Info retrieves information for the marketplace app.
func (*MarketPlaceAppController) InfoContext ¶
func (mc *MarketPlaceAppController) InfoContext(ctx context.Context, decrypt bool) (*marketplaceapp.MarketPlaceApp, error)
InfoContext retrieves information for the marketplace app.
func (*MarketPlaceAppController) Lock ¶
func (mc *MarketPlaceAppController) Lock(level shared.LockLevel) error
Lock locks the marketplace app depending on blocking level. See levels in locks.go.
func (*MarketPlaceAppController) LockContext ¶
LockContext locks the marketplace app depending on blocking level. See levels in locks.go.
func (*MarketPlaceAppController) Rename ¶
func (mc *MarketPlaceAppController) Rename(newName string) error
Rename renames a marketplace app. * newName: The new name.
func (*MarketPlaceAppController) RenameContext ¶
func (mc *MarketPlaceAppController) RenameContext(ctx context.Context, newName string) error
RenameContext renames a marketplace app. * ctx: context for cancelation * newName: The new name.
func (*MarketPlaceAppController) Unlock ¶
func (mc *MarketPlaceAppController) Unlock() error
Unlock unlocks the marketplace app.
func (*MarketPlaceAppController) UnlockContext ¶
func (mc *MarketPlaceAppController) UnlockContext(ctx context.Context) error
UnlockContext unlocks the marketplace app.
func (*MarketPlaceAppController) Update ¶
func (mc *MarketPlaceAppController) Update(tpl string, uType parameters.UpdateType) error
Update adds marketplace app content.
- tpl: The new marketplace contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
func (*MarketPlaceAppController) UpdateContext ¶
func (mc *MarketPlaceAppController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
UpdateContext adds marketplace app content.
- ctx: context for cancelation
- tpl: The new marketplace contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
type MarketPlaceAppsController ¶
type MarketPlaceAppsController entitiesController
MarketPlaceAppsController is a controller for a pool of MarketPlaceApps
func (*MarketPlaceAppsController) ByName ¶
func (c *MarketPlaceAppsController) ByName(name string, args ...int) (int, error)
ByName returns a MarketPlace ID from name
func (*MarketPlaceAppsController) ByNameContext ¶
func (c *MarketPlaceAppsController) ByNameContext(ctx context.Context, name string, args ...int) (int, error)
ByNameContext returns a MarketPlace ID from name
func (*MarketPlaceAppsController) Create ¶
func (mc *MarketPlaceAppsController) Create(tpl string, market int) (int, error)
Create allocates a new marketplace app. It returns the new marketplace app ID. * tpl: template of the marketplace app * market: market place ID
func (*MarketPlaceAppsController) CreateContext ¶
func (mc *MarketPlaceAppsController) CreateContext(ctx context.Context, tpl string, market int) (int, error)
Create allocates a new marketplace app. It returns the new marketplace app ID. * ctx: context for cancelation * tpl: template of the marketplace app * market: market place ID
func (*MarketPlaceAppsController) Info ¶
func (mc *MarketPlaceAppsController) Info(args ...int) (*marketplaceapp.Pool, error)
Info returns a marketplace app pool. A connection to OpenNebula is performed.
func (*MarketPlaceAppsController) InfoContext ¶
func (mc *MarketPlaceAppsController) InfoContext(ctx context.Context, args ...int) (*marketplaceapp.Pool, error)
InfoContext returns a marketplace app pool. A connection to OpenNebula is performed.
type MarketPlaceController ¶
type MarketPlaceController entityController
MarketPlaceController is a controller for MarketPlace entities
func (*MarketPlaceController) Chmod ¶
func (mc *MarketPlaceController) Chmod(perm shared.Permissions) error
Chmod changes the permission bits of a marketplace
func (*MarketPlaceController) ChmodContext ¶
func (mc *MarketPlaceController) ChmodContext(ctx context.Context, perm shared.Permissions) error
ChmodContext changes the permission bits of a marketplace
func (*MarketPlaceController) Chown ¶
func (mc *MarketPlaceController) Chown(userID, groupID int) error
Chown changes the ownership of a marketplace. * userID: The User ID of the new owner. If set to -1, it will not change. * groupID: The Group ID of the new group. If set to -1, it will not change.
func (*MarketPlaceController) ChownContext ¶
func (mc *MarketPlaceController) ChownContext(ctx context.Context, userID, groupID int) error
ChownContext changes the ownership of a marketplace. * ctx: context for cancelation * userID: The User ID of the new owner. If set to -1, it will not change. * groupID: The Group ID of the new group. If set to -1, it will not change.
func (*MarketPlaceController) Delete ¶
func (mc *MarketPlaceController) Delete() error
Delete deletes the given marketplace from the pool.
func (*MarketPlaceController) DeleteContext ¶
func (mc *MarketPlaceController) DeleteContext(ctx context.Context) error
DeleteContext deletes the given marketplace from the pool.
func (*MarketPlaceController) Enable ¶
func (mc *MarketPlaceController) Enable(enable bool) error
Enable enables or disables a marketplace. * enable: True for enabling, False for disabling
func (*MarketPlaceController) EnableContext ¶
func (mc *MarketPlaceController) EnableContext(ctx context.Context, enable bool) error
Enable enables or disables a marketplace. * enable: True for enabling, False for disabling
func (*MarketPlaceController) Info ¶
func (mc *MarketPlaceController) Info(decrypt bool) (*marketplace.MarketPlace, error)
Info retrieves information for the marketplace.
func (*MarketPlaceController) InfoContext ¶
func (mc *MarketPlaceController) InfoContext(ctx context.Context, decrypt bool) (*marketplace.MarketPlace, error)
InfoContext retrieves information for the marketplace.
func (*MarketPlaceController) Rename ¶
func (mc *MarketPlaceController) Rename(newName string) error
Rename renames a marketplace. * newName: The new name.
func (*MarketPlaceController) RenameContext ¶
func (mc *MarketPlaceController) RenameContext(ctx context.Context, newName string) error
RenameContext renames a marketplace. * ctx: context for cancelation * newName: The new name.
func (*MarketPlaceController) Update ¶
func (mc *MarketPlaceController) Update(tpl string, uType parameters.UpdateType) error
Update adds marketplace content.
- tpl: The new marketplace contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
func (*MarketPlaceController) UpdateContext ¶
func (mc *MarketPlaceController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
Update adds marketplace content.
- ctx: context for cancelation
- tpl: The new marketplace contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
type MarketPlacesController ¶
type MarketPlacesController entitiesController
MarketPlacesController is a controller for a pool of MarketPlaces
func (*MarketPlacesController) ByName ¶
func (c *MarketPlacesController) ByName(name string) (int, error)
ByName return MarketPlace ID from name
func (*MarketPlacesController) ByNameContext ¶
ByNameContext return MarketPlace ID from name
func (*MarketPlacesController) Create ¶
func (mc *MarketPlacesController) Create(tpl string) (int, error)
Create allocates a new marketplace. It returns the new marketplace ID. * tpl: template of the marketplace
func (*MarketPlacesController) CreateContext ¶
Create allocates a new marketplace. It returns the new marketplace ID. * ctx: context for cancelation * tpl: template of the marketplace
func (*MarketPlacesController) Info ¶
func (mc *MarketPlacesController) Info(args ...int) (*marketplace.Pool, error)
Info returns a marketplace pool. A connection to OpenNebula is performed.
func (*MarketPlacesController) InfoContext ¶
func (mc *MarketPlacesController) InfoContext(ctx context.Context, args ...int) (*marketplace.Pool, error)
InfoContext returns a marketplace pool. A connection to OpenNebula is performed.
type OneConfig ¶
type OneConfig struct { // Token is the authentication string. In the format of <user>:<password> Token string // Endpoint contains OpenNebula's XML-RPC API endpoint. Defaults to // http://localhost:2633/RPC2 Endpoint string }
OneConfig contains the information to communicate with OpenNebula
type RESTClient ¶
type RESTClient struct {
// contains filtered or unexported fields
}
RESTClient
func NewDefaultFlowClient ¶
func NewDefaultFlowClient(conf HTTPAuth) *RESTClient
NewDefaultFlowClient return a basic RESTClient with flow information
func NewFlowClient ¶
func NewFlowClient(conf HTTPAuth, httpClient *http.Client) *RESTClient
NewFlowClient return a RESTClient with flow information that allows setting a custom http.Client. If the httpClient is nil, it will return a NewDefaultFlowClient
func (*RESTClient) HTTPMethod ¶
func (c *RESTClient) HTTPMethod(method string, url string, args ...interface{}) (*Response, error)
HTTPMethod interface to client internals
type RPCCaller ¶
type RPCCaller interface {
CallContext(ctx context.Context, method string, args ...interface{}) (*Response, error)
}
RPCCaller is the interface to satisfy in order to be usable by the controller
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
type STemplateController ¶
type STemplateController entityController
STemplateController interacts with oneflow service. Uses REST Client.
func (*STemplateController) Chgrp ¶
func (tc *STemplateController) Chgrp(gid int) error
Chgrp template
func (*STemplateController) Chmod ¶
func (tc *STemplateController) Chmod(perm shared.Permissions) error
Chmod template
func (*STemplateController) Chown ¶
func (tc *STemplateController) Chown(uid, gid int) error
Chown template
func (*STemplateController) Clone ¶
func (tc *STemplateController) Clone(clone_name string, recursive bool) (*srv_tmpl.ServiceTemplate, error)
Clone a service template
func (*STemplateController) Delete ¶
func (tc *STemplateController) Delete() error
Delete the service resource identified by <id>
func (*STemplateController) Info ¶
func (tc *STemplateController) Info() (*srv_tmpl.ServiceTemplate, error)
Get the service template identified by <id>
func (*STemplateController) Instantiate ¶
func (tc *STemplateController) Instantiate(extra_tmpl string) (*service.Service, error)
Instantiate the service_template resource identified by <id>
func (*STemplateController) Rename ¶
func (tc *STemplateController) Rename(new_name string) error
Rename service template
func (*STemplateController) Update ¶
func (tc *STemplateController) Update(st *srv_tmpl.ServiceTemplate, append bool) error
Update service template
type STemplatesController ¶
type STemplatesController entitiesController
STemplatesController interacts with oneflow services. Uses REST Client.
func (*STemplatesController) Create ¶
func (tc *STemplatesController) Create(st *srv_tmpl.ServiceTemplate) error
Allocate a service template st will be filled with the new ServiceTemplate information
type SecurityGroupController ¶
type SecurityGroupController entityController
SecurityGroupController is a controller for Security entities
func (*SecurityGroupController) Chmod ¶
func (sc *SecurityGroupController) Chmod(perm shared.Permissions) error
Chmod changes the permission bits of a security group
func (*SecurityGroupController) ChmodContext ¶
func (sc *SecurityGroupController) ChmodContext(ctx context.Context, perm shared.Permissions) error
ChmodContext changes the permission bits of a security group
func (*SecurityGroupController) Chown ¶
func (sc *SecurityGroupController) Chown(userID, groupID int) error
Chown changes the ownership of a security group. * userID: The User ID of the new owner. If set to -1, it will not change. * groupID: The Group ID of the new group. If set to -1, it will not change.
func (*SecurityGroupController) ChownContext ¶
func (sc *SecurityGroupController) ChownContext(ctx context.Context, userID, groupID int) error
ChownContext changes the ownership of a security group. * ctx: context for cancelation * userID: The User ID of the new owner. If set to -1, it will not change. * groupID: The Group ID of the new group. If set to -1, it will not change.
func (*SecurityGroupController) Clone ¶
func (sc *SecurityGroupController) Clone(cloneName string) (int, error)
Clone clones an existing security group. It returns the clone ID
func (*SecurityGroupController) CloneContext ¶
CloneContext clones an existing security group. It returns the clone ID
func (*SecurityGroupController) Commit ¶
func (sc *SecurityGroupController) Commit(recovery bool) error
Commit apply security group changes to associated VMs. * recovery: If set the commit operation will only operate on outdated and error VMs. If not set operate on all VMs
func (*SecurityGroupController) CommitContext ¶
func (sc *SecurityGroupController) CommitContext(ctx context.Context, recovery bool) error
CommitContext apply security group changes to associated VMs. * ctx: context for cancelation * recovery: If set the commit operation will only operate on outdated and error VMs. If not set operate on all VMs
func (*SecurityGroupController) Delete ¶
func (sc *SecurityGroupController) Delete() error
Delete deletes the given security group from the pool.
func (*SecurityGroupController) DeleteContext ¶
func (sc *SecurityGroupController) DeleteContext(ctx context.Context) error
DeleteContext deletes the given security group from the pool.
func (*SecurityGroupController) Info ¶
func (sc *SecurityGroupController) Info(decrypt bool) (*securitygroup.SecurityGroup, error)
Info retrieves information for the security group.
func (*SecurityGroupController) InfoContext ¶
func (sc *SecurityGroupController) InfoContext(ctx context.Context, decrypt bool) (*securitygroup.SecurityGroup, error)
InfoContext retrieves information for the security group.
func (*SecurityGroupController) Rename ¶
func (sc *SecurityGroupController) Rename(newName string) error
Rename renames a security group. * newName: The new name.
func (*SecurityGroupController) RenameContext ¶
func (sc *SecurityGroupController) RenameContext(ctx context.Context, newName string) error
RenameContext renames a security group. * ctx: context for cancelation * newName: The new name.
func (*SecurityGroupController) Update ¶
func (sc *SecurityGroupController) Update(tpl string, uType parameters.UpdateType) error
Update adds security group content.
- tpl: The new security group contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
func (*SecurityGroupController) UpdateContext ¶
func (sc *SecurityGroupController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
UpdateContext adds security group content.
- ctx: context for cancelation
- tpl: The new security group contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
type SecurityGroupsController ¶
type SecurityGroupsController entitiesController
SecurityGroupsController is a controller for a pool of Security
func (*SecurityGroupsController) ByName ¶
func (c *SecurityGroupsController) ByName(name string, args ...int) (int, error)
ByName returns a SecurityGroup by Name
func (*SecurityGroupsController) ByNameContext ¶
func (c *SecurityGroupsController) ByNameContext(ctx context.Context, name string, args ...int) (int, error)
ByNameContext returns a SecurityGroup by Name
func (*SecurityGroupsController) Create ¶
func (sc *SecurityGroupsController) Create(tpl string) (int, error)
Create allocates a new security group. It returns the new security group ID. * tpl: template of the security group
func (*SecurityGroupsController) CreateContext ¶
CreateContext allocates a new security group. It returns the new security group ID. * ctx: context for cancelation * tpl: template of the security group
func (*SecurityGroupsController) Info ¶
func (sc *SecurityGroupsController) Info(args ...int) (*securitygroup.Pool, error)
Info returns a security group pool. A connection to OpenNebula is performed.
func (*SecurityGroupsController) InfoContext ¶
func (sc *SecurityGroupsController) InfoContext(ctx context.Context, args ...int) (*securitygroup.Pool, error)
InfoContext returns a security group pool. A connection to OpenNebula is performed.
type ServiceController ¶
type ServiceController entityController
ServiceController interacts with oneflow service. Uses REST Client.
func (*ServiceController) Chmod ¶
func (sc *ServiceController) Chmod(perm shared.Permissions) error
Chmod service
func (*ServiceController) Chown ¶
func (sc *ServiceController) Chown(uid, gid int) error
Chown service
func (*ServiceController) Delete ¶
func (sc *ServiceController) Delete() error
Delete the service resource identified by <id>
func (*ServiceController) Info ¶
func (sc *ServiceController) Info() (*service.Service, error)
Get the service resource identified by <id>
func (*ServiceController) Recover ¶
func (sc *ServiceController) Recover(delete bool) error
Recover existing service if delete de service is recover and deleted
func (*ServiceController) Rename ¶
func (sc *ServiceController) Rename(new_name string) error
Rename service
func (*ServiceController) Scale ¶
func (sc *ServiceController) Scale(role string, cardinality int, force bool) error
Scale the cardinality of a service role
func (*ServiceController) VMAction ¶
func (sc *ServiceController) VMAction(role, action string, params map[string]interface{}) error
VMAction performs the action on every VM belonging to role. Available actions: shutdown, shutdown-hard, undeploy, undeploy-hard, hold, release, stop, suspend, resume, boot, delete, delete-recreate, reboot, reboot-hard, poweroff, poweroff-hard, snapshot-create. Example params. Read the flow API docu.
map[string]interface{}{ "period": 60, "number": 2, },
TODO: enforce only available actions
type ServicesController ¶
type ServicesController entitiesController
ServicesController interacts with oneflow services. Uses REST Client.
type TemplateController ¶
type TemplateController entityController
TemplateController is a controller for Template entities
func (*TemplateController) Chmod ¶
func (tc *TemplateController) Chmod(perm shared.Permissions) error
Chmod changes the permissions of a template. If any perm is -1 it will not change
func (*TemplateController) ChmodContext ¶
func (tc *TemplateController) ChmodContext(ctx context.Context, perm shared.Permissions) error
ChmodContext changes the permissions of a template. If any perm is -1 it will not change
func (*TemplateController) Chown ¶
func (tc *TemplateController) Chown(uid, gid int) error
Chown changes the owner/group of a template. If uid or gid is -1 it will not change
func (*TemplateController) ChownContext ¶
func (tc *TemplateController) ChownContext(ctx context.Context, uid, gid int) error
ChownContext changes the owner/group of a template. If uid or gid is -1 it will not change
func (*TemplateController) Clone ¶
func (tc *TemplateController) Clone(name string, recursive bool) error
Clone an existing template. If recursive is true it will clone the template plus any image defined in DISK. The new IMAGE_ID is set into each DISK.
func (*TemplateController) CloneContext ¶
CloneContext an existing template. If recursive is true it will clone the template plus any image defined in DISK. The new IMAGE_ID is set into each DISK.
func (*TemplateController) Delete ¶
func (tc *TemplateController) Delete() error
Delete will remove the template from OpenNebula.
func (*TemplateController) DeleteContext ¶
func (tc *TemplateController) DeleteContext(ctx context.Context) error
DeleteContext will remove the template from OpenNebula.
func (*TemplateController) Info ¶
func (tc *TemplateController) Info(extended, decrypt bool) (*template.Template, error)
Info connects to OpenNebula and fetches the information of the Template
func (*TemplateController) InfoContext ¶
func (tc *TemplateController) InfoContext(ctx context.Context, extended, decrypt bool) (*template.Template, error)
InfoContext connects to OpenNebula and fetches the information of the Template
func (*TemplateController) Instantiate ¶
func (tc *TemplateController) Instantiate(name string, pending bool, extra string, clone bool) (int, error)
Instantiate will instantiate the template
func (*TemplateController) InstantiateContext ¶
func (tc *TemplateController) InstantiateContext(ctx context.Context, name string, pending bool, extra string, clone bool) (int, error)
InstantiateContext will instantiate the template
func (*TemplateController) Lock ¶
func (tc *TemplateController) Lock(level shared.LockLevel) error
Lock locks the template following block level. See levels in locks.go.
func (*TemplateController) LockContext ¶
LockContext locks the template following block level. See levels in locks.go.
func (*TemplateController) Rename ¶
func (tc *TemplateController) Rename(newName string) error
Rename changes the name of template
func (*TemplateController) RenameContext ¶
func (tc *TemplateController) RenameContext(ctx context.Context, newName string) error
RenameContext changes the name of template
func (*TemplateController) Unlock ¶
func (tc *TemplateController) Unlock() error
Unlock unlocks the template.
func (*TemplateController) UnlockContext ¶
func (tc *TemplateController) UnlockContext(ctx context.Context) error
UnlockContext unlocks the template.
func (*TemplateController) Update ¶
func (tc *TemplateController) Update(tpl string, uType parameters.UpdateType) error
Update adds template content.
- tpl: The new template contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
func (*TemplateController) UpdateContext ¶
func (tc *TemplateController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
UpdateContext adds template content.
- ctx: context for cancelation
- tpl: The new template contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
type TemplatesController ¶
type TemplatesController entitiesController
TemplatesController is a controller for a pool of template
func (*TemplatesController) ByName ¶
func (c *TemplatesController) ByName(name string, args ...int) (int, error)
ByName returns a Template by Name
func (*TemplatesController) ByNameContext ¶
func (c *TemplatesController) ByNameContext(ctx context.Context, name string, args ...int) (int, error)
ByNameContext returns a Template by Name
func (*TemplatesController) Create ¶
func (tc *TemplatesController) Create(template string) (int, error)
Create allocates a new template. It returns the new template ID.
func (*TemplatesController) CreateContext ¶
CreateContext allocates a new template. It returns the new template ID.
func (*TemplatesController) Info ¶
func (tc *TemplatesController) Info(args ...int) (*template.Pool, error)
Info returns a template pool. A connection to OpenNebula is performed.
func (*TemplatesController) InfoContext ¶
func (tc *TemplatesController) InfoContext(ctx context.Context, args ...int) (*template.Pool, error)
InfoContext returns a template pool. A connection to OpenNebula is performed.
type UserByNameController ¶
type UserByNameController struct { Name string // contains filtered or unexported fields }
UserByNameController is a controller for an user by it's name
func (*UserByNameController) Login ¶
func (uc *UserByNameController) Login(token string, timeSeconds int, effectiveGID int) error
Login generates or sets a login token. * token: The token, if empty oned will generate one * timeSeconds: Valid period in seconds; 0 reset the token and -1 for a non-expiring token. * effectiveGID: Effective GID to use with this token. To use the current GID and user groups set it to -1
func (*UserByNameController) LoginContext ¶
func (uc *UserByNameController) LoginContext(ctx context.Context, token string, timeSeconds int, effectiveGID int) error
LoginContext generates or sets a login token. * ctx: context for cancelation * token: The token, if empty oned will generate one * timeSeconds: Valid period in seconds; 0 reset the token and -1 for a non-expiring token. * effectiveGID: Effective GID to use with this token. To use the current GID and user groups set it to -1
type UserController ¶
type UserController entityController
UserController is a controller for User entities
func (*UserController) AddGroup ¶
func (uc *UserController) AddGroup(groupID int) error
AddGroup adds the User to a secondary group. * groupID: The Group ID of the new group.
func (*UserController) AddGroupContext ¶
func (uc *UserController) AddGroupContext(ctx context.Context, groupID int) error
AddGroupContext adds the User to a secondary group. * ctx: context for cancelation * groupID: The Group ID of the new group.
func (*UserController) Chauth ¶
func (uc *UserController) Chauth(authDriver, password string) error
Chauth changes the authentication driver and the password for the given user. * authDriver: The new authentication driver. * password: The new password. If it is an empty string
func (*UserController) ChauthContext ¶
func (uc *UserController) ChauthContext(ctx context.Context, authDriver, password string) error
ChauthContext changes the authentication driver and the password for the given user. * ctx: context for cancelation * authDriver: The new authentication driver. * password: The new password. If it is an empty string
func (*UserController) Chgrp ¶
func (uc *UserController) Chgrp(groupID int) error
Chgrp changes the group of the given user. * groupID: The Group ID of the new group.
func (*UserController) ChgrpContext ¶
func (uc *UserController) ChgrpContext(ctx context.Context, groupID int) error
ChgrpContext changes the group of the given user. * ctx: context for cancelation * groupID: The Group ID of the new group.
func (*UserController) DelGroup ¶
func (uc *UserController) DelGroup(groupID int) error
DelGroup removes the User from a secondary group * groupID: The Group ID.
func (*UserController) DelGroupContext ¶
func (uc *UserController) DelGroupContext(ctx context.Context, groupID int) error
DelGroupContext removes the User from a secondary group * ctx: context for cancelation * groupID: The Group ID.
func (*UserController) Delete ¶
func (uc *UserController) Delete() error
Delete deletes the given user from the pool.
func (*UserController) DeleteContext ¶
func (uc *UserController) DeleteContext(ctx context.Context) error
DeleteContext deletes the given user from the pool.
func (*UserController) Info ¶
func (uc *UserController) Info(decrypt bool) (*user.User, error)
Info retrieves information for the user from ID
func (*UserController) InfoContext ¶
InfoContext retrieves information for the user from ID
func (*UserController) Login ¶
func (uc *UserController) Login(token string, timeSeconds int, effectiveGID int) error
Login generates or sets a login token. * token: The token, if empty oned will generate one * timeSeconds: Valid period in seconds; 0 reset the token and -1 for a non-expiring token. * effectiveGID: Effective GID to use with this token. To use the current GID and user groups set it to -1 NOTE: This method make two XML-RPC calls, to make only one call, use UserByName(name).Login(...) method
func (*UserController) LoginContext ¶
func (uc *UserController) LoginContext(ctx context.Context, token string, timeSeconds int, effectiveGID int) error
LoginContext generates or sets a login token. * ctx: context for cancelation * token: The token, if empty oned will generate one * timeSeconds: Valid period in seconds; 0 reset the token and -1 for a non-expiring token. * effectiveGID: Effective GID to use with this token. To use the current GID and user groups set it to -1 NOTE: This method make two XML-RPC calls, to make only one call, use UserByName(name).Login(...) method
func (*UserController) Passwd ¶
func (uc *UserController) Passwd(password string) error
Passwd changes the password for the given user. * password: The new password
func (*UserController) PasswdContext ¶
func (uc *UserController) PasswdContext(ctx context.Context, password string) error
PasswdContext changes the password for the given user. * password: The new password
func (*UserController) Quota ¶
func (uc *UserController) Quota(tpl string) error
Quota sets the user quota limits. * tpl: The new quota template contents. Syntax can be the usual attribute=value or XML.
func (*UserController) QuotaContext ¶
func (uc *UserController) QuotaContext(ctx context.Context, tpl string) error
QuotaContext sets the user quota limits. * ctx: context for cancelation * tpl: The new quota template contents. Syntax can be the usual attribute=value or XML.
func (*UserController) Update ¶
func (uc *UserController) Update(tpl string, uType parameters.UpdateType) error
Update adds user content.
- tpl: The new user contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
func (*UserController) UpdateContext ¶
func (uc *UserController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
UpdateContext adds user content.
- ctx: context for cancelation
- tpl: The new user contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
type UsersController ¶
type UsersController entitiesController
UsersController is a controller for a pool of Users
func (*UsersController) ByName ¶
func (c *UsersController) ByName(name string) (int, error)
ByName returns a User by Name
func (*UsersController) ByNameContext ¶
ByNameContext returns a User by Name
func (*UsersController) Create ¶
func (uc *UsersController) Create(name, password, authDriver string, groupIDs []int) (int, error)
Create allocates a new user. It returns the new user ID. * name: name of the user * password: password of the user * authDriver: auth driver * groupIDs: array of groupIDs to add to the user
func (*UsersController) CreateContext ¶
func (uc *UsersController) CreateContext(ctx context.Context, name, password, authDriver string, groupIDs []int) (int, error)
CreateContext allocates a new user. It returns the new user ID. * ctx: context for cancelation * name: name of the user * password: password of the user * authDriver: auth driver * groupIDs: array of groupIDs to add to the user
func (*UsersController) Info ¶
func (uc *UsersController) Info() (*user.Pool, error)
Info returns a user pool. A connection to OpenNebula is performed.
func (*UsersController) InfoContext ¶
InfoContext returns a user pool. A connection to OpenNebula is performed.
type VDCController ¶
type VDCController entityController
VDCController is a controller for VDC entities
func (*VDCController) AddCluster ¶
func (vc *VDCController) AddCluster(zoneID, clusterID int) error
AddCluster adds a cluster to the VDC * zoneID: The Zone ID. * clusterID: The Cluster ID.
func (*VDCController) AddClusterContext ¶
func (vc *VDCController) AddClusterContext(ctx context.Context, zoneID, clusterID int) error
AddClusterContext adds a cluster to the VDC * ctx: context for cancelation * zoneID: The Zone ID. * clusterID: The Cluster ID.
func (*VDCController) AddDatastore ¶
func (vc *VDCController) AddDatastore(zoneID, dsID int) error
AddDatastore adds a datastore to the VDC * zoneID: The Zone ID. * dsID: The Datastore ID.
func (*VDCController) AddDatastoreContext ¶
func (vc *VDCController) AddDatastoreContext(ctx context.Context, zoneID, dsID int) error
AddDatastoreContext adds a datastore to the VDC * ctx: context for cancelation * zoneID: The Zone ID. * dsID: The Datastore ID.
func (*VDCController) AddGroup ¶
func (vc *VDCController) AddGroup(groupID int) error
AddGroup adds a group to the VDC * groupID: The group ID.
func (*VDCController) AddGroupContext ¶
func (vc *VDCController) AddGroupContext(ctx context.Context, groupID int) error
AddGroupContext adds a group to the VDC * ctx: context for cancelation * groupID: The group ID.
func (*VDCController) AddHost ¶
func (vc *VDCController) AddHost(zoneID, hostID int) error
AddHost adds a host to the VDC * zoneID: The Zone ID. * hostID: The Host ID.
func (*VDCController) AddHostContext ¶
func (vc *VDCController) AddHostContext(ctx context.Context, zoneID, hostID int) error
AddHostContext adds a host to the VDC * ctx: context for cancelation * zoneID: The Zone ID. * hostID: The Host ID.
func (*VDCController) AddVnet ¶
func (vc *VDCController) AddVnet(zoneID, vnetID int) error
AddVnet adds a vnet to the VDC * zoneID: The Zone ID. * vnetID: The Vnet ID.
func (*VDCController) AddVnetContext ¶
func (vc *VDCController) AddVnetContext(ctx context.Context, zoneID, vnetID int) error
AddVnetContext adds a vnet to the VDC * ctx: context for cancelation * zoneID: The Zone ID. * vnetID: The Vnet ID.
func (*VDCController) DelCluster ¶
func (vc *VDCController) DelCluster(zoneID, clusterID int) error
DelCluster deletes a cluster from the VDC * zoneID: The Zone ID. * clusterID: The Cluster ID.
func (*VDCController) DelClusterContext ¶
func (vc *VDCController) DelClusterContext(ctx context.Context, zoneID, clusterID int) error
DelClusterContext deletes a cluster from the VDC * ctx: context for cancelation * zoneID: The Zone ID. * clusterID: The Cluster ID.
func (*VDCController) DelDatastore ¶
func (vc *VDCController) DelDatastore(zoneID, dsID int) error
DelDatastore deletes a datastore from the VDC * zoneID: The Zone ID. * dsID: The Datastore ID.
func (*VDCController) DelDatastoreContext ¶
func (vc *VDCController) DelDatastoreContext(ctx context.Context, zoneID, dsID int) error
DelDatastoreContext deletes a datastore from the VDC * ctx: context for cancelation * zoneID: The Zone ID. * dsID: The Datastore ID.
func (*VDCController) DelGroup ¶
func (vc *VDCController) DelGroup(groupID int) error
DelGroup deletes a group from the VDC * groupID: The group ID.
func (*VDCController) DelGroupContext ¶
func (vc *VDCController) DelGroupContext(ctx context.Context, groupID int) error
DelGroupContext deletes a group from the VDC * ctx: context for cancelation * groupID: The group ID.
func (*VDCController) DelHost ¶
func (vc *VDCController) DelHost(zoneID, hostID int) error
DelHost deletes a host from the VDC * zoneID: The Zone ID. * hostID: The Host ID.
func (*VDCController) DelHostContext ¶
func (vc *VDCController) DelHostContext(ctx context.Context, zoneID, hostID int) error
DelHostContext deletes a host from the VDC * ctx: context for cancelation * zoneID: The Zone ID. * hostID: The Host ID.
func (*VDCController) DelVnet ¶
func (vc *VDCController) DelVnet(zoneID, vnetID int) error
DelVnet deletes a vnet from the VDC * zoneID: The Zone ID. * vnetID: The Vnet ID.
func (*VDCController) DelVnetContext ¶
func (vc *VDCController) DelVnetContext(ctx context.Context, zoneID, vnetID int) error
DelVnetContext deletes a vnet from the VDC * ctx: context for cancelation * zoneID: The Zone ID. * vnetID: The Vnet ID.
func (*VDCController) Delete ¶
func (vc *VDCController) Delete() error
Delete deletes the given VDC from the pool.
func (*VDCController) DeleteContext ¶
func (vc *VDCController) DeleteContext(ctx context.Context) error
DeleteContext deletes the given VDC from the pool.
func (*VDCController) Info ¶
func (vc *VDCController) Info(decrypt bool) (*vdc.VDC, error)
Info retrieves information for the VDC.
func (*VDCController) InfoContext ¶
InfoContext retrieves information for the VDC.
func (*VDCController) Rename ¶
func (vc *VDCController) Rename(newName string) error
Rename renames a VDC. * newName: The new name.
func (*VDCController) RenameContext ¶
func (vc *VDCController) RenameContext(ctx context.Context, newName string) error
RenameContext renames a VDC. * ctx: context for cancelation * newName: The new name.
func (*VDCController) Update ¶
func (vc *VDCController) Update(tpl string, uType parameters.UpdateType) error
Update adds vdc content.
- tpl: The new vdc contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
func (*VDCController) UpdateContext ¶
func (vc *VDCController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
UpdateContext adds vdc content.
- ctx: context for cancelation
- tpl: The new vdc contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
type VDCsController ¶
type VDCsController entitiesController
VDCsController is a controller for a pool of VDCs
func (*VDCsController) ByName ¶
func (c *VDCsController) ByName(name string) (int, error)
ByName returns a Vdc ID from name
func (*VDCsController) ByNameContext ¶
ByNameContext returns a Vdc ID from name
func (*VDCsController) Create ¶
func (vc *VDCsController) Create(tpl string, clusterID int) (int, error)
Create allocates a new vdc. It returns the new vdc ID.
- tpl: A string containing the template of the VDC. Syntax can be the usual attribute=value or XML.
- clusterID: The cluster ID. If it is -1, this virtual network won’t be added to any cluster
func (*VDCsController) CreateContext ¶
func (vc *VDCsController) CreateContext(ctx context.Context, tpl string, clusterID int) (int, error)
CreateContext allocates a new vdc. It returns the new vdc ID.
- ctx: context for cancelation
- tpl: A string containing the template of the VDC. Syntax can be the usual attribute=value or XML.
- clusterID: The cluster ID. If it is -1, this virtual network won’t be added to any cluster
func (*VDCsController) Info ¶
func (vc *VDCsController) Info() (*vdc.Pool, error)
Info returns a vdc pool. A connection to OpenNebula is performed.
func (*VDCsController) InfoContext ¶
InfoContext returns a vdc pool. A connection to OpenNebula is performed.
type VMController ¶
type VMController entityController
VMController is a controller for VM entities
func (*VMController) Action ¶
func (vc *VMController) Action(action string) error
Action is the generic method to run any action on the VM
func (*VMController) ActionContext ¶
func (vc *VMController) ActionContext(ctx context.Context, action string) error
ActionContext is the generic method to run any action on the VM
func (*VMController) AddSchedAction ¶
func (vc *VMController) AddSchedAction(action *vm.SchedAction) error
AddSchedAction adds a new scheduled action to the VM
func (*VMController) AddSchedActionContext ¶
func (vc *VMController) AddSchedActionContext(ctx context.Context, action *vm.SchedAction) error
AddSchedActionContext adds a new scheduled action to the VM
func (*VMController) AttachNIC ¶
func (vc *VMController) AttachNIC(tpl string) error
AttachNIC attaches new network interface to the virtual machine
func (*VMController) AttachNICContext ¶
func (vc *VMController) AttachNICContext(ctx context.Context, tpl string) error
AttachNICContext attaches new network interface to the virtual machine
func (*VMController) AttachPCI ¶
func (vc *VMController) AttachPCI(pciTemplate string) error
AttachPCI attaches new PCI to Virtual Machine
func (*VMController) AttachPCIContext ¶
func (vc *VMController) AttachPCIContext(ctx context.Context, pciTemplate string) error
AttachSGContext attaches new Security Group to Virtual Machine NIC
func (*VMController) AttachSG ¶
func (vc *VMController) AttachSG(nicID int, sgID int) error
AttachSG attaches new Security Group to Virtual Machine NIC
func (*VMController) AttachSGContext ¶
AttachSGContext attaches new Security Group to Virtual Machine NIC
func (*VMController) Backup ¶
func (vc *VMController) Backup(dsID int, reset bool) error
Backup Virtual Machine
func (*VMController) BackupCancel ¶
func (vc *VMController) BackupCancel() error
Cancel ongoing backup operation
func (*VMController) BackupCancelContext ¶
func (vc *VMController) BackupCancelContext(ctx context.Context) error
Cancel ongoing backup operation
func (*VMController) BackupContext ¶
Backup Virtual Machine
func (*VMController) Chmod ¶
func (vc *VMController) Chmod(perm shared.Permissions) error
Chmod changes the permissions of a VM. If any perm is -1 it will not change
func (*VMController) ChmodContext ¶
func (vc *VMController) ChmodContext(ctx context.Context, perm shared.Permissions) error
ChmodContext changes the permissions of a VM. If any perm is -1 it will not change
func (*VMController) Chown ¶
func (vc *VMController) Chown(uid, gid int) error
Chown changes the owner/group of a VM. If uid or gid is -1 it will not change
func (*VMController) ChownContext ¶
func (vc *VMController) ChownContext(ctx context.Context, uid, gid int) error
ChownContext changes the owner/group of a VM. If uid or gid is -1 it will not change
func (*VMController) DeleteSchedAction ¶
func (vc *VMController) DeleteSchedAction(actionId int) error
DeleteSchedAction deletes the actionId action
func (*VMController) DeleteSchedActionContext ¶
func (vc *VMController) DeleteSchedActionContext(ctx context.Context, actionId int) error
DeleteSchedActionContext deletes the actionId action
func (*VMController) Deploy ¶
func (vc *VMController) Deploy(hostID int, enforce bool, dsID int) error
Deploy in the selected hostID and/or dsID. Enforce to return error in case of overcommitment. Enforce is automatically enabled for non-oneadmin users. Set dsID to -1 to let OpenNebula choose the datastore.
func (*VMController) DeployContext ¶
func (vc *VMController) DeployContext(ctx context.Context, hostID int, enforce bool, dsID int) error
Deploy in the selected hostID and/or dsID. Enforce to return error in case of overcommitment. Enforce is automatically enabled for non-oneadmin users. Set dsID to -1 to let OpenNebula choose the datastore.
func (*VMController) DetachNIC ¶
func (vc *VMController) DetachNIC(nicID int) error
DetachNIC detaches a network interface from the virtual machine
func (*VMController) DetachNICContext ¶
func (vc *VMController) DetachNICContext(ctx context.Context, nicID int) error
DetachNICContext detaches a network interface from the virtual machine
func (*VMController) DetachPCI ¶
func (vc *VMController) DetachPCI(pciID int) error
DetachPCI detaches a PCI from Virtual Machine
func (*VMController) DetachPCIContext ¶
func (vc *VMController) DetachPCIContext(ctx context.Context, pciID int) error
DetachPCIContext detaches a PCI from Virtual Machine
func (*VMController) DetachSG ¶
func (vc *VMController) DetachSG(nicID int, sgID int) error
DetachSG detaches a Security Group from Virtual Machine NIC
func (*VMController) DetachSGContext ¶
DetachSGContext detaches a Security Group from Virtual Machine NIC
func (*VMController) Disk ¶
func (vc *VMController) Disk(id int) *VMDiskController
Disk returns a new vm disk controller.
func (*VMController) DiskAttach ¶
func (vc *VMController) DiskAttach(diskTemplate string) error
DiskAttach attach a new disk to the virtual machine. diskTemplate is a string containing a single DISK vector attribute. Syntax can be the usual attribute=value or XML
func (*VMController) DiskAttachContext ¶
func (vc *VMController) DiskAttachContext(ctx context.Context, diskTemplate string) error
DiskAttachContext attach a new disk to the virtual machine. diskTemplate is a string containing a single DISK vector attribute. Syntax can be the usual attribute=value or XML
func (*VMController) HoldContext ¶
func (vc *VMController) HoldContext(ctx context.Context) error
HoldContext action on the VM
func (*VMController) Info ¶
func (vc *VMController) Info(decrypt bool) (*vm.VM, error)
Info connects to OpenNebula and fetches the information of the VM
func (*VMController) InfoContext ¶
InfoContext connects to OpenNebula and fetches the information of the VM
func (*VMController) Lock ¶
func (vc *VMController) Lock(level shared.LockLevel) error
Lock locks the vm following lock level. See levels in locks.go.
func (*VMController) LockContext ¶
LockContext locks the vm following lock level. See levels in locks.go.
func (*VMController) MigrateContext ¶
func (vc *VMController) MigrateContext(ctx context.Context, hostID int, live, enforce bool, dsID int, migrationType int) error
MigrateContext a VM to a target host and/or to another ds
func (*VMController) Monitoring ¶
func (vc *VMController) Monitoring() (*vm.Monitoring, error)
Monitoring Returns the virtual machine monitoring records
func (*VMController) MonitoringContext ¶
func (vc *VMController) MonitoringContext(ctx context.Context) (*vm.Monitoring, error)
MonitoringContext Returns the virtual machine monitoring records
func (*VMController) PoweroffContext ¶
func (vc *VMController) PoweroffContext(ctx context.Context) error
PoweroffContext action on the VM
func (*VMController) PoweroffHard ¶
func (vc *VMController) PoweroffHard() error
PoweroffHard action on the VM
func (*VMController) PoweroffHardContext ¶
func (vc *VMController) PoweroffHardContext(ctx context.Context) error
PoweroffHardContext action on the VM
func (*VMController) RebootContext ¶
func (vc *VMController) RebootContext(ctx context.Context) error
RebootContext action on the VM
func (*VMController) RebootHard ¶
func (vc *VMController) RebootHard() error
RebootHard action on the VM
func (*VMController) RebootHardContext ¶
func (vc *VMController) RebootHardContext(ctx context.Context) error
RebootHardContext action on the VM
func (*VMController) Recover ¶
func (vc *VMController) Recover(op int) error
Recover recovers a stuck VM that is waiting for a driver operation
func (*VMController) RecoverContext ¶
func (vc *VMController) RecoverContext(ctx context.Context, op int) error
RecoverContext recovers a stuck VM that is waiting for a driver operation
func (*VMController) RecoverDelete ¶
func (vc *VMController) RecoverDelete() error
RecoverDelete forces a delete
func (*VMController) RecoverDeleteContext ¶
func (vc *VMController) RecoverDeleteContext(ctx context.Context) error
RecoverDeleteContext forces a delete
func (*VMController) RecoverDeleteRecreate ¶
func (vc *VMController) RecoverDeleteRecreate() error
RecoverDeleteRecreate forces a delete
func (*VMController) RecoverDeleteRecreateContext ¶
func (vc *VMController) RecoverDeleteRecreateContext(ctx context.Context) error
RecoverDeleteRecreateContext forces a delete
func (*VMController) RecoverFailure ¶
func (vc *VMController) RecoverFailure() error
RecoverFailure forces a success
func (*VMController) RecoverFailureContext ¶
func (vc *VMController) RecoverFailureContext(ctx context.Context) error
RecoverFailureContext forces a success
func (*VMController) RecoverRetry ¶
func (vc *VMController) RecoverRetry() error
RecoverRetry forces a success
func (*VMController) RecoverRetryContext ¶
func (vc *VMController) RecoverRetryContext(ctx context.Context) error
RecoverRetryContext forces a success
func (*VMController) RecoverSuccess ¶
func (vc *VMController) RecoverSuccess() error
RecoverSuccess forces a success
func (*VMController) RecoverSuccessContext ¶
func (vc *VMController) RecoverSuccessContext(ctx context.Context) error
RecoverSuccessContext forces a success
func (*VMController) ReleaseContext ¶
func (vc *VMController) ReleaseContext(ctx context.Context) error
ReleaseContext action on the VM
func (*VMController) Rename ¶
func (vc *VMController) Rename(newName string) error
Rename changes the name of a VM
func (*VMController) RenameContext ¶
func (vc *VMController) RenameContext(ctx context.Context, newName string) error
RenameContext changes the name of a VM
func (*VMController) ReschedContext ¶
func (vc *VMController) ReschedContext(ctx context.Context) error
ReschedContext action on the VM
func (*VMController) Resize ¶
func (vc *VMController) Resize(template string, enforce bool) error
Resize changes the capacity of the virtual machine
func (*VMController) ResizeContext ¶
ResizeContext changes the capacity of the virtual machine
func (*VMController) ResumeContext ¶
func (vc *VMController) ResumeContext(ctx context.Context) error
ResumeContext action on the VM
func (*VMController) SnapshotCreate ¶
func (vc *VMController) SnapshotCreate(name string) error
SnapshotCreate creates a new virtual machine snapshot. name can be empty
func (*VMController) SnapshotCreateContext ¶
func (vc *VMController) SnapshotCreateContext(ctx context.Context, name string) error
SnapshotCreateContext creates a new virtual machine snapshot. name can be empty
func (*VMController) SnapshotDelete ¶
func (vc *VMController) SnapshotDelete(snapID int) error
SnapshotDelete deletes a virtual machine snapshot
func (*VMController) SnapshotDeleteContext ¶
func (vc *VMController) SnapshotDeleteContext(ctx context.Context, snapID int) error
SnapshotDeleteContext deletes a virtual machine snapshot
func (*VMController) SnapshotRevert ¶
func (vc *VMController) SnapshotRevert(snapID int) error
SnapshotRevert reverts a virtual machine to a snapshot
func (*VMController) SnapshotRevertContext ¶
func (vc *VMController) SnapshotRevertContext(ctx context.Context, snapID int) error
SnapshotRevertContext reverts a virtual machine to a snapshot
func (*VMController) StopContext ¶
func (vc *VMController) StopContext(ctx context.Context) error
StopContext action on the VM
func (*VMController) SuspendContext ¶
func (vc *VMController) SuspendContext(ctx context.Context) error
SuspendContext action on the VM
func (*VMController) Terminate ¶
func (vc *VMController) Terminate() error
Terminate action on the VM
func (*VMController) TerminateContext ¶
func (vc *VMController) TerminateContext(ctx context.Context) error
TerminateContext action on the VM
func (*VMController) TerminateHard ¶
func (vc *VMController) TerminateHard() error
TerminateHard action on the VM
func (*VMController) TerminateHardContext ¶
func (vc *VMController) TerminateHardContext(ctx context.Context) error
TerminateHardContext action on the VM
func (*VMController) UndeployContext ¶
func (vc *VMController) UndeployContext(ctx context.Context) error
UndeployContext action on the VM
func (*VMController) UndeployHard ¶
func (vc *VMController) UndeployHard() error
UndeployHard action on the VM
func (*VMController) UndeployHardContext ¶
func (vc *VMController) UndeployHardContext(ctx context.Context) error
UndeployHardContext action on the VM
func (*VMController) UnlockContext ¶
func (vc *VMController) UnlockContext(ctx context.Context) error
UnlockContext unlocks the vm.
func (*VMController) Unresched ¶
func (vc *VMController) Unresched() error
Unresched action on the VM
func (*VMController) UnreschedContext ¶
func (vc *VMController) UnreschedContext(ctx context.Context) error
UnreschedContext action on the VM
func (*VMController) Update ¶
func (vc *VMController) Update(tpl string, uType parameters.UpdateType) error
Update adds vm content.
- tpl: The new vm contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
func (*VMController) UpdateConf ¶
func (vc *VMController) UpdateConf(tpl string) error
UpdateConf updates (appends) a set of supported configuration attributes in the VM template
func (*VMController) UpdateConfContext ¶
func (vc *VMController) UpdateConfContext(ctx context.Context, tpl string) error
UpdateConf updates (appends) a set of supported configuration attributes in the VM template
func (*VMController) UpdateContext ¶
func (vc *VMController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
UpdateContext adds vm content.
- ctx: context for cancelation
- tpl: The new vm contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
func (*VMController) UpdateSchedAction ¶
func (vc *VMController) UpdateSchedAction(action *vm.SchedAction) error
UpdateSchedAction updates the scheduled action specified by the action ID attribute
func (*VMController) UpdateSchedActionContext ¶
func (vc *VMController) UpdateSchedActionContext(ctx context.Context, action *vm.SchedAction) error
UpdateSchedActionContext updates the scheduled action specified by the action ID attribute
type VMDiskController ¶
type VMDiskController subEntityController
VMDiskController is a controller for VM entities
func (*VMDiskController) Detach ¶
func (vc *VMDiskController) Detach() error
Detach a disk from a virtual machine
func (*VMDiskController) DetachContext ¶
func (vc *VMDiskController) DetachContext(ctx context.Context) error
DetachContext a disk from a virtual machine
func (*VMDiskController) Resize ¶
func (vc *VMDiskController) Resize(size string) error
Resize a disk of a virtual machine
func (*VMDiskController) ResizeContext ¶
func (vc *VMDiskController) ResizeContext(ctx context.Context, size string) error
ResizeContext a disk of a virtual machine
func (*VMDiskController) Saveas ¶
func (vc *VMDiskController) Saveas(imageName, imageType string, snapID int) (int, error)
Saveas exports a disk to an image and returns the image ID. If imageType is empty the default one will be used. If snapID is -1 the current image state will be exported
func (*VMDiskController) SaveasContext ¶
func (vc *VMDiskController) SaveasContext(ctx context.Context, imageName, imageType string, snapID int) (int, error)
SaveasContext exports a disk to an image and returns the image ID. If imageType is empty the default one will be used. If snapID is -1 the current image state will be exported
func (*VMDiskController) SnapshotCreate ¶
func (vc *VMDiskController) SnapshotCreate(description string) (int, error)
SnapshotCreate will create a snapshot of the disk image
func (*VMDiskController) SnapshotCreateContext ¶
func (vc *VMDiskController) SnapshotCreateContext(ctx context.Context, description string) (int, error)
SnapshotCreateContext will create a snapshot of the disk image
func (*VMDiskController) SnapshotDelete ¶
func (vc *VMDiskController) SnapshotDelete(snapID int) error
SnapshotDelete will delete a snapshot
func (*VMDiskController) SnapshotDeleteContext ¶
func (vc *VMDiskController) SnapshotDeleteContext(ctx context.Context, snapID int) error
SnapshotDeleteContext will delete a snapshot
func (*VMDiskController) SnapshotRename ¶
func (vc *VMDiskController) SnapshotRename(snapID int, newName string) error
SnapshotRename renames a snapshot
func (*VMDiskController) SnapshotRenameContext ¶
func (vc *VMDiskController) SnapshotRenameContext(ctx context.Context, snapID int, newName string) error
SnapshotRenameContext renames a snapshot
func (*VMDiskController) SnapshotRevert ¶
func (vc *VMDiskController) SnapshotRevert(snapID int) error
SnapshotRevert will revert disk state to a previously taken snapshot
func (*VMDiskController) SnapshotRevertContext ¶
func (vc *VMDiskController) SnapshotRevertContext(ctx context.Context, snapID int) error
SnapshotRevertContext will revert disk state to a previously taken snapshot
type VMFilter ¶
type VMFilter struct { Who int StartID int EndID int State int // Pair is optional. Format: "KEY=VALUE" Pair string }
VMFilter groups filtering criterias for VMs
func NewVMFilter ¶
NewVMFilter return a VM filter
func NewVMFilterDefault ¶
func NewVMFilterDefault() *VMFilter
NewVMFilterDefault return a VM filter configured by default
type VMGroupController ¶
type VMGroupController entityController
VMGroupController is a controller for vm group entity
func (*VMGroupController) Chmod ¶
func (vc *VMGroupController) Chmod(perm shared.Permissions) error
Chmod changes the permission bits of a vmGroup.
func (*VMGroupController) ChmodContext ¶
func (vc *VMGroupController) ChmodContext(ctx context.Context, perm shared.Permissions) error
ChmodContext changes the permission bits of a vmGroup.
func (*VMGroupController) Chown ¶
func (vc *VMGroupController) Chown(userID, groupID int) error
Chown changes the ownership of a vmGroup. * userID: The User ID of the new owner. If set to -1, it will not change. * groupID: The Group ID of the new group. If set to -1, it will not change.
func (*VMGroupController) ChownContext ¶
func (vc *VMGroupController) ChownContext(ctx context.Context, userID, groupID int) error
ChownContext changes the ownership of a vmGroup. * ctx: context for cancelation * userID: The User ID of the new owner. If set to -1, it will not change. * groupID: The Group ID of the new group. If set to -1, it will not change.
func (*VMGroupController) Delete ¶
func (vc *VMGroupController) Delete() error
Delete deletes the given vmGroup from the pool.
func (*VMGroupController) DeleteContext ¶
func (vc *VMGroupController) DeleteContext(ctx context.Context) error
DeleteContext deletes the given vmGroup from the pool.
func (*VMGroupController) Info ¶
func (vc *VMGroupController) Info(decrypt bool) (*vmgroup.VMGroup, error)
Info retrieves information for the vm group.
func (*VMGroupController) InfoContext ¶
func (vc *VMGroupController) InfoContext(ctx context.Context, decrypt bool) (*vmgroup.VMGroup, error)
InfoContext retrieves information for the vm group.
func (*VMGroupController) Lock ¶
func (vc *VMGroupController) Lock(level shared.LockLevel) error
Lock locks the vmGroup following lock level. See levels in locks.go.
func (*VMGroupController) LockContext ¶
LockContext locks the vmGroup following lock level. See levels in locks.go. * ctx: context for cancelation
func (*VMGroupController) Rename ¶
func (vc *VMGroupController) Rename(newName string) error
Rename renames a vmGroup. * newName: The new name.
func (*VMGroupController) RenameContext ¶
func (vc *VMGroupController) RenameContext(ctx context.Context, newName string) error
RenameContext renames a vmGroup. * ctx: context for cancelation * newName: The new name.
func (*VMGroupController) RoleAdd ¶
func (vc *VMGroupController) RoleAdd(roleTemplate string) error
RolaAdd adds role to VM Group * roleTemplate: The new role content. Syntax can be the usual attribute=value or XML.
func (*VMGroupController) RoleAddContext ¶
func (vc *VMGroupController) RoleAddContext(ctx context.Context, roleTemplate string) error
RoleAddContext adds role to VM Group * ctx: context for cancelation * roleTemplate: The new role content. Syntax can be the usual attribute=value or XML.
func (*VMGroupController) RoleDelete ¶
func (vc *VMGroupController) RoleDelete(roleID int) error
RoleDelete deletes role from VM Group * roleID: ID of the role to delete
func (*VMGroupController) RoleDeleteContext ¶
func (vc *VMGroupController) RoleDeleteContext(ctx context.Context, roleID int) error
RoleDeleteContext deletes role from VM Group * roleID: ID of the role to delete
func (*VMGroupController) RoleUpdate ¶
func (vc *VMGroupController) RoleUpdate(roleID int, roleTemplate string) error
RoleUpdate updates VM Group role * ctx: context for cancelation * roleID: ID of the role to update * roleTemplate: The new role content. Syntax can be the usual attribute=value or XML.
func (*VMGroupController) RoleUpdateContext ¶
func (vc *VMGroupController) RoleUpdateContext(ctx context.Context, roleID int, roleTemplate string) error
RoleUpdateContext update VM Group role * roleID: ID of the role to update * roleTemplate: The new role content. Syntax can be the usual attribute=value or XML.
func (*VMGroupController) Unlock ¶
func (vc *VMGroupController) Unlock() error
Unlock unlocks the vmGroup.
func (*VMGroupController) UnlockContext ¶
func (vc *VMGroupController) UnlockContext(ctx context.Context) error
UnlockContext unlocks the vmGroup. * ctx: context for cancelation
func (*VMGroupController) Update ¶
func (vc *VMGroupController) Update(tpl string, uType int) error
Update replaces the vmGroup template content. * tpl: The new vmGroup template contents. Syntax can be the usual attribute=value or XML. * appendTemplate: Update type: 0: Replace the whole template. 1: Merge new template with the existing one.
func (*VMGroupController) UpdateContext ¶
UpdateContext replaces the vmGroup template content. * ctx: context for cancelation * tpl: The new vmGroup template contents. Syntax can be the usual attribute=value or XML. * appendTemplate: Update type: 0: Replace the whole template. 1: Merge new template with the existing one.
type VMGroupsController ¶
type VMGroupsController entitiesController
VMGroupsController is a controller for vm groups entities
func (*VMGroupsController) ByName ¶
func (c *VMGroupsController) ByName(name string, args ...int) (int, error)
ByName returns a VMGroup ID from name
func (*VMGroupsController) ByNameContext ¶
func (c *VMGroupsController) ByNameContext(ctx context.Context, name string, args ...int) (int, error)
ByNameContext returns a VMGroup ID from name
func (*VMGroupsController) Create ¶
func (vc *VMGroupsController) Create(tpl string) (int, error)
Create allocates a new vmGroup. It returns the new vmGroup ID.
func (*VMGroupsController) CreateContext ¶
CreateContext allocates a new vmGroup. It returns the new vmGroup ID.
func (*VMGroupsController) Info ¶
func (vc *VMGroupsController) Info(args ...int) (*vmgroup.Pool, error)
Info returns a vm group pool. A connection to OpenNebula is performed.
func (*VMGroupsController) InfoContext ¶
InfoContext returns a vm group pool. A connection to OpenNebula is performed.
type VMsController ¶
type VMsController entitiesController
VMsController is a controller for a pool of VMs
func (*VMsController) Accounting ¶
func (vc *VMsController) Accounting(filter, startTime, endTime int) error
Accounting returns the virtual machine history records filter flag:
-4: Resources belonging to the user's primary group -3: Resources belonging to the user -2: All resources -1: Resources belonging to the user and any of his groups >= 0: UID User's Resources
if startTime and/or endTime are -1 it means no limit
func (*VMsController) AccountingContext ¶
func (vc *VMsController) AccountingContext(ctx context.Context, filter, startTime, endTime int) error
AccountingContext returns the virtual machine history records ctx: context for cancelation filter flag:
-4: Resources belonging to the user's primary group -3: Resources belonging to the user -2: All resources -1: Resources belonging to the user and any of his groups >= 0: UID User's Resources
if startTime and/or endTime are -1 it means no limit
func (*VMsController) ByName ¶
func (c *VMsController) ByName(name string, args ...int) (int, error)
ByName returns VM ID from name
func (*VMsController) ByNameContext ¶
ByNameContext returns VM ID from name
func (*VMsController) CalculateShowback ¶
func (vc *VMsController) CalculateShowback(firstMonth, firstYear, lastMonth, lastYear int) error
CalculateShowback processes all the history records, and stores the monthly cost for each VM firstMonth: January is 1. Can be -1, in which case the time interval won't have
a left boundary.
firstYear: Can be -1, in which case the time interval won't have a left
boundary.
lastMonth: January is 1. Can be -1, in which case the time interval won't have
a right boundary.
lastYear: Can be -1, in which case the time interval won't have a right
boundary.
func (*VMsController) CalculateShowbackContext ¶
func (vc *VMsController) CalculateShowbackContext(ctx context.Context, firstMonth, firstYear, lastMonth, lastYear int) error
CalculateShowbackContext processes all the history records, and stores the monthly cost for each VM ctx: context for cancelation firstMonth: January is 1. Can be -1, in which case the time interval won't have
a left boundary.
firstYear: Can be -1, in which case the time interval won't have a left
boundary.
lastMonth: January is 1. Can be -1, in which case the time interval won't have
a right boundary.
lastYear: Can be -1, in which case the time interval won't have a right
boundary.
func (*VMsController) Create ¶
func (vc *VMsController) Create(template string, pending bool) (int, error)
Create allocates a new VM based on the template string provided. It returns the image ID
func (*VMsController) CreateContext ¶
func (vc *VMsController) CreateContext(ctx context.Context, template string, pending bool) (int, error)
CreateContext allocates a new VM based on the template string provided. It returns the image ID
func (*VMsController) Info ¶
func (vc *VMsController) Info(args ...int) (*vm.Pool, error)
Info returns a new VM pool. It accepts the scope of the query.
func (*VMsController) InfoContext ¶
InfoContext returns a new VM pool. It accepts the scope of the query.
func (*VMsController) InfoExtended ¶
func (vc *VMsController) InfoExtended(args ...int) (*vm.Pool, error)
InfoExtended connects to OpenNebula and fetches the whole VM_POOL information
func (*VMsController) InfoExtendedContext ¶
InfoExtendedContext connects to OpenNebula and fetches the whole VM_POOL information
func (*VMsController) InfoExtendedFilter ¶
func (vc *VMsController) InfoExtendedFilter(f *VMFilter) (*vm.Pool, error)
InfoExtendedFilter connects to OpenNebula and fetches the whole VM_POOL information
func (*VMsController) InfoExtendedFilterContext ¶
func (vc *VMsController) InfoExtendedFilterContext(ctx context.Context, f *VMFilter) (*vm.Pool, error)
InfoExtendedFilterContext connects to OpenNebula and fetches the whole VM_POOL information
func (*VMsController) InfoFilter ¶
func (vc *VMsController) InfoFilter(f *VMFilter) (*vm.Pool, error)
InfoFilter returns a new VM pool. It accepts the scope of the query.
func (*VMsController) InfoFilterContext ¶
InfoFilterContext returns a new VM pool. It accepts the scope of the query.
func (*VMsController) InfoSet ¶
InfoSet connects to OpenNebula and fetches a VM_POOL containing the VMs in vmIds
func (*VMsController) InfoSetContext ¶
func (vc *VMsController) InfoSetContext(ctx context.Context, vmIds string, extended bool) (*vm.Pool, error)
InfoSetContext connects to OpenNebula and fetches a VM_POOL containing the VMs in vmIds
func (*VMsController) Monitoring ¶
func (vc *VMsController) Monitoring(filter, num int) (*vm.PoolMonitoring, error)
Monitoring returns all the virtual machine monitoring records filter flag: -4: Resources belonging to the user's primary group -3: Resources belonging to the user -2: All resources -1: Resources belonging to the user and any of his groups >= 0: UID User's Resources num: Retrieve monitor records in the last num seconds. 0 just the last record, -1 all records
func (*VMsController) MonitoringContext ¶
func (vc *VMsController) MonitoringContext(ctx context.Context, filter, num int) (*vm.PoolMonitoring, error)
MonitoringContext returns all the virtual machine monitoring records ctx: context for cancelation filter flag: -4: Resources belonging to the user's primary group -3: Resources belonging to the user -2: All resources -1: Resources belonging to the user and any of his groups >= 0: UID User's Resources num: Retrieve monitor records in the last num seconds. 0 just the last record, -1 all records
func (*VMsController) Showback ¶
func (vc *VMsController) Showback(filter, firstMonth, firstYear, lastMonth, lastYear int) error
Showback returns the virtual machine showback records filter flag
<= -3: Connected user's resources -2: All resources -1: Connected user's and his group's resources >= 0: UID User's Resources
firstMonth: January is 1. Can be -1, in which case the time interval won't have
a left boundary.
firstYear: Can be -1, in which case the time interval won't have a left
boundary.
lastMonth: January is 1. Can be -1, in which case the time interval won't have
a right boundary.
lastYear: Can be -1, in which case the time interval won't have a right
boundary.
func (*VMsController) ShowbackContext ¶
func (vc *VMsController) ShowbackContext(ctx context.Context, filter, firstMonth, firstYear, lastMonth, lastYear int) error
ShowbackContext returns the virtual machine showback records ctx: context for cancelation filter flag
<= -3: Connected user's resources -2: All resources -1: Connected user's and his group's resources >= 0: UID User's Resources
firstMonth: January is 1. Can be -1, in which case the time interval won't have
a left boundary.
firstYear: Can be -1, in which case the time interval won't have a left
boundary.
lastMonth: January is 1. Can be -1, in which case the time interval won't have
a right boundary.
lastYear: Can be -1, in which case the time interval won't have a right
boundary.
type VNTemplateController ¶
type VNTemplateController entityController
VNTemplateController is a controller for VNTemplate entities
func (*VNTemplateController) Chmod ¶
func (vc *VNTemplateController) Chmod(perm shared.Permissions) error
Chmod changes the permissions of a vntemplate. If any perm is -1 it will not change
func (*VNTemplateController) ChmodContext ¶
func (vc *VNTemplateController) ChmodContext(ctx context.Context, perm shared.Permissions) error
ChmodContext changes the permissions of a vntemplate. If any perm is -1 it will not change
func (*VNTemplateController) Chown ¶
func (vc *VNTemplateController) Chown(uid, gid int) error
Chown changes the owner/group of a vntemplate. If uid or gid is -1 it will not change
func (*VNTemplateController) ChownContext ¶
func (vc *VNTemplateController) ChownContext(ctx context.Context, uid, gid int) error
ChownContext changes the owner/group of a vntemplate. If uid or gid is -1 it will not change
func (*VNTemplateController) Clone ¶
func (vc *VNTemplateController) Clone(name string) error
Clone an existing vntemplate.
func (*VNTemplateController) CloneContext ¶
func (vc *VNTemplateController) CloneContext(ctx context.Context, name string) error
CloneContext an existing vntemplate.
func (*VNTemplateController) Create ¶
func (vc *VNTemplateController) Create(vntemplate string) (int, error)
Create allocates a new vntemplate. It returns the new vntemplate ID.
func (*VNTemplateController) CreateContext ¶
CreateContext allocates a new vntemplate. It returns the new vntemplate ID.
func (*VNTemplateController) Delete ¶
func (vc *VNTemplateController) Delete() error
Delete will remove the vntemplate from OpenNebula.
func (*VNTemplateController) DeleteContext ¶
func (vc *VNTemplateController) DeleteContext(ctx context.Context) error
DeleteContext will remove the vntemplate from OpenNebula.
func (*VNTemplateController) Info ¶
func (vc *VNTemplateController) Info(decrypt bool) (*vntemplate.VNTemplate, error)
Info connects to OpenNebula and fetches the information of the VNTemplate
func (*VNTemplateController) InfoContext ¶
func (vc *VNTemplateController) InfoContext(ctx context.Context, decrypt bool) (*vntemplate.VNTemplate, error)
InfoContext connects to OpenNebula and fetches the information of the VNTemplate
func (*VNTemplateController) Instantiate ¶
func (vc *VNTemplateController) Instantiate(name string, extra string) (int, error)
Instantiate will instantiate the template
func (*VNTemplateController) InstantiateContext ¶
func (vc *VNTemplateController) InstantiateContext(ctx context.Context, name string, extra string) (int, error)
InstantiateContext will instantiate the template
func (*VNTemplateController) Lock ¶
func (vc *VNTemplateController) Lock(level shared.LockLevel) error
Lock an existing vntemplate. See levels in locks.go.
func (*VNTemplateController) LockContext ¶
LockContext an existing vntemplate. See levels in locks.go.
func (*VNTemplateController) Rename ¶
func (vc *VNTemplateController) Rename(newName string) error
Rename changes the name of vntemplate
func (*VNTemplateController) RenameContext ¶
func (vc *VNTemplateController) RenameContext(ctx context.Context, newName string) error
RenameContext changes the name of vntemplate
func (*VNTemplateController) Unlock ¶
func (vc *VNTemplateController) Unlock() error
Unlock an existing vntemplate
func (*VNTemplateController) UnlockContext ¶
func (vc *VNTemplateController) UnlockContext(ctx context.Context) error
UnlockContext an existing vntemplate
func (*VNTemplateController) Update ¶
func (vc *VNTemplateController) Update(tpl string, uType parameters.UpdateType) error
Update adds vntemplate content.
- tpl: The new vntemplate contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
func (*VNTemplateController) UpdateContext ¶
func (vc *VNTemplateController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
UpdateContext adds vntemplate content.
- ctx: context for cancelation
- tpl: The new vntemplate contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
type VNTemplatesController ¶
type VNTemplatesController entitiesController
VNTemplatesController is a controller for a pool of VNTemplate
func (*VNTemplatesController) ByName ¶
func (c *VNTemplatesController) ByName(name string) (int, error)
ByName returns a VNTemplate id from name
func (*VNTemplatesController) ByNameContext ¶
ByNameContext returns a VNTemplate id from name
func (*VNTemplatesController) Info ¶
func (vc *VNTemplatesController) Info(args ...int) (*vntemplate.Pool, error)
Info returns a vntemplate pool. A connection to OpenNebula is performed.
func (*VNTemplatesController) InfoContext ¶
func (vc *VNTemplatesController) InfoContext(ctx context.Context, args ...int) (*vntemplate.Pool, error)
InfoContext returns a vntemplate pool. A connection to OpenNebula is performed.
type VirtualNetworkController ¶
type VirtualNetworkController entityController
VirtualNetworkController is a controller for VirtualNetwork entities
func (*VirtualNetworkController) AddAR ¶
func (vc *VirtualNetworkController) AddAR(tpl string) error
AddAR adds address ranges to a virtual network. * tpl: template of the address ranges to add. Syntax can be the usual attribute=value or XML
func (*VirtualNetworkController) AddARContext ¶
func (vc *VirtualNetworkController) AddARContext(ctx context.Context, tpl string) error
AddARContext adds address ranges to a virtual network. * ctx: context for cancelation * tpl: template of the address ranges to add. Syntax can be the usual attribute=value or XML
func (*VirtualNetworkController) Chmod ¶
func (vc *VirtualNetworkController) Chmod(perm shared.Permissions) error
Chmod changes the permission bits of a virtual network.
func (*VirtualNetworkController) ChmodContext ¶
func (vc *VirtualNetworkController) ChmodContext(ctx context.Context, perm shared.Permissions) error
ChmodContext changes the permission bits of a virtual network.
func (*VirtualNetworkController) Chown ¶
func (vc *VirtualNetworkController) Chown(userID, groupID int) error
Chown changes the ownership of a virtual network. * userID: The User ID of the new owner. If set to -1, it will not change. * groupID: The Group ID of the new group. If set to -1, it will not change.
func (*VirtualNetworkController) ChownContext ¶
func (vc *VirtualNetworkController) ChownContext(ctx context.Context, userID, groupID int) error
ChownContext changes the ownership of a virtual network. * ctx: context for cancelation * userID: The User ID of the new owner. If set to -1, it will not change. * groupID: The Group ID of the new group. If set to -1, it will not change.
func (*VirtualNetworkController) Delete ¶
func (vc *VirtualNetworkController) Delete() error
Delete deletes the given virtual network from the pool.
func (*VirtualNetworkController) DeleteContext ¶
func (vc *VirtualNetworkController) DeleteContext(ctx context.Context) error
DeleteContext deletes the given virtual network from the pool.
func (*VirtualNetworkController) FreeAR ¶
func (vc *VirtualNetworkController) FreeAR(arID int) error
FreeAR frees a reserved address range from a virtual network. * arID: ID of the address range to free.
func (*VirtualNetworkController) FreeARContext ¶
func (vc *VirtualNetworkController) FreeARContext(ctx context.Context, arID int) error
FreeARContext frees a reserved address range from a virtual network. * ctx: context for cancelation * arID: ID of the address range to free.
func (*VirtualNetworkController) Hold ¶
func (vc *VirtualNetworkController) Hold(tpl string) error
Hold holds a virtual network Lease as used. * tpl: template of the lease to hold
func (*VirtualNetworkController) HoldContext ¶
func (vc *VirtualNetworkController) HoldContext(ctx context.Context, tpl string) error
HoldContext holds a virtual network Lease as used. * ctx: context for cancelation * tpl: template of the lease to hold
func (*VirtualNetworkController) Info ¶
func (vc *VirtualNetworkController) Info(decrypt bool) (*vn.VirtualNetwork, error)
Info retrieves information for the virtual network.
func (*VirtualNetworkController) InfoContext ¶
func (vc *VirtualNetworkController) InfoContext(ctx context.Context, decrypt bool) (*vn.VirtualNetwork, error)
InfoContext retrieves information for the virtual network.
func (*VirtualNetworkController) Lock ¶
func (vc *VirtualNetworkController) Lock(level shared.LockLevel) error
Lock locks the vn following lock level. See levels in locks.go.
func (*VirtualNetworkController) LockContext ¶
LockContext locks the vn following lock level. See levels in locks.go.
func (*VirtualNetworkController) Recover ¶
func (vc *VirtualNetworkController) Recover(op int) error
Recover recovers a stuck Virtual Network * op: (0) failure, (1) success, (2) retry, (3) delete
func (*VirtualNetworkController) RecoverContext ¶
func (vc *VirtualNetworkController) RecoverContext(ctx context.Context, op int) error
RecoverContext recovers a stuck Virtual Network * ctx: context for cancelation * op: (0) failure, (1) success, (2) retry, (3) delete
func (*VirtualNetworkController) RecoverDelete ¶
func (vc *VirtualNetworkController) RecoverDelete() error
RecoverDelete delete the network, call driver cleanup action
func (*VirtualNetworkController) RecoverFailure ¶
func (vc *VirtualNetworkController) RecoverFailure() error
RecoverFailure forces a failure
func (*VirtualNetworkController) RecoverSuccess ¶
func (vc *VirtualNetworkController) RecoverSuccess() error
RecoverSuccess forces a success
func (*VirtualNetworkController) Release ¶
func (vc *VirtualNetworkController) Release(tpl string) error
Release releases a virtual network Lease on hold. * tpl: template of the lease to release
func (*VirtualNetworkController) ReleaseContext ¶
func (vc *VirtualNetworkController) ReleaseContext(ctx context.Context, tpl string) error
ReleaseContext releases a virtual network Lease on hold. * ctx: context for cancelation * tpl: template of the lease to release
func (*VirtualNetworkController) Rename ¶
func (vc *VirtualNetworkController) Rename(newName string) error
Rename renames a virtual network. * newName: The new name.
func (*VirtualNetworkController) RenameContext ¶
func (vc *VirtualNetworkController) RenameContext(ctx context.Context, newName string) error
RenameContext renames a virtual network. * ctx: context for cancelation * newName: The new name.
func (*VirtualNetworkController) Reserve ¶
func (vc *VirtualNetworkController) Reserve(tpl string) (int, error)
Reserve reserve network addresses. It returns the Reserved Virtual Network ID * tpl: Template
func (*VirtualNetworkController) ReserveContext ¶
ReserveContext reserve network addresses. It returns the Reserved Virtual Network ID * ctx: context for cancelation * tpl: Template
func (*VirtualNetworkController) RmAR ¶
func (vc *VirtualNetworkController) RmAR(arID int) error
RmAR removes an address range from a virtual network. * arID: ID of the address range to remove.
func (*VirtualNetworkController) RmARContext ¶
func (vc *VirtualNetworkController) RmARContext(ctx context.Context, arID int) error
RmARContext removes an address range from a virtual network. * ctx: context for cancelation * arID: ID of the address range to remove.
func (*VirtualNetworkController) Unlock ¶
func (vc *VirtualNetworkController) Unlock() error
Unlock unlocks the vn.
func (*VirtualNetworkController) UnlockContext ¶
func (vc *VirtualNetworkController) UnlockContext(ctx context.Context) error
UnlockContext unlocks the vn.
func (*VirtualNetworkController) Update ¶
func (vc *VirtualNetworkController) Update(tpl string, uType parameters.UpdateType) error
Update adds virtual network content.
- tpl: The new virtual network contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
func (*VirtualNetworkController) UpdateAR ¶
func (vc *VirtualNetworkController) UpdateAR(tpl string) error
UpdateAR updates the attributes of an address range. * tpl: template of the address ranges to update. Syntax can be the usual attribute=value or XML
func (*VirtualNetworkController) UpdateARContext ¶
func (vc *VirtualNetworkController) UpdateARContext(ctx context.Context, tpl string) error
UpdateARContext updates the attributes of an address range. * ctx: context for cancelation * tpl: template of the address ranges to update. Syntax can be the usual attribute=value or XML
func (*VirtualNetworkController) UpdateContext ¶
func (vc *VirtualNetworkController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
UpdateContext adds virtual network content.
- ctx: context for cancelation
- tpl: The new virtual network contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
type VirtualNetworksController ¶
type VirtualNetworksController entitiesController
VirtualNetworksController is a controller for a pool of VirtualNetworks
func (*VirtualNetworksController) ByName ¶
func (c *VirtualNetworksController) ByName(name string, args ...int) (int, error)
ByName returns a VirtualNetwork ID from name
func (*VirtualNetworksController) ByNameContext ¶
func (c *VirtualNetworksController) ByNameContext(ctx context.Context, name string, args ...int) (int, error)
ByNameContext returns a VirtualNetwork ID from name
func (*VirtualNetworksController) Create ¶
func (vc *VirtualNetworksController) Create(tpl string, clusterID int) (int, error)
Create allocates a new virtualnetwork. It returns the new virtualnetwork ID. * tpl: template of the virtualnetwork * clusterID: The cluster ID. If it is -1, the default one will be used.
func (*VirtualNetworksController) CreateContext ¶
func (vc *VirtualNetworksController) CreateContext(ctx context.Context, tpl string, clusterID int) (int, error)
CreateContext allocates a new virtualnetwork. It returns the new virtualnetwork ID. * ctx: context for cancelation * tpl: template of the virtualnetwork * clusterID: The cluster ID. If it is -1, the default one will be used.
func (*VirtualNetworksController) Info ¶
func (vc *VirtualNetworksController) Info(args ...int) (*vn.Pool, error)
Info returns a virtualnetwork pool.
func (*VirtualNetworksController) InfoContext ¶
func (vc *VirtualNetworksController) InfoContext(ctx context.Context, args ...int) (*vn.Pool, error)
InfoContext returns a virtualnetwork pool.
type VirtualRouterController ¶
type VirtualRouterController entityController
VirtualRouterController is a controller for VirtualRouter entities
func (*VirtualRouterController) AttachNic ¶
func (vc *VirtualRouterController) AttachNic(tpl string) error
AttachNic attaches a new network interface to the virtual router and the virtual machines. * tpl: NIC template string
func (*VirtualRouterController) AttachNicContext ¶
func (vc *VirtualRouterController) AttachNicContext(ctx context.Context, tpl string) error
AttachNicContext attaches a new network interface to the virtual router and the virtual machines. * ctx: context for cancelation * tpl: NIC template string
func (*VirtualRouterController) Chmod ¶
func (vc *VirtualRouterController) Chmod(perm shared.Permissions) error
Chmod changes the permissions of a virtual router. If any perm is -1 it will not change
func (*VirtualRouterController) ChmodContext ¶
func (vc *VirtualRouterController) ChmodContext(ctx context.Context, perm shared.Permissions) error
ChmodContext changes the permissions of a virtual router. If any perm is -1 it will not change
func (*VirtualRouterController) Chown ¶
func (vc *VirtualRouterController) Chown(uid, gid int) error
Chown changes the owner/group of a virtual router. If uid or gid is -1 it will not change
func (*VirtualRouterController) ChownContext ¶
func (vc *VirtualRouterController) ChownContext(ctx context.Context, uid, gid int) error
ChownContext changes the owner/group of a virtual router. If uid or gid is -1 it will not change
func (*VirtualRouterController) Delete ¶
func (vc *VirtualRouterController) Delete() error
Delete will remove the virtual router from OpenNebula.
func (*VirtualRouterController) DeleteContext ¶
func (vc *VirtualRouterController) DeleteContext(ctx context.Context) error
DeleteContext will remove the virtual router from OpenNebula.
func (*VirtualRouterController) DetachNic ¶
func (vc *VirtualRouterController) DetachNic(nicid int) error
DetachNic detaches a network interface from the virtual router and the virtual machines * nicid: NIC ID to detach
func (*VirtualRouterController) DetachNicContext ¶
func (vc *VirtualRouterController) DetachNicContext(ctx context.Context, nicid int) error
DetachNicContext detaches a network interface from the virtual router and the virtual machines * ctx: context for cancelation * nicid: NIC ID to detach
func (*VirtualRouterController) Info ¶
func (vc *VirtualRouterController) Info(decrypt bool) (*vr.VirtualRouter, error)
Info connects to OpenNebula and fetches the information of the VirtualRouter
func (*VirtualRouterController) InfoContext ¶
func (vc *VirtualRouterController) InfoContext(ctx context.Context, decrypt bool) (*vr.VirtualRouter, error)
InfoContext connects to OpenNebula and fetches the information of the VirtualRouter
func (*VirtualRouterController) Instantiate ¶
func (vc *VirtualRouterController) Instantiate(number, tplid int, name string, hold bool, extra string) (int, error)
Instantiate will instantiate the virtual router. It returns the ID of the new VM * number: Number of VMs to instantiate. * tplid: VM Template id to instantiate. * name: Name for the VM instances. If it is an empty string OpenNebula will set a default name. Wildcard %i can be used. * hold: False to create the VM on pending (default), True to create it on hold. * extra: A string containing an extra template to be merged with the one being instantiated. It can be empty. Syntax can be the usual attribute=value or XML.
func (*VirtualRouterController) InstantiateContext ¶
func (vc *VirtualRouterController) InstantiateContext(ctx context.Context, number, tplid int, name string, hold bool, extra string) (int, error)
InstantiateContext will instantiate the virtual router. It returns the ID of the new VM * ctx: context for cancelation * number: Number of VMs to instantiate. * tplid: VM Template id to instantiate. * name: Name for the VM instances. If it is an empty string OpenNebula will set a default name. Wildcard %i can be used. * hold: False to create the VM on pending (default), True to create it on hold. * extra: A string containing an extra template to be merged with the one being instantiated. It can be empty. Syntax can be the usual attribute=value or XML.
func (*VirtualRouterController) Lock ¶
func (vc *VirtualRouterController) Lock(level shared.LockLevel) error
Lock locks the virtual router depending on blocking level. See levels in locks.go.
func (*VirtualRouterController) LockContext ¶
LockContext locks the virtual router depending on blocking level. See levels in locks.go.
func (*VirtualRouterController) Rename ¶
func (vc *VirtualRouterController) Rename(newName string) error
Rename changes the name of virtual router
func (*VirtualRouterController) RenameContext ¶
func (vc *VirtualRouterController) RenameContext(ctx context.Context, newName string) error
RenameContext changes the name of virtual router
func (*VirtualRouterController) Unlock ¶
func (vc *VirtualRouterController) Unlock() error
Unlock unlocks the virtual router.
func (*VirtualRouterController) UnlockContext ¶
func (vc *VirtualRouterController) UnlockContext(ctx context.Context) error
UnlockContext unlocks the virtual router.
func (*VirtualRouterController) Update ¶
func (vc *VirtualRouterController) Update(tpl string, uType parameters.UpdateType) error
Update adds virtual router content.
- tpl: The new virtual router contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
func (*VirtualRouterController) UpdateContext ¶
func (vc *VirtualRouterController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
UpdateContext adds virtual router content.
- ctx: context for cancelation
- tpl: The new virtual router contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
type VirtualRoutersController ¶
type VirtualRoutersController entitiesController
VirtualRoutersController is a controller for a pool of VirtualRouters
func (*VirtualRoutersController) Create ¶
func (vc *VirtualRoutersController) Create(tpl string) (int, error)
Create allocates a new virtual router. It returns the new Virtual Router ID * tpl: template of the marketplace
func (*VirtualRoutersController) CreateContext ¶
CreateContext allocates a new virtual router. It returns the new Virtual Router ID * ctx: context for cancelation * tpl: template of the marketplace
func (*VirtualRoutersController) Info ¶
func (vc *VirtualRoutersController) Info(args ...int) (*vr.Pool, error)
Info returns a virtual router pool. A connection to OpenNebula is performed.
func (*VirtualRoutersController) InfoContext ¶
InfoContext returns a virtual router pool. A connection to OpenNebula is performed.
type ZoneController ¶
type ZoneController entityController
ZoneController is a controller for Zone entities
func (*ZoneController) Delete ¶
func (zc *ZoneController) Delete() error
Delete deletes the given zone from the pool.
func (*ZoneController) DeleteContext ¶
func (zc *ZoneController) DeleteContext(ctx context.Context) error
DeleteContext deletes the given zone from the pool.
func (*ZoneController) Info ¶
func (zc *ZoneController) Info(decrypt bool) (*zone.Zone, error)
Info retrieves information for the zone.
func (*ZoneController) InfoContext ¶
InfoContext retrieves information for the zone.
func (*ZoneController) Rename ¶
func (zc *ZoneController) Rename(newName string) error
Rename renames a zone. * newName: The new name.
func (*ZoneController) RenameContext ¶
func (zc *ZoneController) RenameContext(ctx context.Context, newName string) error
RenameContext renames a zone. * ctx: context for cancelation * newName: The new name.
func (*ZoneController) Update ¶
func (zc *ZoneController) Update(tpl string, uType parameters.UpdateType) error
Update adds zone content.
- tpl: The new zone contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
func (*ZoneController) UpdateContext ¶
func (zc *ZoneController) UpdateContext(ctx context.Context, tpl string, uType parameters.UpdateType) error
UpdateContext adds zone content.
- ctx: context for cancelation
- tpl: The new zone contents. Syntax can be the usual attribute=value or XML.
- uType: Update type: Replace: Replace the whole template. Merge: Merge new template with the existing one.
type ZonesController ¶
type ZonesController entitiesController
ZonesController is a controller for a pool of Zones
func (*ZonesController) ByName ¶
func (c *ZonesController) ByName(name string) (int, error)
ByName returns a zone id from name
func (*ZonesController) ByNameContext ¶
ByNameContext returns a zone id from name
func (*ZonesController) Create ¶
func (zc *ZonesController) Create(tpl string, clusterID int) (int, error)
Create allocates a new zone. It returns the new zc.ID.
- tpl: A string containing the template of the ZONE. Syntax can be the usual attribute=value or XML.
- clusterID: The id of the cluster. If -1, the default one will be used
func (*ZonesController) CreateContext ¶
func (zc *ZonesController) CreateContext(ctx context.Context, tpl string, clusterID int) (int, error)
CreateContext allocates a new zone. It returns the new zc.ID.
- ctx: context for cancelation
- tpl: A string containing the template of the ZONE. Syntax can be the usual attribute=value or XML.
- clusterID: The id of the cluster. If -1, the default one will be used
func (*ZonesController) Info ¶
func (zc *ZonesController) Info() (*zone.Pool, error)
Info returns a zone pool. A connection to OpenNebula is performed.
func (*ZonesController) InfoContext ¶
InfoContext returns a zone pool. A connection to OpenNebula is performed.
func (*ZonesController) ServerRaftStatus ¶
func (zc *ZonesController) ServerRaftStatus() (*zone.ServerRaftStatus, error)
ServerRaftStatus give the raft status of the server behind the current RPC endpoint. To get endpoints make an info call.
func (*ZonesController) ServerRaftStatusContext ¶
func (zc *ZonesController) ServerRaftStatusContext(ctx context.Context) (*zone.ServerRaftStatus, error)
ServerRaftStatusContext give the raft status of the server behind the current RPC endpoint. To get endpoints make an info call.
Source Files ¶
- acl.go
- backupjob.go
- client.go
- cluster.go
- controller.go
- datastore.go
- document.go
- filter.go
- flow_client.go
- group.go
- hook.go
- hooklog.go
- host.go
- http_client.go
- image.go
- marketplace.go
- marketplaceapp.go
- securitygroup.go
- service.go
- service_template.go
- template.go
- user.go
- vdc.go
- version.go
- virtualnetwork.go
- virtualrouter.go
- vm.go
- vmgroup.go
- vntemplate.go
- zone.go
Directories ¶
Path | Synopsis |
---|---|
schemas
|
|
vm/keys
-------------------------------------------------------------------------- Copyright 2002-2023, OpenNebula Project, OpenNebula Systems
|
-------------------------------------------------------------------------- Copyright 2002-2023, OpenNebula Project, OpenNebula Systems |