Class: UU::OperationRegistry::ResourceGroup

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

Overview

Resource group.

Constant Summary

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (ResourceGroup) initialize(session = nil)

Creates a new instance of ResourceGroup.

Parameters:

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

    Session to use for remote calls.



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

def initialize(session = nil)
  super
end

Class Method Details

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

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

Parameters:

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

    Region URI.

  • attributes (Hash)

    ResourceGroup attributes.

Returns:

  • (UU::OS::UESURI)

    UESURI of the created resource group.



# File 'lib/uu/operation_registry/resource_group.rb', line 32

+ (void) delete(resource_group_uri)

This method returns an undefined value.

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

Parameters:

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

    ResourceGroup URI.



# File 'lib/uu/operation_registry/resource_group.rb', line 73

+ (Hash) get_attributes(resource_group_uri)

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

Parameters:

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

    ResourceGroup URI.

Returns:

  • (Hash)

    ResourceGroup attributes.



# File 'lib/uu/operation_registry/resource_group.rb', line 45

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

Returns list of resource groups. This method is a convenience shortcut for the #get_resource_group_list instance method.

Returns:

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

    Paged result set.

See Also:



100
101
102
# File 'lib/uu/operation_registry/resource_group.rb', line 100

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

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

Sets attributes of a resource group. This method is a convenience shortcut for the #set_attributes instance method.

Parameters:

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

    ResourceGroup URI.

Returns:

  • (UU::OS::UESURI)

    UESURI of the updated resource group.



# File 'lib/uu/operation_registry/resource_group.rb', line 62

Instance Method Details

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

Creates a new resource group.

Parameters:

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

    Region URI.

  • attributes (Hash)

    ResourceGroup attributes.

Options Hash (attributes):

  • name (String)

    ResourceGroup name. May be nil.

  • code (String)

    ResourceGroup code. May be nil.

  • description (String)

    ResourceGroup description. May be nil.

Returns:

  • (UU::OS::UESURI)

    UESURI of the created resource group.



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

- (void) delete(resource_group_uri)

This method returns an undefined value.

Deletes the specified resource group from the registry.

Parameters:

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

    ResourceGroup URI.



# File 'lib/uu/operation_registry/resource_group.rb', line 68

- (Hash) get_attributes(resource_group_uri)

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

Parameters:

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

    ResourceGroup URI.

Returns:

  • (Hash)

    ResourceGroup attributes.



# File 'lib/uu/operation_registry/resource_group.rb', line 39

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

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

Parameters:

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

    Region URI.

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

    Criteria for listing resource groups.

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.



91
92
93
# File 'lib/uu/operation_registry/resource_group.rb', line 91

def get_resource_group_list(region_uri, criteria = {})
  client.invoke(:getResourceGroupList, region_uri, parameters: criteria)
end

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

Sets attributes of a resource group.

Parameters:

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

    ResourceGroup URI.

  • attributes (Hash)

    ResourceGroup attributes.

Options Hash (attributes):

  • name (String)

    ResourceGroup name. May be nil.

  • code (String)

    ResourceGroup code. May be nil.

  • description (String)

    ResourceGroup description. May be nil.

Returns:

  • (UU::OS::UESURI)

    UESURI of the updated resource group.



# File 'lib/uu/operation_registry/resource_group.rb', line 52