C# Class ConoHaNet.Objects.Servers.Server

Inheritance: SimpleServer
Afficher le fichier Open project: crowdy/OpenStack-ConoHa

Private Properties

Свойство Type Description

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
UpdateThis ( ServerBase server ) : void

Method Details

AddMetadata() public méthode

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.
Résultat bool

AddMetadata() public méthode

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.
Résultat bool

CreateVirtualInterface() public méthode

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.
Résultat VirtualInterface

Delete() public méthode

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
Résultat bool

DeleteMetadata() public méthode

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.
Résultat bool

DeleteMetadataItem() public méthode

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.
Résultat bool

DeleteVirtualInterface() public méthode

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.
Résultat bool

GetMetadata() public méthode

Gets the metadata associated with the server.
If the REST API request failed.
public GetMetadata ( ) : Metadata
Résultat Metadata

GetVolumes() public méthode

Lists the volume attachments for the server.
If the REST API request failed.
public GetVolumes ( ) : IEnumerable
Résultat IEnumerable

ListAddresses() public méthode

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

ListAddressesByNetwork() public méthode

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.
Résultat IEnumerable

ListVirtualInterfaces() public méthode

Lists the virtual interfaces for the server.
If the REST API request failed.
public ListVirtualInterfaces ( ) : IEnumerable
Résultat IEnumerable

SetMetadata() public méthode

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.
Résultat bool

Snapshot() public méthode

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.
Résultat ServerImage

UpdateMetadata() public méthode

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.
Résultat bool

UpdateMetadataItem() public méthode

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.
Résultat bool

UpdateThis() protected méthode

protected UpdateThis ( ServerBase server ) : void
server ServerBase
Résultat void