Class: UU::OperationRegistry::NodeImage

Inherits:
BaseMethods
  • Object
show all
Defined in:
lib/uu/operation_registry/node_image.rb

Overview

Node image.

Constant Summary

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (NodeImage) initialize(session = nil)

Creates a new instance of Image.

Parameters:

  • session (UU::OS::Security::Session) (defaults to: nil)

    Session to use for remote calls.



18
19
20
# File 'lib/uu/operation_registry/node_image.rb', line 18

def initialize(session = nil)
  super
end

Class Method Details

+ (UU::OS::UESURI) create(cloud_uri, attributes)

Creates a new image. This method is a convenience shortcut for the #create instance method.

Parameters:

  • cloud_uri (String, UU::OS::UESURI)

    Cloud URI.

  • attributes (Hash)

    Image attributes.

Returns:

  • (UU::OS::UESURI)

    UESURI of the created image.



# File 'lib/uu/operation_registry/node_image.rb', line 40

+ (void) delete(node_image_uri)

This method returns an undefined value.

Deletes the specified image from the registry. This method is a convenience shortcut for the #delete instance method.

Parameters:

  • node_image_uri (String, UU::OS::UESURI)

    Image URI.



# File 'lib/uu/operation_registry/node_image.rb', line 83

+ (Hash) get_attributes(node_image_uri)

Gets the attributes of the image specified by image URI and returns its detail. This method is a convenience shortcut for the #get_attributes instance method.

Parameters:

  • node_image_uri (String, UU::OS::UESURI)

    Image URI.

Returns:

  • (Hash)

    Image attributes.



# File 'lib/uu/operation_registry/node_image.rb', line 53

+ (UU::OS::Persistence::PagedResult<Hash>) get_node_image_list(cloud_uri, criteria = {})

Returns list of images. This method is a convenience shortcut for the #get_node_image_list instance method.

Returns:

  • (UU::OS::Persistence::PagedResult<Hash>)

    Paged result set.

See Also:



110
111
112
# File 'lib/uu/operation_registry/node_image.rb', line 110

def self.get_node_image_list(cloud_uri, criteria = {})
  self.new(UU::OS::Security::Session.current_session).get_node_image_list(cloud_uri, criteria)
end

+ (UU::OS::UESURI) set_attributes(node_image_uri, attributes)

Sets attributes of an image. This method is a convenience shortcut for the #set_attributes instance method.

Parameters:

  • node_image_uri (String, UU::OS::UESURI)

    Image URI.

Returns:

  • (UU::OS::UESURI)

    UESURI of the updated image.



# File 'lib/uu/operation_registry/node_image.rb', line 72

Instance Method Details

- (UU::OS::UESURI) create(cloud_uri, attributes)

Creates a new image.

Parameters:

  • cloud_uri (String, UU::OS::UESURI)

    Cloud URI.

  • attributes (Hash)

    Image attributes.

Options Hash (attributes):

  • name (String)

    Image name.

  • code (String)

    Image code. May be nil.

  • description (String)

    Image description. May be nil.

  • nodeSizeUri (UU::OS::UESURI)

    Base class URI. May be nil.

  • inboundPorts (Array<Fixnum>)

    Inbound ports. May be nil.

  • imageUrl (String)

    Physical location of the actual image. May be nil.

  • runtimeStackUri (UU:OS::UESURI)

    Stack URI. May be nil.

  • appDeploymentUri (UU::OS::UESURI)

    UESURI of deployment that this image belongs to. May be nil.

Returns:

  • (UU::OS::UESURI)

    UESURI of the created image.



# File 'lib/uu/operation_registry/node_image.rb', line 22

- (void) delete(node_image_uri)

This method returns an undefined value.

Deletes the specified image from the registry.

Parameters:

  • node_image_uri (String, UU::OS::UESURI)

    Image URI.



# File 'lib/uu/operation_registry/node_image.rb', line 78

- (Hash) get_attributes(node_image_uri)

Gets the attributes of the image specified by image URI and returns its detail.

Parameters:

  • node_image_uri (String, UU::OS::UESURI)

    Image URI.

Returns:

  • (Hash)

    Image attributes.



# File 'lib/uu/operation_registry/node_image.rb', line 47

- (UU::OS::Persistence::PagedResult<Hash>) get_node_image_list(cloud_uri, criteria = {})

Returns a list of images in the given cloud. Command does not return all images, only a sublist. The list of returned images could be filtered using Mongo Query.

Parameters:

  • cloud_uri (String, UU::OS::UESURI)

    Cloud URI.

  • criteria (Hash) (defaults to: {})

    Criteria for listing images.

Options Hash (criteria):

  • query (String)

    Mongo Query to filter the result set. See Mongo Query tutorial.

  • pageIndex (Fixnum)

    Result set page index.

  • pageSize (Fixnum)

    Result set page size.

Returns:

  • (UU::OS::Persistence::PagedResult<Hash>)

    Paged result set.



101
102
103
# File 'lib/uu/operation_registry/node_image.rb', line 101

def get_node_image_list(cloud_uri, criteria = {})
  @client.invoke(:getNodeImageList, cloud_uri, parameters: criteria)
end

- (UU::OS::UESURI) set_attributes(node_image_uri, attributes)

Sets attributes of an image.

Parameters:

  • node_image_uri (String, UU::OS::UESURI)

    Image URI.

  • attributes (Hash)

    Image attributes.

Options Hash (attributes):

  • name (String)

    Image name. May be nil.

  • code (String)

    Image code. May be nil.

  • description (String)

    Image description. May be nil.

  • appDeploymentUri (UU::OS::UESURI)

    UESURI of deployment that this image belongs to. May be nil.

Returns:

  • (UU::OS::UESURI)

    UESURI of the updated image.



# File 'lib/uu/operation_registry/node_image.rb', line 60