Class: UU::C3::ResourceGroup
- Inherits:
-
Object
- Object
- UU::C3::ResourceGroup
- Defined in:
- lib/uu/c3/resource_group.rb
Overview
Client of service providing operations for self-service deployment of uuApps.
Class Method Summary collapse
-
.swap(resource_group_uri) ⇒ Object
Swaps all applications in all ResourcePools of this ResourceGroup between
PRODUCTION
andBETA
slots.
Instance Method Summary collapse
-
#initialize(session = nil) ⇒ ResourceGroup
constructor
Creates a new instance of
ResourceGroup
. -
#swap(resource_group_uri) ⇒ UU::OS::Lang::Future
Swaps all applications in all ResourcePools of this ResourceGroup between
PRODUCTION
andBETA
slots.
Constructor Details
#initialize(session = nil) ⇒ ResourceGroup
Creates a new instance of ResourceGroup
.
35 36 37 |
# File 'lib/uu/c3/resource_group.rb', line 35 def initialize(session = nil) @client = UU::OS::CMD::CommandClient.new(PATH, session) end |
Class Method Details
.swap(resource_group_uri) ⇒ Object
This command expects that all applications in all ResourcePools of this ResourceGroup are deployed in both slots and are prepared for AppDeployment#swap. I.e. they are properly scaled.
Ignores applications in UNDEPLOYED
state.
This command cannot be called unless there is a slotMapping
attribute set on ResourceGroup. The value is irrelevant as long as it is
not nil
.
Don’t call any other commands which causes updates (i.e. deploy, undeploy, redeploy, share, unshare, scale) until asynchronous part of this command finishes.
The applications are first swapped in uuCloudg01OperationRegistry and all the gateways are updated at the end at once. So until the command finishes the applications might not be available.
Swaps all applications in all ResourcePools of this ResourceGroup between
PRODUCTION
and BETA
slots.
68 69 70 |
# File 'lib/uu/c3/resource_group.rb', line 68 def self.swap(resource_group_uri) self.new(UU::OS::Security::Session.current_session).swap(resource_group_uri) end |
Instance Method Details
#swap(resource_group_uri) ⇒ UU::OS::Lang::Future
This command expects that all applications in all ResourcePools of this ResourceGroup are deployed in both slots and are prepared for AppDeployment#swap. I.e. they are properly scaled.
Ignores applications in UNDEPLOYED
state.
This command cannot be called unless there is a slotMapping
attribute set on ResourceGroup. The value is irrelevant as long as it is
not nil
.
Don’t call any other commands which causes updates (i.e. deploy, undeploy, redeploy, share, unshare, scale) until asynchronous part of this command finishes.
The applications are first swapped in uuCloudg01OperationRegistry and all the gateways are updated at the end at once. So until the command finishes the applications might not be available.
Swaps all applications in all ResourcePools of this ResourceGroup between
PRODUCTION
and BETA
slots.
52 53 54 |
# File 'lib/uu/c3/resource_group.rb', line 52 def swap(resource_group_uri) @client.invoke(:swap, resource_group_uri, parameters: {}) end |