C# 클래스 ConoHaNet.Objects.Servers.Server

상속: SimpleServer
파일 보기 프로젝트 열기: crowdy/OpenStack-ConoHa

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
AddMetadata ( Metadata metadata ) : bool

Updates the metadata for the server.

For each item in metadata, if the key exists, the value is updated; otherwise, the item is added.

AddMetadata ( string key, string value ) : bool

Adds or updates the value for the specified metadata item.

CreateVirtualInterface ( string networkId ) : VirtualInterface

Creates a virtual interface for the specified network and attaches the network to the server.

Delete ( ) : bool

Marks the server for asynchronous deletion.

The server deletion operation is completed asynchronously. The ServerBase.WaitForDeleted method may be used to block execution until the server is finally deleted.

DeleteMetadata ( Metadata metadata ) : bool

Deletes the specified metadata items from the server.

This method ignores the values in metadata. Metadata items are removed whether or not their current values match those in metadata.

DeleteMetadataItem ( string key ) : bool

Deletes the specified metadata item from the server.

DeleteVirtualInterface ( string virtualInterfaceId ) : bool

Deletes the specified virtual interface from the server.

GetMetadata ( ) : Metadata

Gets the metadata associated with the server.

GetVolumes ( ) : IEnumerable

Lists the volume attachments for the server.

ListAddresses ( ) : ServerAddresses

Lists all networks and server addresses associated with a server.

ListAddressesByNetwork ( string networkLabel ) : IEnumerable

Lists addresses for the server associated with the specified network.

ListVirtualInterfaces ( ) : IEnumerable

Lists the virtual interfaces for the server.

SetMetadata ( Metadata metadata ) : bool

Sets the metadata associated with the server, replacing any existing metadata.

Snapshot ( string imageName, Metadata metadata = null ) : ServerImage

Creates a new snapshot image for the server at its current state.

The server snapshot process is completed asynchronously. To wait for the image to be completed, you may call SimpleServerImage.WaitForActive on the returned image.

UpdateMetadata ( Metadata metadata ) : bool

Updates the metadata for the server.

For each item in metadata, if the key exists, the value is updated; otherwise, the item is added.

UpdateMetadataItem ( string key, string value ) : bool

Sets the value for the specified metadata item. If the key already exists, it is updated; otherwise, a new metadata item is added.

보호된 메소드들

메소드 설명
UpdateThis ( ServerBase server ) : void

메소드 상세

AddMetadata() 공개 메소드

Updates the metadata for the server.
For each item in metadata, if the key exists, the value is updated; otherwise, the item is added.
If is . If contains any values with empty keys. If the REST API request failed.
public AddMetadata ( Metadata metadata ) : bool
metadata Metadata The server metadata to update.
리턴 bool

AddMetadata() 공개 메소드

Adds or updates the value for the specified metadata item.
/// If is . /// -or- /// If is . /// If is empty. If the REST API request failed.
public AddMetadata ( string key, string value ) : bool
key string The metadata key.
value string The new value for the metadata item.
리턴 bool

CreateVirtualInterface() 공개 메소드

Creates a virtual interface for the specified network and attaches the network to the server.
If is . If is empty. If the REST API request failed.
public CreateVirtualInterface ( string networkId ) : VirtualInterface
networkId string The network ID. This is obtained from CloudNetwork.Id.
리턴 VirtualInterface

Delete() 공개 메소드

Marks the server for asynchronous deletion.
The server deletion operation is completed asynchronously. The ServerBase.WaitForDeleted method may be used to block execution until the server is finally deleted.
If the REST API request failed.
public Delete ( ) : bool
리턴 bool

DeleteMetadata() 공개 메소드

Deletes the specified metadata items from the server.
This method ignores the values in metadata. Metadata items are removed whether or not their current values match those in metadata.
If is . If contains a null or empty key. If the REST API request failed.
public DeleteMetadata ( Metadata metadata ) : bool
metadata Metadata A collection of metadata items to delete.
리턴 bool

DeleteMetadataItem() 공개 메소드

Deletes the specified metadata item from the server.
If is . If is empty. If the REST API request failed.
public DeleteMetadataItem ( string key ) : bool
key string The metadata key.
리턴 bool

DeleteVirtualInterface() 공개 메소드

Deletes the specified virtual interface from the server.
If is . If is empty. If the REST API request failed.
public DeleteVirtualInterface ( string virtualInterfaceId ) : bool
virtualInterfaceId string The virtual interface ID. This is obtained from VirtualInterface.Id.
리턴 bool

GetMetadata() 공개 메소드

Gets the metadata associated with the server.
If the REST API request failed.
public GetMetadata ( ) : Metadata
리턴 Metadata

GetVolumes() 공개 메소드

Lists the volume attachments for the server.
If the REST API request failed.
public GetVolumes ( ) : IEnumerable
리턴 IEnumerable

ListAddresses() 공개 메소드

Lists all networks and server addresses associated with a server.
If the REST API request failed.
public ListAddresses ( ) : ServerAddresses
리턴 ServerAddresses

ListAddressesByNetwork() 공개 메소드

Lists addresses for the server associated with the specified network.
If is . If is empty. If the REST API request failed.
public ListAddressesByNetwork ( string networkLabel ) : IEnumerable
networkLabel string The network label. This is obtained from CloudNetwork.Label.
리턴 IEnumerable

ListVirtualInterfaces() 공개 메소드

Lists the virtual interfaces for the server.
If the REST API request failed.
public ListVirtualInterfaces ( ) : IEnumerable
리턴 IEnumerable

SetMetadata() 공개 메소드

Sets the metadata associated with the server, replacing any existing metadata.
If is . If contains any values with empty keys. If the REST API request failed.
public SetMetadata ( Metadata metadata ) : bool
metadata Metadata The metadata to associate with the server.
리턴 bool

Snapshot() 공개 메소드

Creates a new snapshot image for the server at its current state.
The server snapshot process is completed asynchronously. To wait for the image to be completed, you may call SimpleServerImage.WaitForActive on the returned image.
If is . If is empty. If the REST API request failed.
public Snapshot ( string imageName, Metadata metadata = null ) : ServerImage
imageName string Name of the new image.
metadata Metadata The metadata to associate to the new image.
리턴 ServerImage

UpdateMetadata() 공개 메소드

Updates the metadata for the server.
For each item in metadata, if the key exists, the value is updated; otherwise, the item is added.
If is . If contains any values with empty keys. If the REST API request failed.
public UpdateMetadata ( Metadata metadata ) : bool
metadata Metadata The server metadata to update.
리턴 bool

UpdateMetadataItem() 공개 메소드

Sets the value for the specified metadata item. If the key already exists, it is updated; otherwise, a new metadata item is added.
/// If is . /// -or- /// If is . /// If is empty. If the REST API request failed.
public UpdateMetadataItem ( string key, string value ) : bool
key string The metadata key.
value string The new value for the metadata item.
리턴 bool

UpdateThis() 보호된 메소드

protected UpdateThis ( ServerBase server ) : void
server ServerBase
리턴 void