Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIn Str AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str orelse Assign NameStore NameLoad Assign NameStore NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Dict Assign NameStore ListLoad Assign NameStore NameStore Num Assign NameStore NameLoad Assign NameStore ListLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad For NameStore AttributeLoad NameLoad attr body If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore NameLoad orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore NameLoad orelse If CompareEq NameLoad AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse If CompareEq NameLoad AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If CompareIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str If UnaryOpNot NameLoad body Raise Call NameLoad Str If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign NameStore NameLoad TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad AttributeLoad NameLoad attr Return SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Dict TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword SubscriptLoad NameLoad Index Str NameLoad Assign NameStore NameLoad Assign NameStore Num While BoolOpAnd UnaryOpNot NameLoad CompareLt NameLoad Num body AugAssignAdd NameStore Num Assign NameStore SubscriptLoad Call NameLoad NameLoad NameLoad Index Str If CompareEq NameLoad Str body Assign NameStore NameLoad Import alias Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body If CompareIn SubscriptLoad NameLoad Index Str ListLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse If CompareIn SubscriptLoad NameLoad Index Str ListLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse If CompareIn SubscriptLoad NameLoad Index Str ListLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Raise Call AttributeLoad NameLoad attr Num Str handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Raise NameLoad ExceptHandler type NameLoad name NameStore body Raise Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad If CompareIn NameLoad TupleLoad Str Str body Assign NameStore Str orelse If CompareEq NameLoad Str body Assign NameStore Str orelse Raise Call NameLoad Str TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str TryExcept body Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore NameLoad Assign NameStore Call NameLoad NameLoad NameLoad TryFinally body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Str handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str finalbody Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad handlers ExceptHandler type NameLoad body Raise Call AttributeLoad NameLoad attr Num Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Str Assign NameStore ListLoad If CompareIn SubscriptLoad NameLoad Index Str ListLoad AttributeLoad NameLoad attr body Assign NameStore Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If CompareIn SubscriptLoad NameLoad Index Str ListLoad AttributeLoad NameLoad attr body Assign NameStore Str orelse If CompareIn SubscriptLoad NameLoad Index Str ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If CompareIn SubscriptLoad NameLoad Index Str ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Str If CompareIn SubscriptLoad NameLoad Index Str ListLoad AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore ListLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Return Call AttributeLoad NameLoad attr decorator_list
N/A N/A 
VM related 'glue' :-)
 nova compute nova utils nova.compute task_states nova.compute vm_states nova.compute flavors nova.openstack.common log occi exceptions occi.extensions infrastructure occi_os_api.extensions os_mixins occi_os_api.extensions os_addon N/A COMPUTE_API N/A N/A compute API N/A LOG N/A N/A log getLogger __name__ create_vm N/A N/A entity context N/A N/A N/A 
    Create a VM for an given OCCI entity.

    entity -- the OCCI resource entity.
    context -- the os context.
     N/A N/A occi.compute.hostname N/A entity attributes N/A N/A name N/A N/A entity attributes N/A occi.compute.hostname N/A N/A name None N/A key_name key_data None N/A password N/A N/A utils generate_password N/A access_ip_v4 None N/A access_ip_v6 None N/A user_data None N/A metadata N/A N/A injected_files N/A N/A min_count max_count 1 N/A requested_networks None N/A sg_names N/A N/A availability_zone None N/A config_drive None N/A block_device_mapping None N/A kernel_id ramdisk_id None N/A auto_disk_config None N/A scheduler_hints None N/A resource_template None N/A os_template None N/A mixin N/A entity mixins N/A N/A N/A isinstance mixin N/A os_mixins ResourceTemplate N/A N/A resource_template mixin N/A N/A N/A isinstance mixin N/A os_mixins OsTemplate N/A N/A os_template mixin N/A N/A N/A mixin N/A os_addon OS_KEY_PAIR_EXT N/A N/A attr org.openstack.credentials.publickey.name N/A key_name N/A N/A entity attributes N/A attr N/A attr org.openstack.credentials.publickey.data N/A key_data N/A N/A entity attributes N/A attr N/A N/A N/A mixin N/A os_addon OS_USER_DATA_EXT N/A N/A attr org.openstack.compute.user_data N/A user_data N/A N/A entity attributes N/A attr N/A N/A N/A os_addon SEC_GROUP N/A mixin related N/A N/A secgroup N/A N/A N/A COMPUTE_API security_group_api get context name N/A mixin term N/A N/A N/A sg_names append N/A secgroup N/A name N/A N/A os_template N/A N/A N/A AttributeError Please provide a valid OS Template. N/A resource_template N/A N/A inst_type N/A N/A flavors get_flavor_by_flavor_id N/A resource_template res_id N/A N/A inst_type None N/A N/A N/A N/A instances _reservation_id N/A N/A COMPUTE_API create context context instance_type inst_type image_href N/A os_template os_id kernel_id kernel_id ramdisk_id ramdisk_id min_count min_count max_count max_count display_name name display_description name key_name key_name key_data key_data security_group sg_names availability_zone availability_zone user_data user_data metadata metadata injected_files injected_files admin_password password block_device_mapping block_device_mapping access_ip_v4 access_ip_v4 access_ip_v6 access_ip_v6 requested_networks requested_networks config_drive config_drive auto_disk_config auto_disk_config scheduler_hints scheduler_hints N/A N/A N/A Exception N/A e N/A N/A N/A AttributeError N/A e message N/A N/A instances N/A 0 N/A rebuild_vm N/A N/A uid image_href context N/A N/A N/A 
    Rebuilds the specified VM with the supplied OsTemplate mixin.

    uid -- id of the instance
    image_href -- image reference.
    context -- the os context
     N/A instance N/A get_vm uid context N/A admin_password N/A N/A utils generate_password N/A kwargs N/A N/A N/A N/A N/A N/A COMPUTE_API rebuild context instance image_href admin_password kwargs N/A N/A N/A Exception N/A e N/A N/A N/A AttributeError N/A e message N/A resize_vm N/A N/A uid flavor_id context N/A N/A N/A 
    Resizes a VM up or down

    Update: libvirt now supports resize see:
    http://wiki.openstack.org/HypervisorSupportMatrix

    uid -- id of the instance
    flavor_id -- image reference.
    context -- the os context
     N/A instance N/A get_vm uid context N/A kwargs N/A N/A N/A N/A flavor N/A N/A flavors get_flavor_by_flavor_id flavor_id N/A N/A N/A COMPUTE_API resize context instance flavor_id N/A flavor N/A flavorid kwargs N/A ready False N/A i 0 N/A N/A N/A ready N/A i 15 N/A N/A i 1 N/A state N/A N/A get_vm uid context N/A vm_state N/A N/A state resized N/A N/A ready True N/A time N/A N/A N/A time sleep 1 N/A instance N/A get_vm uid context N/A N/A N/A COMPUTE_API confirm_resize context instance N/A N/A N/A Exception N/A e N/A N/A N/A AttributeError N/A str e N/A delete_vm N/A N/A uid context N/A N/A N/A 
    Destroy a VM.

    uid -- id of the instance
    context -- the os context
     N/A N/A N/A instance N/A get_vm uid context N/A N/A N/A COMPUTE_API delete context instance N/A N/A N/A Exception N/A error N/A N/A N/A N/A exceptions HTTPError 500 N/A str error N/A suspend_vm N/A N/A uid context N/A N/A N/A 
    Suspends a VM. Use the start action to unsuspend a VM.

    uid -- id of the instance
    context -- the os context
     N/A instance N/A get_vm uid context N/A N/A N/A N/A N/A COMPUTE_API pause context instance N/A N/A N/A Exception N/A error N/A N/A N/A N/A exceptions HTTPError 500 N/A str error N/A snapshot_vm N/A N/A uid image_name context N/A N/A N/A 
    Snapshots a VM. Use the start action to unsuspend a VM.

    uid -- id of the instance
    image_name -- name of the new image
    context -- the os context
     N/A instance N/A get_vm uid context N/A N/A N/A N/A N/A COMPUTE_API snapshot context instance image_name N/A N/A N/A Exception N/A e N/A N/A N/A AttributeError N/A e message N/A start_vm N/A N/A uid context N/A N/A N/A 
    Starts a vm that is in the stopped state. Note, currently we do not
    use the nova start and stop, rather the resume/suspend methods. The
    start action also unpauses a paused VM.

    uid -- id of the instance
    state -- the state the VM is in (str)
    context -- the os context
     N/A instance N/A get_vm uid context N/A N/A N/A N/A N/A instance N/A vm_state N/A N/A vm_states PAUSED N/A N/A N/A N/A COMPUTE_API unpause context instance N/A N/A N/A N/A instance N/A vm_state N/A N/A vm_states SUSPENDED N/A N/A N/A N/A COMPUTE_API resume context instance N/A N/A N/A N/A instance N/A vm_state N/A N/A vm_states STOPPED N/A N/A N/A N/A COMPUTE_API start context instance N/A N/A N/A N/A exceptions HTTPError 500 Unable to map start to appropriate OS action. N/A N/A N/A N/A exceptions HTTPError N/A e N/A N/A e N/A N/A Exception N/A e N/A N/A N/A AttributeError N/A e message N/A stop_vm N/A N/A uid context N/A N/A N/A 
    Stops a VM. Rather than use stop, suspend is used.
    OCCI -> graceful, acpioff, poweroff
    OS -> unclear

    uid -- id of the instance
    context -- the os context
     N/A instance N/A get_vm uid context N/A N/A N/A N/A N/A COMPUTE_API suspend context instance N/A N/A N/A Exception N/A e N/A N/A N/A AttributeError N/A e message N/A restart_vm N/A N/A uid method context N/A N/A N/A 
    Restarts a VM.
      OS types == SOFT, HARD
      OCCI -> graceful, warm and cold
      mapping:
      - SOFT -> graceful, warm
      - HARD -> cold

    uid -- id of the instance
    method -- how the machine should be restarted.
    context -- the os context
     N/A instance N/A get_vm uid context N/A N/A method N/A graceful warm N/A N/A reboot_type SOFT N/A N/A N/A method cold N/A N/A reboot_type HARD N/A N/A N/A AttributeError Unknown method. N/A N/A N/A N/A N/A COMPUTE_API reboot context instance reboot_type N/A N/A N/A Exception N/A e N/A N/A N/A AttributeError N/A e message N/A attach_volume N/A N/A instance_id volume_id mount_point context N/A N/A N/A 
    Attaches a storage volume.

    instance_id -- Id of the VM.
    volume_id -- Id of the storage volume.
    mount_point -- Where to mount.
    context -- The os security context.
     N/A instance N/A get_vm instance_id context N/A N/A N/A N/A N/A COMPUTE_API attach_volume context instance volume_id mount_point N/A N/A N/A Exception N/A e N/A N/A N/A AttributeError N/A e message N/A detach_volume N/A N/A instance_id volume context N/A N/A N/A 
    Detach a storage volume.

    volume -- Volume description.
    instance_id -- Id of the VM.
    context -- the os context.
     N/A N/A N/A instance N/A get_vm instance_id context N/A N/A N/A COMPUTE_API detach_volume context instance volume N/A N/A N/A Exception N/A e N/A N/A N/A AttributeError e N/A set_password_for_vm N/A N/A uid password context N/A N/A N/A 
    Set new password for an VM.

    uid -- Id of the instance.
    password -- The new password.
    context -- The os context.
     N/A instance N/A get_vm uid context N/A N/A N/A N/A N/A COMPUTE_API set_admin_password context instance password N/A N/A N/A Exception N/A e N/A N/A N/A AttributeError N/A e message N/A get_vnc N/A N/A uid context N/A N/A N/A 
    Retrieve VNC console or None if unavailable.

    uid -- id of the instance
    context -- the os context
     N/A console None N/A instance N/A get_vm uid context N/A N/A N/A N/A N/A console N/A N/A COMPUTE_API get_vnc_console context instance novnc N/A N/A N/A Exception N/A N/A N/A N/A LOG warn Console info is not available atm! N/A N/A console N/A get_vm N/A N/A uid context N/A N/A N/A 
    Retrieve an VM instance from nova.

    uid -- id of the instance
    context -- the os context
     N/A N/A N/A instance N/A N/A COMPUTE_API get context uid want_objects True N/A N/A N/A Exception N/A N/A N/A N/A exceptions HTTPError 404 VM not found! N/A instance N/A get_vms N/A N/A context N/A N/A N/A 
    Retrieve all VMs in a given context.
     N/A opts N/A deleted False N/A tmp N/A N/A COMPUTE_API get_all context search_opts opts N/A tmp N/A get_vm_state N/A N/A uid context N/A N/A N/A 
    See nova/compute/vm_states.py nova/compute/task_states.py

    Mapping assumptions:
    - active == VM can service requests from network. These requests
            can be from users or VMs
    - inactive == the oppose! :-)
    - suspended == machine in a frozen state e.g. via suspend or pause

    uid -- Id of the VM.
    context -- the os context.
     N/A instance N/A get_vm uid context N/A state inactive N/A actions N/A N/A N/A N/A instance N/A vm_state N/A N/A vm_states ACTIVE N/A N/A state active N/A N/A N/A actions append N/A infrastructure STOP N/A N/A N/A actions append N/A infrastructure SUSPEND N/A N/A N/A actions append N/A infrastructure RESTART N/A N/A N/A N/A instance N/A vm_state N/A N/A vm_states BUILDING N/A N/A state inactive N/A N/A N/A N/A instance N/A vm_state N/A N/A vm_states PAUSED N/A vm_states SUSPENDED N/A vm_states STOPPED N/A N/A state inactive N/A N/A N/A actions append N/A infrastructure START N/A N/A N/A N/A instance N/A vm_state N/A N/A vm_states RESCUED N/A vm_states ERROR N/A vm_states DELETED N/A N/A state inactive N/A N/A N/A instance N/A vm_state N/A N/A task_states IMAGE_SNAPSHOT N/A N/A state inactive N/A actions N/A N/A N/A state actions N/A retrieve_image N/A N/A uid context N/A N/A N/A 
    Return details on an image.
     N/A N/A N/A N/A N/A N/A COMPUTE_API image_service show context uid N/A N/A N/A Exception N/A e N/A N/A N/A AttributeError N/A e message N/A retrieve_images N/A N/A context N/A N/A N/A 
    Retrieve list of images.
     N/A N/A N/A N/A COMPUTE_API image_service detail context N/A retrieve_flavors N/A N/A N/A N/A N/A 
    Retrieve list of flavors.
     N/A N/A N/A flavors get_all_flavors N/A