Class: UU::OperationRegistry::ResourcePool
- Inherits:
-
BaseMethods
- Object
- BaseMethods
- UU::OperationRegistry::ResourcePool
- Defined in:
- lib/uu/operation_registry/resource_pool.rb
Overview
Resource pool.
Class Method Summary collapse
-
.allocate_capacity(resource_pool_uri, criteria = {}) ⇒ NilClass
Allocates new capacity in ResourcePool and ResourceGroup.
-
.create(tenant_uri, attributes) ⇒ UU::OS::UESURI
Creates a new resource pool.
-
.deallocate_capacity(resource_pool_uri, criteria = {}) ⇒ NilClass
Releases capacity allocated in ResourcePool and ResourceGroup.
-
.delete(resource_pool_uri) ⇒ void
Deletes the specified pool from the registry.
-
.get_attributes(resource_pool_uri) ⇒ Hash
Gets the attributes of the pool specified by pool URI and returns its detail.
-
.get_resource_pool_list(tenant_uri, criteria = {}) ⇒ UU::OS::Persistence::PagedResult<Hash>
Returns list of resource pools.
-
.set_attributes(resource_pool_uri, attributes) ⇒ UU::OS::UESURI
Sets attributes of a pool.
Instance Method Summary collapse
-
#allocate_capacity(resource_pool_uri, criteria = {}) ⇒ NilClass
Allocates new capacity in ResourcePool and ResourceGroup.
-
#create(tenant_uri, attributes) ⇒ UU::OS::UESURI
Creates a new resource pool.
-
#deallocate_capacity(resource_pool_uri, criteria = {}) ⇒ NilClass
Releases capacity allocated in ResourcePool and ResourceGroup.
-
#delete(resource_pool_uri) ⇒ void
Deletes the specified pool from the registry.
-
#get_attributes(resource_pool_uri) ⇒ Hash
Gets the attributes of the pool specified by pool URI and returns its detail.
-
#get_resource_pool_list(tenant_uri, criteria = {}) ⇒ UU::OS::Persistence::PagedResult<Hash>
Returns a list of resource pools in the given tenant.
-
#initialize(session = nil) ⇒ ResourcePool
constructor
Creates a new instance of Resource pool.
-
#set_attributes(resource_pool_uri, attributes) ⇒ UU::OS::UESURI
Sets attributes of a pool.
Constructor Details
#initialize(session = nil) ⇒ ResourcePool
Creates a new instance of Resource pool.
18 19 20 |
# File 'lib/uu/operation_registry/resource_pool.rb', line 18 def initialize(session = nil) super end |
Class Method Details
.allocate_capacity(resource_pool_uri, criteria = {}) ⇒ NilClass
Allocates new capacity in ResourcePool and ResourceGroup. This method is a convenience shortcut for the #allocate_capacity instance method.
194 195 196 |
# File 'lib/uu/operation_registry/resource_pool.rb', line 194 def self.allocate_capacity(resource_pool_uri, criteria = {}) self.new(UU::OS::Security::Session.current_session).allocate_capacity(resource_pool_uri, criteria) end |
.create(tenant_uri, attributes) ⇒ UU::OS::UESURI
Creates a new resource pool. This method is a convenience shortcut for the #create instance method.
|
# File 'lib/uu/operation_registry/resource_pool.rb', line 48
|
.deallocate_capacity(resource_pool_uri, criteria = {}) ⇒ NilClass
Releases capacity allocated in ResourcePool and ResourceGroup. This method is a convenience shortcut for the #deallocate_capacity instance method.
216 217 218 |
# File 'lib/uu/operation_registry/resource_pool.rb', line 216 def self.deallocate_capacity(resource_pool_uri, criteria = {}) self.new(UU::OS::Security::Session.current_session).deallocate_capacity(resource_pool_uri, criteria) end |
.delete(resource_pool_uri) ⇒ void
This method returns an undefined value.
Deletes the specified pool from the registry. This method is a convenience shortcut for the #delete instance method.
|
# File 'lib/uu/operation_registry/resource_pool.rb', line 143
|
.get_attributes(resource_pool_uri) ⇒ Hash
Gets the attributes of the pool specified by pool URI and returns its detail. This method is a convenience shortcut for the #get_attributes instance method.
|
# File 'lib/uu/operation_registry/resource_pool.rb', line 61
|
.get_resource_pool_list(tenant_uri, criteria = {}) ⇒ UU::OS::Persistence::PagedResult<Hash>
Returns list of resource pools. This method is a convenience shortcut for the #get_resource_pool_list instance method.
172 173 174 |
# File 'lib/uu/operation_registry/resource_pool.rb', line 172 def self.get_resource_pool_list(tenant_uri, criteria = {}) self.new(UU::OS::Security::Session.current_session).get_resource_pool_list(tenant_uri, criteria) end |
.set_attributes(resource_pool_uri, attributes) ⇒ UU::OS::UESURI
Sets attributes of a pool. This method is a convenience shortcut for the #set_attributes instance method.
|
# File 'lib/uu/operation_registry/resource_pool.rb', line 132
|
Instance Method Details
#allocate_capacity(resource_pool_uri, criteria = {}) ⇒ NilClass
Allocates new capacity in ResourcePool and ResourceGroup. Also creates a new record to CapacityLog. Usable for ResourceGroup and ResourcePool managed by SwarmNodeProvider.
185 186 187 |
# File 'lib/uu/operation_registry/resource_pool.rb', line 185 def allocate_capacity(resource_pool_uri, criteria = {}) @client.invoke(:allocateCapacity, resource_pool_uri, parameters: criteria) end |
#create(tenant_uri, attributes) ⇒ UU::OS::UESURI
Creates a new resource pool.
|
# File 'lib/uu/operation_registry/resource_pool.rb', line 22
|
#deallocate_capacity(resource_pool_uri, criteria = {}) ⇒ NilClass
Releases capacity allocated in ResourcePool and ResourceGroup. Also creates a new record to CapacityLog. Usable for ResourceGroup and ResourcePool managed by SwarmNodeProvider.
207 208 209 |
# File 'lib/uu/operation_registry/resource_pool.rb', line 207 def deallocate_capacity(resource_pool_uri, criteria = {}) @client.invoke(:deallocateCapacity, resource_pool_uri, parameters: criteria) end |
#delete(resource_pool_uri) ⇒ void
This method returns an undefined value.
Deletes the specified pool from the registry.
|
# File 'lib/uu/operation_registry/resource_pool.rb', line 138
|
#get_attributes(resource_pool_uri) ⇒ Hash
Gets the attributes of the pool specified by pool URI and returns its detail.
|
# File 'lib/uu/operation_registry/resource_pool.rb', line 55
|
#get_resource_pool_list(tenant_uri, criteria = {}) ⇒ UU::OS::Persistence::PagedResult<Hash>
Returns a list of resource pools in the given tenant. Command does not return all resource pools, only a sublist. The list of returned resource pools could be filtered using Mongo Query.
163 164 165 |
# File 'lib/uu/operation_registry/resource_pool.rb', line 163 def get_resource_pool_list(tenant_uri, criteria = {}) @client.invoke(:getResourcePoolList, tenant_uri, parameters: criteria) end |
#set_attributes(resource_pool_uri, attributes) ⇒ UU::OS::UESURI
Sets attributes of a pool.
|
# File 'lib/uu/operation_registry/resource_pool.rb', line 68
|