The Compute Class

The compute high-level interface is available through the compute member of a Connection object. The compute member will only be added if the service is detected.

Server Operations

openstack.compute.v2._proxy.Proxy(session, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client, *args, **kwargs)

create_server

create_server(**attrs)

속성에서 새 서버 만들기

Parameters:

attrs (dict) Keyword arguments which will be used to createa Server,comprised of the properties on the Server class.

Returns:

The results of server creation

Return type:

Server

delete_server

delete_server(server, ignore_missing, force)

서버 삭제

Parameters:

server The value can be either the ID of a server or aServer instance.ignore_missing (bool) When set to FalseResourceNotFound will beraised when the server does not exist.When set to True, no exception will be set whenattempting to delete a nonexistent serverforce (bool) When set to True, the server deletion will beforced immediately.

Returns:

None

find_server

find_server(name_or_id, ignore_missing, details, all_projects)

단일 서버 찾기

Parameters:

name_or_id The name or ID of a server.ignore_missing (bool) When set to FalseResourceNotFound will be raised whenthe resource does not exist. When set to True, None will bereturned when attempting to find a nonexistent resource.details (bool) When set to Falseinstances with only basic data will be returned. The default,True, will cause instances with full data to be returned.all_projects (bool) When set to True, search for serverby name across all projects. Note that this will likely result in ahigher chance of duplicates. Admin-only by default.

Returns:

One Server or None

Raises:

ResourceNotFoundwhen no resource can be found.

Raises:

DuplicateResource when multipleresources are found.

get_server

get_server(server)

단일 서버 가져오기

Parameters:

server The value can be the ID of a server or aServer instance.

Returns:

One Server

Raises:

ResourceNotFoundwhen no resource can be found.

servers

servers(details, all_projects, **query)

서버 생성기 검색

Parameters:

details (bool) When set to Falseinstances with only basic data will be returned. The default,True, will cause instances with full data to be returned.all_projects (bool) When set to True, lists servers from allprojects. Admin-only by default.query (kwargs) Optional query parameters to be sent to limitthe servers being returned. Available parameters can be seenunder https://docs.openstack.org/api-ref/compute/#list-servers

Returns:

A generator of server instances.

update_server

update_server(server, **attrs)

서버 업데이트

Parameters:

server Either the ID of a server or aServer instance.attrs The attributes to update on the server representedby server.

Returns:

The updated server

Return type:

Server

create_server_image

create_server_image(server, name, metadata, wait, timeout)

서버에서 이미지 만들기

Parameters:

server Either the ID of a server or aServer instance.name (str) The name of the image to be created.metadata (dict) A dictionary of metadata to be set on the image.

Returns:

Image object.

backup_server

backup_server(server, name, backup_type, rotation)

서버 백업

Parameters:

server Either the ID of a server or aServer instance.name The name of the backup image.backup_type The type of the backup, for example, daily.rotation The rotation of the back up image, the oldestimage will be removed when image count exceedthe rotation count.

Returns:

None

get_server_metadata

get_server_metadata(server)

서버에 대한 메타데이터 사전 반환

Parameters:

server Either the ID of a server or aServer orServerDetailinstance.

Returns:

A Server with theservers metadata. All keys and values are Unicode text.

Return type:

Server

set_server_metadata

set_server_metadata(server, **metadata)

서버의 메타데이터 업데이트

Parameters:

server Either the ID of a server or aServer instance.metadata (kwargs) Key/value pairs to be updated in the serversmetadata. No other metadata is modifiedby this call. All keys and values are storedas Unicode.

Returns:

A Server with only theservers metadata. All keys and values are Unicode text.

Return type:

Server

delete_server_metadata

delete_server_metadata(server, keys)

서버의 메타데이터 삭제

Parameters:

server Either the ID of a server or aServer instance.keys (list) The keys to delete. If left empty completemetadata will be removed.

Return type:

None

wait_for_server

wait_for_server(server, status, failures, interval, wait, callback)

서버가 특정 상태가 될 때까지 기다립니다.

Parameters:

server (Server:) The Server to waiton to reach the specified status.status (str) Desired status.failures (list) Statuses that would be interpreted as failures.interval (int) Number of seconds to wait before to consecutivechecks. Default to 2.wait (int) Maximum number of seconds to wait before the change.Default to 120.callback (callable) A callback function. This will be called with a singlevalue, progress, which is a percentage value from 0-100.

Returns:

The resource is returned on success.

Raises:

ResourceTimeout if transitionto the desired status failed to occur in specified seconds.

Raises:

ResourceFailure if the resourcehas transited to one of the failure statuses.

Raises:

AttributeError if the resource does not have astatus attribute.

Network Actions

openstack.compute.v2._proxy.Proxy(session, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client, *args, **kwargs)

fetch_server_security_groups

fetch_server_security_groups(server)

서버에 대한 세부 정보가 포함된 보안 그룹을 가져옵니다.

Parameters:

server Either the ID of a server or aServer instance.

Returns:

updated Server instance

add_security_group_to_server

add_security_group_to_server(server, security_group)

서버에 보안 그룹 추가

Parameters:

server Either the ID of a server or aServer instance.security_group Either the ID, Name of a security group or aSecurityGroupinstance.

Returns:

None

remove_security_group_from_server

remove_security_group_from_server(server, security_group)

서버에서 보안 그룹 제거

Parameters:

server Either the ID of a server or aServer instance.security_group Either the ID of a security group or aSecurityGroupinstance.

Returns:

None

add_fixed_ip_to_server

add_fixed_ip_to_server(server, network_id)

고정 IP 주소를 서버 인스턴스에 추가합니다.

Parameters:

server Either the ID of a server or aServer instance.network_id The ID of the network from which a fixed IP addressis about to be allocated.

Returns:

None

remove_fixed_ip_from_server

remove_fixed_ip_from_server(server, address)

서버 인스턴스에서 고정 IP 주소를 제거합니다.

Parameters:

server Either the ID of a server or aServer instance.address The fixed IP address to be disassociated from theserver.

Returns:

None

add_floating_ip_to_server

add_floating_ip_to_server(server, address, fixed_address)

서버 인스턴스에 유동 IP 주소를 추가합니다.

Parameters:

server Either the ID of a server or aServer instance.address The floating IP address to be added to the server.fixed_address The fixed IP address to be associated with thefloating IP address. Used when the server isconnected to multiple networks.

Returns:

None

remove_floating_ip_from_server

remove_floating_ip_from_server(server, address)

서버 인스턴스에서 유동 IP 주소를 제거합니다.

Parameters:

server Either the ID of a server or aServer instance.address The floating IP address to be disassociated from theserver.

Returns:

None

Starting, Stopping, etc

openstack.compute.v2._proxy.Proxy(session, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client, *args, **kwargs)

reboot_server

reboot_server(server, reboot_type)

서버 재부팅

Parameters:

server Either the ID of a server or aServer instance.reboot_type (str) The type of reboot to perform.HARD and SOFT are the current options.

Returns:

None

pause_server

pause_server(server)

서버를 일시 중지하고 상태를 일시 중지로 변경합니다.

Parameters:

server Either the ID of a server or aServer instance.

Returns:

None

unpause_server

unpause_server(server)

일시 중지된 서버를 일시 중지하고 상태를 ACTIVE로 변경합니다.

Parameters:

server Either the ID of a server or aServer instance.

Returns:

None

suspend_server

suspend_server(server)

서버를 일시 중단하고 상태를 SUSPEND로 변경합니다.

Parameters:

server Either the ID of a server or aServer instance.

Returns:

None

resume_server

resume_server(server)

일시 중단된 서버를 다시 시작하고 상태를 ACTIVE로 변경합니다.

Parameters:

server Either the ID of a server or aServer instance.

Returns:

None

lock_server

lock_server(server, locked_reason)

서버를 잠급니다.

Parameters:

server Either the ID of a server or aServer instance.locked_reason The reason behind locking the server. Limited to255 characters in length.

Returns:

None

unlock_server

unlock_server(server)

잠긴 서버의 잠금을 해제합니다.

Parameters:

server Either the ID of a server or aServer instance.

Returns:

None

rescue_server

rescue_server(server, admin_pass, image_ref)

서버를 Rescue 모드로 설정하고 RESCUE로 상태를 변경합니다.

Parameters:

server Either the ID of a server or aServer instance.admin_pass The password for the rescued server. If you omitthis parameter, the operation generates a newpassword.image_ref The image reference to use to rescue your server.This can be the image ID or its full URL. If youomit this parameter, the base image reference willbe used.

Returns:

None

unrescue_server

unrescue_server(server)

서버의 리소스를 해제하고 서버의 상태를 ACTIVE로 변경합니다.

Parameters:

server Either the ID of a server or aServer instance.

Returns:

None

evacuate_server

evacuate_server(server, host, admin_pass, force)

장애가 발생한 호스트에서 새 호스트로 서버를 제거합니다.

Parameters:

server Either the ID of a server or aServer instance.host An optional parameter specifying the name or ID of thehost to which the server is evacuated.admin_pass An optional parameter specifying the administrativepassword to access the evacuated or rebuilt server.force Force an evacuation by not verifying the provideddestination host by the scheduler. (New in API version2.29).

Returns:

None

start_server

start_server(server)

중지된 서버를 시작하고 상태를 ACTIVE로 변경합니다.

Parameters:

server Either the ID of a server or aServer instance.

Returns:

None

stop_server

stop_server(server)

실행 중인 서버를 중지하고 상태를 SHUTOFF로 변경합니다.

Parameters:

server Either the ID of a server or aServer instance.

Returns:

None

restore_server

restore_server(server)

삭제된 소프트 서버를 복원합니다.

Parameters:

server Either the ID of a server or aServer instance.

Returns:

None

shelve_server

shelve_server(server)

서버를 쉘프로 이동합니다.

Parameters:

server Either the ID of a server or aServer instance.

Returns:

None

unshelve_server

unshelve_server(server)

보관된 서버의 셸프를 해제하거나 복원합니다.

Parameters:

server Either the ID of a server or aServer instance.

Returns:

None

migrate_server

migrate_server(server)

한 호스트에서 다른 호스트로 서버 마이그레이션

Parameters:

server Either the ID of a server or aServer instance.

Returns:

None

live_migrate_server

live_migrate_server(server, host, force, block_migration)

한 호스트에서 대상 호스트로 서버 실시간 마이그레이션

Parameters:

server Either the ID of a server or aServer instance.host (str) The host to which to migrate the server. If the Novaservice is too old, the host parameter implies force=True whichcauses the Nova scheduler to be bypassed. On such clouds, aValueError will be thrown if host is given withoutforce.force (bool) Force a live-migration by not verifying the provideddestination host by the scheduler. This is unsafe and notrecommended.block_migration Perform a block live migration to thedestination host by the scheduler. Can be auto, True or False.Some clouds are too old to support auto, in which case aValueError will be thrown. If omitted, the value will be auto onclouds that support it, and False on clouds that do not.

Returns:

None

get_server_console_output

get_server_console_output(server, length)

서버에 대한 콘솔 출력을 반환합니다.

Parameters:

server Either the ID of a server or aServer instance.length Optional number of line to fetch from the end of consolelog. All lines will be returned if this is not specified.

Returns:

The console output as a dict. Control characters will beescaped to create a valid JSON string.

Modifying a Server

openstack.compute.v2._proxy.Proxy(session, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client, *args, **kwargs)

change_server_password

change_server_password(server, new_password)

관리자 암호 변경

Parameters:

server Either the ID of a server or aServer instance.new_password (str) The new password to be set.

Returns:

None

get_server_password

get_server_password(server)

관리자 암호 가져오기

Parameters:

server Either the ID of a server or aServer instance.

Returns:

encrypted password.

reset_server_state

reset_server_state(server, state)

서버 상태 재설정

Parameters:

server The server can be either the ID of a server or aServer.state The state of the server to be set, active orerror are valid.

Returns:

None

rebuild_server

rebuild_server(server, image, **attrs)

서버 재구축

Parameters:

server Either the ID of a server or aServer instance.name (str) The name of the serveradmin_password (str) The administrator passwordpreserve_ephemeral (bool) Indicates whether the serveris rebuilt with the preservation of the ephemeral partition.Default: Falseimage (str) The id of an image to rebuild with. Default: Noneaccess_ipv4 (str) The IPv4 address to rebuild with.Default: Noneaccess_ipv6 (str) The IPv6 address to rebuild with.Default: Nonemetadata (dict) A dictionary of metadata to rebuild with.Default: Nonepersonality A list of dictionaries, each including apath and contents key, to be injectedinto the rebuilt server at launch.Default: None

Returns:

The rebuilt Serverinstance.

resize_server

resize_server(server, flavor)

서버 크기 조정

Parameters:

server Either the ID of a server or aServer instance.flavor Either the ID of a flavor or aFlavor instance.

Returns:

None

confirm_server_resize

confirm_server_resize(server)

서버 크기 변경 확인

Parameters:

server Either the ID of a server or aServer instance.

Returns:

None

revert_server_resize

revert_server_resize(server)

서버 크기 되돌리기

Parameters:

server Either the ID of a server or aServer instance.

Returns:

None

Image Operations

openstack.compute.v2._proxy.Proxy(session, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client, *args, **kwargs)

delete_image

delete_image(image, ignore_missing)

이미지 삭제

Parameters:

image The value can be either the ID of an image or aImage instance.ignore_missing (bool) When set to FalseResourceNotFound will beraised when the image does not exist.When set to True, no exception will be set whenattempting to delete a nonexistent image.

Returns:

None

find_image

find_image(name_or_id, ignore_missing)

단일 이미지 찾기

Parameters:

name_or_id The name or ID of a image.ignore_missing (bool) When set to FalseResourceNotFound will beraised when the resource does not exist.When set to True, None will be returned whenattempting to find a nonexistent resource.

Returns:

One Image or None

Raises:

ResourceNotFoundwhen no resource can be found.

Raises:

DuplicateResource when multipleresources are found.

get_image

get_image(image)

단일 이미지 가져오기

Parameters:

image The value can be the ID of an image or aImage instance.

Returns:

One Image

Raises:

ResourceNotFoundwhen no resource can be found.

images

images(details, **query)

이미지 생성기 반환

Parameters:

details (bool) When True, returnsImage objects with allavailable properties, otherwise only basic properties are returned.Default: ``True``query (kwargs) Optional query parameters to be sent to limitthe resources being returned.

Returns:

A generator of image objects

get_image_metadata

get_image_metadata(image)

이미지에 대한 메타데이터 사전 반환

Parameters:

image Either the ID of an image or aImage instance.

Returns:

A Image with only theimages metadata. All keys and values are Unicode text.

Return type:

Image

set_image_metadata

set_image_metadata(image, **metadata)

이미지의 메타데이터 업데이트

Parameters:

image Either the ID of an image or aImage instance.metadata (kwargs) Key/value pairs to be updated in the imagesmetadata. No other metadata is modifiedby this call. All keys and values are storedas Unicode.

Returns:

A Image with only theimages metadata. All keys and values are Unicode text.

Return type:

Image

delete_image_metadata

delete_image_metadata(image, keys)

이미지의 메타데이터 삭제

Parameters:

image Either the ID of an image or aImage instance.keys (list) The keys to delete. If left empty complete metadatawill be removed.

Return type:

None

Flavor Operations

openstack.compute.v2._proxy.Proxy(session, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client, *args, **kwargs)

find_flavor

find_flavor(name_or_id, ignore_missing, get_extra_specs, **query)

단일 맛 찾기

Parameters:

name_or_id The name or ID of a flavor.ignore_missing (bool) When set to FalseResourceNotFound will be raised whenthe resource does not exist. When set to True, None will bereturned when attempting to find a nonexistent resource.get_extra_specs (bool) When set to True and extra_specs notpresent in the response will invoke additional API call to fetchextra_specs.query (kwargs) Optional query parameters to be sent to limitthe flavors being returned.

Returns:

One Flavor or None

Raises:

ResourceNotFoundwhen no resource can be found.

Raises:

DuplicateResource when multipleresources are found.

create_flavor

create_flavor(**attrs)

속성에서 새 맛 만들기

Parameters:

attrs (dict) Keyword arguments which will be used to createa Flavor,comprised of the properties on the Flavor class.

Returns:

The results of flavor creation

Return type:

Flavor

delete_flavor

delete_flavor(flavor, ignore_missing)

맛 삭제

Parameters:

flavor The value can be either the ID of a flavor or aFlavor instance.ignore_missing (bool) When set to FalseResourceNotFound will beraised when the flavor does not exist.When set to True, no exception will be set whenattempting to delete a nonexistent flavor.

Returns:

None

get_flavor

get_flavor(flavor, get_extra_specs)

한 가지 맛을 얻으십시오

Parameters:

flavor The value can be the ID of a flavor or aFlavor instance.get_extra_specs (bool) When set to True and extra_specs notpresent in the response will invoke additional API call to fetchextra_specs.

Returns:

One Flavor

Raises:

ResourceNotFoundwhen no resource can be found.

flavors

flavors(details, get_extra_specs, **query)

맛 발생기를 반환합니다

Parameters:

details (bool) When True, returnsFlavor objects,with additional attributes filled.get_extra_specs (bool) When set to True and extra_specs notpresent in the response will invoke additional API call to fetchextra_specs.query (kwargs) Optional query parameters to be sent to limitthe flavors being returned.

Returns:

A generator of flavor objects

flavor_add_tenant_access

flavor_add_tenant_access(flavor, tenant)

맛에 테넌트/프로젝트 액세스 권한을 추가합니다.

Parameters:

flavor Either the ID of a flavor or aFlavor instance.tenant (str) The UUID of the tenant.

Returns:

One Flavor

flavor_remove_tenant_access

flavor_remove_tenant_access(flavor, tenant)

맛에 대한 테넌트/프로젝트 액세스를 제거합니다.

Parameters:

flavor Either the ID of a flavor or aFlavor instance.tenant (str) The UUID of the tenant.

Returns:

One Flavor

get_flavor_access

get_flavor_access(flavor)

개인 취향에 액세스할 수 있는 테넌트 목록

Parameters:

flavor Either the ID of a flavor or aFlavor instance.

Returns:

List of dicts with flavor_id and tenant_id attributes.

fetch_flavor_extra_specs

fetch_flavor_extra_specs(flavor)

맛의 추가 사양 목록

Parameters:

flavor Either the ID of a flavor or aFlavor instance.

Returns:

One Flavor

create_flavor_extra_specs

create_flavor_extra_specs(flavor, extra_specs)

맛의 추가 사양 목록

Parameters:

flavor Either the ID of a flavor or aFlavor instance.extra_specs (dict) dict of extra specs

Returns:

One Flavor

get_flavor_extra_specs_property

get_flavor_extra_specs_property(flavor, prop)

맛의 특정 추가 사양 속성 가져오기

Parameters:

flavor Either the ID of a flavor or aFlavor instance.prop (str) Property name.

Returns:

String value of the requested property.

update_flavor_extra_specs_property

update_flavor_extra_specs_property(flavor, prop, val)

맛의 특정 Extra Spec 속성 업데이트

Parameters:

flavor Either the ID of a flavor or aFlavor instance.prop (str) Property name.val (str) Property value.

Returns:

String value of the requested property.

delete_flavor_extra_specs_property

delete_flavor_extra_specs_property(flavor, prop)

맛의 특정 Extra Spec 속성 삭제

Parameters:

flavor Either the ID of a flavor or aFlavor instance.prop (str) Property name.

Returns:

None

Service Operations

openstack.compute.v2._proxy.Proxy(session, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client, *args, **kwargs)

update_service_forced_down

update_service_forced_down(service, host, binary, forced)

서비스 forced_down 정보 업데이트

Parameters:

service Either the ID of a service or aService instance.host (str) The host where service runs.binary (str) The name of service.forced (bool) Whether or not this service was forced downmanually by an administrator after the service was fenced.

Returns:

Updated service instance

Return type:

class: ~openstack.compute.v2.service.Service

disable_service

disable_service(service, host, binary, disabled_reason)

서비스 사용 안 함

Parameters:

service Either the ID of a service or aService instance.host (str) The host where service runs.binary (str) The name of service.disabled_reason (str) The reason of force down a service.

Returns:

Updated service instance

Return type:

class: ~openstack.compute.v2.service.Service

enable_service

enable_service(service, host, binary)

서비스 활성화

Parameters:

service Either the ID of a service or aService instance.host (str) The host where service runs.binary (str) The name of service.

Returns:

Updated service instance

Return type:

class: ~openstack.compute.v2.service.Service

services

services(**query)

서비스 생성기 반환

Params dict query:

Query parameters

Returns:

A generator of service

Return type:

class: ~openstack.compute.v2.service.Service

find_service

find_service(name_or_id, ignore_missing, **query)

이름 또는 ID에서 서비스를 찾아 해당 정보를 가져옵니다

Parameters:

name_or_id The name or id of a serviceignore_missing (bool) When set to FalseResourceNotFound will beraised when the resource does not exist.When set to True, None will be returned whenattempting to find a nonexistent resource.query (dict) Additional attributes like host

Returns:

One: class:~openstack.compute.v2.service.Service or None

Raises:

ResourceNotFoundwhen no resource can be found.

Raises:

DuplicateResource when multipleresources are found.

delete_service

delete_service(service, ignore_missing)

서비스 삭제

Parameters:

service The value can be either the ID of a service or aService instance.ignore_missing (bool) When set to FalseResourceNotFound will be raised whenthe service does not exist. When set to True, no exceptionwill be set when attempting to delete a nonexistent service.

Returns:

None

update_service

update_service(service, **attrs)

서비스 업데이트

Parameters:

service Either the ID of a service or aService instance.attrs The attributes to update on the service representedby service.

Returns:

The updated service

Return type:

Service

Volume Attachment Operations

openstack.compute.v2._proxy.Proxy(session, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client, *args, **kwargs)

create_volume_attachment

create_volume_attachment(server, volume, **attrs)

속성에서 새 볼륨 첨부 파일 만들기

Parameters:

server The value can be either the ID of a server or aServer instance that thevolume is attached to.volume The value can be either the ID of a volume or aVolume instance.attrs (dict) Keyword arguments which will be used to create aVolumeAttachment,comprised of the properties on the VolumeAttachment class.

Returns:

The results of volume attachment creation

Return type:

VolumeAttachment

update_volume_attachment

update_volume_attachment(server, volume, volume_id, **attrs)

볼륨 첨부 파일 업데이트

Parameters:

server The value can be either the ID of a server or aServer instance that thevolume is attached to.volume The value can be either the ID of a volume or aVolume instance.volume_id The ID of a volume to swap to. If this is notspecified, we will default to not swapping the volume.attrs The attributes to update on the volume attachmentrepresented by volume_attachment.

Returns:

None

delete_volume_attachment

delete_volume_attachment(server, volume, ignore_missing)

볼륨 첨부 파일 삭제

Parameters:

server The value can be either the ID of a server or aServer instance that thevolume is attached to.volume The value can be the ID of a volume or aVolume instance.ignore_missing (bool) When set to FalseResourceNotFound will be raised whenthe volume attachment does not exist. When set to True, noexception will be set when attempting to delete a nonexistentvolume attachment.

Returns:

None

get_volume_attachment

get_volume_attachment(server, volume)

단일 볼륨 첨부 파일 가져오기

Parameters:

server The value can be either the ID of a server or aServer instance that thevolume is attached to.volume The value can be the ID of a volume or aVolume instance.

Returns:

OneVolumeAttachment

Raises:

ResourceNotFoundwhen no resource can be found.

volume_attachments

volume_attachments(server, **query)

볼륨 첨부 파일 생성기 반환

Parameters:

server The server can be either the ID of a server or aServer.

Params dict query:

Query parameters

Returns:

A generator of VolumeAttachment objects

Return type:

VolumeAttachment

Keypair Operations

openstack.compute.v2._proxy.Proxy(session, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client, *args, **kwargs)

create_keypair

create_keypair(**attrs)

속성에서 새 키 쌍 생성

Parameters:

attrs (dict) Keyword arguments which will be used to createa Keypair,comprised of the properties on the Keypair class.

Returns:

The results of keypair creation

Return type:

Keypair

delete_keypair

delete_keypair(keypair, ignore_missing, user_id)

키 쌍 삭제

Parameters:

keypair The value can be either the ID of a keypair or aKeypair instance.ignore_missing (bool) When set to FalseResourceNotFound will be raised whenthe keypair does not exist. When set to True, no exceptionwill be set when attempting to delete a nonexistent keypair.user_id (str) Optional user_id owning the keypair

Returns:

None

get_keypair

get_keypair(keypair, user_id)

키 한 쌍 받기

Parameters:

keypair The value can be the ID of a keypair or aKeypair instance.user_id (str) Optional user_id owning the keypair

Returns:

One Keypair

Raises:

ResourceNotFoundwhen no resource can be found.

find_keypair

find_keypair(name_or_id, ignore_missing, user_id)

단일 키 쌍 찾기

Parameters:

name_or_id The name or ID of a keypair.ignore_missing (bool) When set to FalseResourceNotFound will be raised whenthe resource does not exist. When set to True, None will bereturned when attempting to find a nonexistent resource.user_id (str) Optional user_id owning the keypair

Returns:

One Keypair or None

Raises:

ResourceNotFoundwhen no resource can be found.

Raises:

DuplicateResource when multipleresources are found.

keypairs

keypairs(**query)

키 쌍 생성기 반환

Parameters:

query (kwargs) Optional query parameters to be sent to limitthe resources being returned.

Returns:

A generator of keypair objects

Return type:

Keypair

Server IPs

openstack.compute.v2._proxy.Proxy(session, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client, *args, **kwargs)

server_ips

server_ips(server, network_label)

서버 IP 생성기 반환

Parameters:

server The server can be either the ID of a server or aServer.network_label The name of a particular network to listIP addresses from.

Returns:

A generator of ServerIP objects

Return type:

ServerIP

Server Group Operations

openstack.compute.v2._proxy.Proxy(session, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client, *args, **kwargs)

create_server_group

create_server_group(**attrs)

속성에서 새 서버 그룹 만들기

Parameters:

attrs (dict) Keyword arguments which will be used to createa ServerGroup,comprised of the properties on the ServerGroup class.

Returns:

The results of server group creation

Return type:

ServerGroup

delete_server_group

delete_server_group(server_group, ignore_missing)

서버 그룹 삭제

Parameters:

server_group The value can be either the ID of a server groupor a ServerGroupinstance.ignore_missing (bool) When set to FalseResourceNotFound will beraised when the server group does not exist.When set to True, no exception will be set whenattempting to delete a nonexistent server group.

Returns:

None

find_server_group

find_server_group(name_or_id, ignore_missing, all_projects)

단일 서버 그룹 찾기

Parameters:

name_or_id The name or ID of a server group.ignore_missing (bool) When set to FalseResourceNotFound will be raised whenthe resource does not exist. When set to True, None will bereturned when attempting to find a nonexistent resource.all_projects (bool) When set to True, search for servergroups by name across all projects. Note that this will likelyresult in a higher chance of duplicates. Admin-only by default.

Returns:

One ServerGroupor None

Raises:

ResourceNotFoundwhen no resource can be found.

Raises:

DuplicateResource when multipleresources are found.

get_server_group

get_server_group(server_group)

단일 서버 그룹 가져오기

Parameters:

server_group The value can be the ID of a server group or aServerGroupinstance.

Returns:

A ServerGroup object.

Raises:

ResourceNotFoundwhen no resource can be found.

server_groups

server_groups(all_projects, **query)

서버 그룹 생성기 반환

Parameters:

all_projects (bool) When set to True, lists servers groupsfrom all projects. Admin-only by default.query (kwargs) Optional query parameters to be sent to limitthe resources being returned.

Returns:

A generator of ServerGroup objects

Return type:

ServerGroup

Server Interface Operations

openstack.compute.v2._proxy.Proxy(session, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client, *args, **kwargs)

create_server_interface

create_server_interface(server, **attrs)

특성에서 새 서버 인터페이스 만들기

Parameters:

server The server can be either the ID of a server or aServer instancethat the interface belongs to.attrs (dict) Keyword arguments which will be used to createa ServerInterface,comprised of the properties on the ServerInterface class.

Returns:

The results of server interface creation

Return type:

ServerInterface

delete_server_interface

delete_server_interface(server_interface, server, ignore_missing)

서버 인터페이스 삭제

Parameters:

server_interface The value can be either the ID of a server interface or aServerInterfaceinstance.server This parameter need to be specified when ServerInterfaceID is given as value. It can be either the ID of aserver or a Serverinstance that the interface belongs to.ignore_missing (bool) When set to FalseResourceNotFound will beraised when the server interface does not exist.When set to True, no exception will be set whenattempting to delete a nonexistent server interface.

Returns:

None

get_server_interface

get_server_interface(server_interface, server)

단일 서버 인터페이스 가져오기

Parameters:

server_interface The value can be the ID of a server interface or aServerInterfaceinstance.server This parameter need to be specified when ServerInterfaceID is given as value. It can be either the ID of aserver or a Serverinstance that the interface belongs to.

Returns:

OneServerInterface

Raises:

ResourceNotFoundwhen no resource can be found.

server_interfaces

server_interfaces(server, **query)

서버 인터페이스 생성기 반환

Parameters:

server The server can be either the ID of a server or aServer.query Optional query parameters to be sent to limit theresources being returned.

Returns:

A generator of ServerInterface objects

Return type:

ServerInterface

Availability Zone Operations

openstack.compute.v2._proxy.Proxy(session, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client, *args, **kwargs)

availability_zones

availability_zones(details)

가용 영역의 생성기 반환

Parameters:

details (bool) Return extra details about the availabilityzones. This defaults to False as it generallyrequires extra permission.

Returns:

A generator of availability zone

Return type:

AvailabilityZone

Limits Operations

openstack.compute.v2._proxy.Proxy(session, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client, *args, **kwargs)

get_limits

get_limits(**query)

프로젝트 €™ 계정에 적용되는 제한 검색

Returns:

A Limits object, including bothAbsoluteLimits andRateLimits

Return type:

Limits

Hypervisor Operations

openstack.compute.v2._proxy.Proxy(session, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client, *args, **kwargs)

hypervisors

hypervisors(details, **query)

하이퍼바이저 생성기 반환

Parameters:

details (bool) When set to the default, False,Hypervisorinstances will be returned with only basic information populated.query (kwargs) Optional query parameters to be sent to limitthe resources being returned.

Returns:

A generator of hypervisor

Return type:

class: ~openstack.compute.v2.hypervisor.Hypervisor

find_hypervisor

find_hypervisor(name_or_id, ignore_missing, details)

단일 하이퍼바이저 찾기

Parameters:

name_or_id The name or ID of a hypervisorignore_missing (bool) When set to FalseResourceNotFound will be raised whenthe resource does not exist. When set to True, None will bereturned when attempting to find a nonexistent resource.details (bool) When set to Falseinstances with only basic data will be returned. The default,True, will cause instances with full data to be returned.

Returns:

One: class:~openstack.compute.v2.hypervisor.Hypervisoror None

Raises:

ResourceNotFoundwhen no resource can be found.

Raises:

DuplicateResource when multipleresources are found.

get_hypervisor

get_hypervisor(hypervisor)

단일 하이퍼바이저 확보

Parameters:

hypervisor The value can be the ID of a hypervisor or aHypervisorinstance.

Returns:

A Hypervisor object.

Raises:

ResourceNotFoundwhen no resource can be found.

get_hypervisor_uptime

get_hypervisor_uptime(hypervisor)

하이퍼바이저의 가동 시간 정보 가져오기

Parameters:

hypervisor The value can be the ID of a hypervisor or aHypervisorinstance.

Returns:

A Hypervisor object.

Raises:

ResourceNotFoundwhen no resource can be found.

Extension Operations

openstack.compute.v2._proxy.Proxy(session, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client, *args, **kwargs)

find_extension

find_extension(name_or_id, ignore_missing)

단일 확장자 찾기

Parameters:

name_or_id The name or ID of an extension.ignore_missing (bool) When set to FalseResourceNotFound will beraised when the resource does not exist.When set to True, None will be returned whenattempting to find a nonexistent resource.

Returns:

One Extension orNone

Raises:

ResourceNotFoundwhen no resource can be found.

Raises:

DuplicateResource when multipleresources are found.

extensions

extensions()

확장자 생성기 검색

Returns:

A generator of extension instances.

Return type:

Extension

QuotaSet Operations

openstack.compute.v2._proxy.Proxy(session, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client, *args, **kwargs)

get_quota_set

get_quota_set(project, usage, **query)

프로젝트에 대한 QuotaSet 정보 표시

Parameters:

project ID or instance ofProject of the project forwhich the quota should be retrievedusage (bool) When set to True quota usage and reservationswould be filled.query (dict) Additional query parameters to use.

Returns:

One QuotaSet

Raises:

ResourceNotFoundwhen no resource can be found.

get_quota_set_defaults

get_quota_set_defaults(project)

프로젝트에 대한 QuotaSet 기본값 표시

Parameters:

project ID or instance ofProject of the project forwhich the quota should be retrieved

Returns:

One QuotaSet

Raises:

ResourceNotFoundwhen no resource can be found.

revert_quota_set

revert_quota_set(project, **query)

프로젝트/사용자에 대한 할당량을 재설정합니다.

Parameters:

project ID or instance ofProject of the project forwhich the quota should be resetted.query (dict) Additional parameters to be used.

Returns:

None

update_quota_set

update_quota_set(quota_set, query, **attrs)

QuotaSet을 업데이트합니다.

Parameters:

quota_set Either the ID of a quota_set or aQuotaSet instance.query (dict) Optional parameters to be used with update call.attrs The attributes to update on the QuotaSet representedby quota_set.

Returns:

The updated QuotaSet

Return type:

QuotaSet

Server Migration Operations

openstack.compute.v2._proxy.Proxy(session, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client, *args, **kwargs)

abort_server_migration

abort_server_migration(server_migration, server, ignore_missing)

진행 중인 서버 마이그레이션 중단

Parameters:

server_migration The value can be either the ID of a servermigration or aServerMigrationinstance.server This parameter needs to be specified whenServerMigration ID is given as value. It can be either the ID of aserver or a Server instancethat the migration belongs to.ignore_missing (bool) When set to FalseResourceNotFound will be raised whenthe server migration does not exist. When set to True, noexception will be set when attempting to delete a nonexistentserver migration.

Returns:

None

force_complete_server_migration

force_complete_server_migration(server_migration, server)

진행 중인 서버 마이그레이션 강제 완료

Parameters:

server_migration The value can be either the ID of a servermigration or aServerMigrationinstance.server This parameter needs to be specified whenServerMigration ID is given as value. It can be either the ID of aserver or a Server instancethat the migration belongs to.

Returns:

None

get_server_migration

get_server_migration(server_migration, server, ignore_missing)

단일 서버 마이그레이션

Parameters:

server_migration The value can be the ID of a server migrationor aServerMigrationinstance.server This parameter need to be specified when ServerMigrationID is given as value. It can be either the ID of a server or aServer instance that themigration belongs to.ignore_missing (bool) When set to FalseResourceNotFound will be raised whenthe server migration does not exist. When set to True, noexception will be set when attempting to delete a nonexistentserver migration.

Returns:

OneServerMigration

Raises:

ResourceNotFoundwhen no resource can be found.

server_migrations

server_migrations(server)

서버에 대한 마이그레이션 생성기를 반환합니다.

Parameters:

server The server can be either the ID of a server or aServer.

Returns:

A generator of ServerMigration objects

Return type:

ServerMigration

Migration Operations

openstack.compute.v2._proxy.Proxy(session, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client, *args, **kwargs)

migrations

migrations(**query)

모든 서버에 대한 마이그레이션 생성기를 반환합니다.

Parameters:

query (kwargs) Optional query parameters to be sent to limitthe migrations being returned.

Returns:

A generator of Migration objects

Return type:

Migration

Helpers

openstack.compute.v2._proxy.Proxy(session, statsd_client, statsd_prefix, prometheus_counter, prometheus_histogram, influxdb_config, influxdb_client, *args, **kwargs)

wait_for_delete

wait_for_delete(res, interval, wait, callback)

리소스가 삭제될 때까지 기다립니다.

Parameters:

res The resource to wait on to be deleted.interval Number of seconds to wait before to consecutivechecks. Default to 2.wait Maximum number of seconds to wait before the change.Default to 120.callback A callback function. This will be called with a singlevalue, progress, which is a percentage value from 0-100.

Returns:

The resource is returned on success.

Raises:

ResourceTimeout if transitionto delete failed to occur in the specified seconds.