Server interface.
Bases: novaclient.base.Resource
Populate and bind to a manager.
Parameters: |
|
---|
Add an IP address on a network.
Parameters: | network_id – The ID of the network the IP should be on. |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Add floating IP to an instance
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Add a security group to an instance.
Parameters: | security_group – The name of security group to add |
---|---|
Returns: | An instance of novaclient.base.DictWithMeta |
Backup a server instance.
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Update the admin password for a server.
Parameters: | password – string to set as the admin password on the server |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Get password for a Server.
Confirm that the resize worked, thus removing the original server.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Create an image based on this server.
Parameters: |
|
---|
Delete (i.e. shut down and delete the image) this server.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Diagnostics – Retrieve server diagnostics.
Evacuate an instance from failed host to specified host.
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Force delete – Force delete a server.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Get text console log output from Server.
Parameters: | length – The number of lines you would like to retrieve (as int) |
---|
Get mks console for a Server.
Get password for a Server.
Returns the clear password of an instance if private_key is provided, returns the ciphered password otherwise.
Parameters: | private_key – Path to private key file for decryption (optional) |
---|
Get rdp console for a Server.
Parameters: | console_type – Type of console (‘rdp-html5’) |
---|
Get serial console for a Server.
Parameters: | console_type – Type of console (‘serial’) |
---|
Get spice console for a Server.
Parameters: | console_type – Type of console (‘spice-html5’) |
---|
Get vnc console for a Server.
Parameters: | console_type – Type of console (‘novnc’ or ‘xvpvnc’) |
---|
Attach a network interface to an instance.
Detach a network interface from an instance.
List interfaces attached to an instance.
List security group(s) of an instance.
Migrates a running instance to a new machine.
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Lock – Lock the instance from certain operations.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Migrate a server to a new host.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Generate a simplified list of addresses
Pause – Pause the running server.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Reboot the server.
Parameters: | reboot_type – either REBOOT_SOFT for a software-level reboot, or REBOOT_HARD for a virtual power cycle hard reboot. |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Rebuild – shut down and then re-image – this server.
Parameters: |
|
---|
Remove an IP address.
Parameters: | address – The IP address to remove. |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Remove floating IP from an instance
Parameters: | address – The IP address or FloatingIP to remove |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Remove a security group from an instance.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Rescue – Rescue the problematic server.
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Reset network of an instance.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Reset the state of an instance to active or error.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Resize the server’s resources.
Parameters: | flavor – the Flavor (or its ID) to resize to. |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Until a resize event is confirmed with confirm_resize(), the old server will be kept around and you’ll be able to roll back to the old flavor quickly with revert_resize(). All resizes are automatically confirmed after 24 hours.
Restore – Restore a server in ‘soft-deleted’ state.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Resume – Resume the suspended server.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Revert a previous resize, switching back to the old server.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Shelve – Shelve the server.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Shelve_offload – Remove a shelved server from the compute node.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Start – Start the paused server.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Stop – Stop the running server.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Suspend – Suspend the running server.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Trigger crash dump in an instance
Unlock – Remove instance lock.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Unpause – Unpause the paused server.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Unrescue – Unrescue the rescued server.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Unshelve – Unshelve the server.
Returns: | An instance of novaclient.base.TupleWithMeta |
---|
Update the name and the description for this server.
Parameters: |
|
---|---|
Returns: | Server |
Bases: novaclient.base.BootingManagerWithFind
Add an IP address on a network.
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Add a floating IP to an instance
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Add a Security Group to an instance
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.DictWithMeta |
Backup a server instance.
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Update the password for a server.
Parameters: | server – The Server (or its ID) for which the admin password is to be changed |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Clear the admin password of an instance
Remove the admin password for an instance from the metadata server.
Parameters: | server – The Server (or its ID) for which the admin password is to be cleared |
---|
Confirm that the resize worked, thus removing the original server.
Parameters: | server – The Server (or its ID) to share onto. |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Create (boot) a new server.
Parameters: |
|
---|
Snapshot a server.
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.StrWithMeta (The snapshot image’s UUID) |
Delete (i.e. shut down and delete the image) this server.
Parameters: | server – The Server (or its ID) to delete |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Delete metadata from a server
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Retrieve server diagnostics.
Parameters: | server – The Server (or its ID) for which diagnostics to be returned |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Evacuate a server instance.
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Force delete the server.
Parameters: | server – The Server (or its ID) to force delete |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Get a server.
Parameters: | server – ID of the Server to get. |
---|---|
Return type: | Server |
Get text console log output from Server.
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.StrWithMeta or novaclient.base.UnicodeWithMeta |
Get a mks console for an instance
Parameters: | server – The Server (or its ID) to get console for. |
---|---|
Returns: | An instance of novaclient.base.DictWithMeta |
Get admin password of an instance
Returns the admin password of an instance in the clear if private_key is provided, returns the ciphered password otherwise.
Requires that openssl is installed and in the path
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.StrWithMeta or novaclient.base.BytesWithMeta or novaclient.base.UnicodeWithMeta |
Get a rdp console for an instance
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.DictWithMeta |
Get a serial console for an instance
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.DictWithMeta |
Get a spice console for an instance
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.DictWithMeta |
Get a vnc console for an instance
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.DictWithMeta |
Attach a network_interface to an instance.
Parameters: |
|
---|
Detach a network_interface from an instance.
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
List attached network interfaces
Parameters: | server – The Server (or its ID) to query. |
---|
Return IP Addresses associated with the server.
Often a cheaper call then getting all the details for a server.
Parameters: | server – The Server (or its ID) for which the IP adresses are to be returned |
---|---|
Returns: | An instance of novaclient.base.DictWithMeta |
Get a list of servers.
Parameters: |
|
---|---|
Return type: | list of Server |
Examples:
client.servers.list() - returns detailed list of servers
client.servers.list(search_opts={‘status’: ‘ERROR’}) - returns list of servers in error state.
client.servers.list(limit=10) - returns only 10 servers
List Security Group(s) of an instance
Parameters: | server – ID of the instance. |
---|
Migrates a running instance to a new machine.
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Lock the server.
Parameters: | server – The Server (or its ID) to lock |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Migrate a server to a new host.
Parameters: | server – The Server (or its ID). |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Pause the server.
Parameters: | server – The Server (or its ID) to pause |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Reboot a server.
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Rebuild – shut down and then re-image – a server.
Parameters: |
|
---|---|
Returns: | Server |
Remove an IP address.
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Remove a floating IP address.
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Remove a Security Group to an instance
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Rescue the server.
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Reset network of an instance.
Parameters: | server – The Server for network is to be reset |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Reset the state of an instance to active or error.
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Resize a server’s resources.
Parameters: |
|
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Until a resize event is confirmed with confirm_resize(), the old server will be kept around and you’ll be able to roll back to the old flavor quickly with revert_resize(). All resizes are automatically confirmed after 24 hours.
alias of Server
Restore soft-deleted server.
Parameters: | server – The Server (or its ID) to restore |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Resume the server.
Parameters: | server – The Server (or its ID) to resume |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Revert a previous resize, switching back to the old server.
Parameters: | server – The Server (or its ID) to share onto. |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Set a servers metadata :param server: The Server to add metadata to :param metadata: A dict of metadata to add to the server
Updates an item of server metadata :param server: The Server to add metadata to :param key: metadata key to update :param value: string value
Shelve the server.
Parameters: | server – The Server (or its ID) to shelve |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Remove a shelved instance from the compute node.
Parameters: | server – The Server (or its ID) to shelve offload |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Start the server.
Parameters: | server – The Server (or its ID) to start |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Stop the server.
Parameters: | server – The Server (or its ID) to stop |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Suspend the server.
Parameters: | server – The Server (or its ID) to suspend |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Trigger crash dump in an instance
Unlock the server.
Parameters: | server – The Server (or its ID) to unlock |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Unpause the server.
Parameters: | server – The Server (or its ID) to unpause |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Unrescue the server.
Parameters: | server – The Server (or its ID) to unrescue |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Unshelve the server.
Parameters: | server – The Server (or its ID) to unshelve |
---|---|
Returns: | An instance of novaclient.base.TupleWithMeta |
Update the name or the description for a server.
Parameters: |
|
---|