Multi-region support for WindowsInstance

During implementation of multi-regions many of the
objects that used to be in Environment were moved
to the CloudRegion. Instance/LinuxMuranoInstance
classes were updated for the change, but WindowsInstance
was forgotten. This commit brings similar change to the
WindowsInstance class.

Change-Id: Iabbf7ec1fc0ef0dffc09eaefdece54d7f0d98058
Closes-Bug: #1643971
(cherry picked from commit 3f53c5ea07)
This commit is contained in:
Stan Lagun 2016-11-22 22:12:45 -08:00
parent d287aea7b0
commit edb198d1f0
1 changed files with 6 additions and 6 deletions

View File

@ -25,20 +25,20 @@ Methods:
- groupName:
Contract: $.string().notNull()
Body:
- $environment: $.find(std:Environment).require()
- $region: $.getRegion()
- $rules:
- ToPort: 3389
IpProtocol: tcp
FromPort: 3389
External: true
- $environment.securityGroupManager.addGroupIngress(
- $region.securityGroupManager.addGroupIngress(
rules => $rules, groupName => $groupName)
prepareUserData:
Body:
- $region: $.getRegion()
- $rabbitMqParams: $region.getConfig().agentRabbitMq
- $resources: new(sys:Resources)
- $environment: $.find(std:Environment).require()
- $rabbitMqParams: $environment.regionConfigs.get($environment.region).agentRabbitMq
- $configFile: $resources.string('Agent-v1.template')
- $initScript: $resources.string('windows-init.ps1')
- $configReplacements:
@ -49,12 +49,12 @@ Methods:
"%RABBITMQ_VHOST%": $rabbitMqParams.virtual_host
"%RABBITMQ_SSL%": str($rabbitMqParams.ssl).toLower()
"%RABBITMQ_INPUT_QUEUE%": $.agent.queueName()
"%RESULT_QUEUE%": $environment.agentListener.queueName()
"%RESULT_QUEUE%": $region.agentListener.queueName()
- $scriptReplacements:
"%AGENT_CONFIG_BASE64%": base64encode($configFile.replace($configReplacements))
"%INTERNAL_HOSTNAME%": $.name
"%MURANO_SERVER_ADDRESS%": coalesce(config(file_server), $rabbitMqParams.host)
"%CA_ROOT_CERT_BASE64%": ""
- Return:
- Return:
data: $initScript.replace($scriptReplacements)
format: HEAT_CFNTOOLS