yakumo.nova.v2.server.Resource

Package yakumo :: Package nova :: Package v2 :: Module server :: Class Resource |
[hide private]
[frames] | no frames]

# Class Resource

source code

       object --+
                |
    base.Resource --+
                    |
                   Resource

Resource class for servers in Compute API v2

Instance Methods | [hide private]
None |
wait_for_finished(self, count=10, interval=10) Wait for task finished | source code
None |
start(self) Start a server | source code
None |
stop(self) Stop a server | source code
None |
reboot(self, force=False) Reboot a server | source code
None |
pause(self) Pause a server (save to RAM if server is a VM) | source code
None |
unpause(self) Unpause a server | source code
None |
suspend(self) Suspend a server (save to disk if server is a VM) | source code
None |
resume(self) Resume a server | source code
None |
reset_network(self) Reset networking of a server | source code
None |
inject_network_info(self) Inject network information to a server | source code
None |
lock(self) Lock a server | source code
None |
unlock(self) Unlock a server | source code
None |
force_delete(self) Force to delete a server | source code
None |
restore(self) Restore a defered-deleted server if available | source code
None |
rescue(self, password=None) Create rescue environment for the server | source code
None |
unrescue(self) Terminate the rescue environment | source code
None |
shelve(self) Shelve a running server | source code
None |
unshelve(self) Restore a shelved server | source code
None |
delete_shelve(self) Delete a shelved server | source code
None |
create_image(self, name=None, metadata=None) Create server image | source code
None |
backup(self, name=None, backup_type=None, rotation=None) Create server backup | source code
None |
live_migration(self, host=None, disk_over_commit=False) Move a server to another host without rebooting | source code
None |
block_migration(self, host=None, disk_over_commit=False) Move a server to another host without rebooting, with disk copy | source code
None |
evacuate(self, host=None, password=None, shared=True) Move a server to another host without rebooting, with disk copy | source code
None |
reset_status(self, status=None) Move a server to another host | source code
dict |
get_vnc_console(self, type=`'``novnc``'`) Get VNC console | source code
dict |
get_console_log(self, lines=50) Get console output | source code
dict |
get_diagnostics(self) Get diagnostics | source code
None |
resize(self, flavor=None, disk_config=`'``AUTO``'`) Get console output | source code
None |
confirm_resize(self) Confirm resizing of a server | source code
None |
revert_resize(self) Revert resizing of a server | source code
None |
rebuild(self, image=None, disk_config=`'``AUTO``'`, password=None, ipv4=None, ipv6=None, personality=None) Rebuild a server | source code
dict |
get_actions(self) Get instance actions | source code
dict |
get_password(self) Get instance password | source code
None |
clear_password(self) Clear instance password | source code
[str] |
get_security_groups(self) Get security group list for a server | source code
dict |
get_metadata(self) Get instance metadata | source code
None |
set_metadata(self, **metadata) Update instance metadata | source code
None |
unset_metadata(self, *keys) Delete instance metadata | source code
Inherited from `base.Resource`: `__eq__`, `__getattr__`, `__init__`, `__ne__`, `__repr__`, `__str__`, `delete`, `get_attrs`, `get_id`, `reload`, `update` Inherited from `base.Resource` (private): `_clear_attrs`, `_set_attrs` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Class Variables | [hide private]
| _sub_manager_list = ``{``'``interface``'``:` <class 'yakumo.nova.v2.inter`...``
Inherited from `base.Resource` (private): `_attrs`, `_id`, `_loaded`, `_stable_state`, `_state_attr`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### wait_for_finished(self, count=10, interval=10) | source code
Wait for task finished Parameters: `count` (int) - Maximum polling time `interval` (int) - Polling interval in seconds Returns: None Overrides: base.Resource.wait_for_finished

### reboot(self, force=False) | source code
Reboot a server Parameters: `force` - Whether reboot type is hard or soft. force=True means hard reboot. `type` (bool) Returns: None

### rescue(self, password=None) | source code
Create rescue environment for the server Parameters: `password` (str) - password of the rescue OS Returns: None

### create_image(self, name=None, metadata=None) | source code
Create server image Parameters: `name` (str) - Image name `metadata` (dict) - Metadata Returns: None

### backup(self, name=None, backup_type=None, rotation=None) | source code
Create server backup Parameters: `name` (str) - name of the backup data `backup_type` (str) - 'daily' or 'weekly' `rotation` (int) - number of backups to maintain Returns: None

### live_migration(self, host=None, disk_over_commit=False) | source code
Move a server to another host without rebooting Parameters: `host` (str) - Destination host `disk_over_commit` (bool) - do disk over commit or not Returns: None

### block_migration(self, host=None, disk_over_commit=False) | source code
Move a server to another host without rebooting, with disk copy Parameters: `host` (str) - Destination host `disk_over_commit` (bool) - do disk over commit or not Returns: None

### evacuate(self, host=None, password=None, shared=True) | source code
Move a server to another host without rebooting, with disk copy Parameters: `host` (str) - Destination host `password` (str) - new administrator password `shared` (bool) - whether the vm is on the shared storage Returns: None

### reset_status(self, status=None) | source code
Move a server to another host Parameters: `status` (str) - new status of the server ('active', 'pause', ...) Returns: None

### get_vnc_console(self, type=`'``novnc``'`) | source code
Get VNC console Parameters: `type` (str) - 'novnc' or 'xvpvnc' (required) Returns: dict Console information

### get_console_log(self, lines=50) | source code
Get console output Parameters: `lines` (int) - number of lines Returns: dict Console logs

### get_diagnostics(self) | source code
Get diagnostics Returns: dict Diagnostics

### resize(self, flavor=None, disk_config=`'``AUTO``'`) | source code
Get console output Parameters: `flavor` (yakumo.nova.v2.flavor.Resource) - Flavor (required) `disk_config` (str) - disk configuration ('AUTO') Returns: None

### rebuild(self, image=None, disk_config=`'``AUTO``'`, password=None, ipv4=None, ipv6=None, personality=None) | source code
Rebuild a server Parameters: `image` (yakumo.image.Resource) - Image `disk_config` (str) - disk configuration ('AUTO') `password` (str) - admin password `ipv4` (str) - IPv4 address `ipv6` (str) - IPv6 address `persoality` ([str]) - personality data Returns: None

### get_security_groups(self) | source code
Get security group list for a server Returns: [str] Security group list

### get_metadata(self) | source code
Get instance metadata Returns: dict Metadata

### set_metadata(self, **metadata) | source code
Update instance metadata Parameters: `metadata` (dict) - key=value style. Returns: None

### unset_metadata(self, *keys) | source code
Delete instance metadata Parameters: `key` - key of the metadata `keys` ([str]) Returns: None

Class Variable Details | [hide private]

  ### _sub_manager_list Value:
      {'interface': <class 'yakumo.nova.v2.interface_attachment.Manager'>,
       'volume': <class 'yakumo.nova.v2.volume_attachment.Manager'>}