Mercurial > public > mercurial-scm > hg
comparison contrib/automation/hgautomation/aws.py @ 42647:8804aa6c07a0 stable
automation: extract strings to constants
Differential Revision: https://phab.mercurial-scm.org/D6672
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 22 Jul 2019 18:55:52 -0700 |
parents | 92a99822e731 |
children | d80edcb0b30c |
comparison
equal
deleted
inserted
replaced
42646:92a99822e731 | 42647:8804aa6c07a0 |
---|---|
50 'x1', | 50 'x1', |
51 'z1d', | 51 'z1d', |
52 } | 52 } |
53 | 53 |
54 | 54 |
55 AMAZON_ACCOUNT_ID = '801119661308' | |
55 DEBIAN_ACCOUNT_ID = '379101102735' | 56 DEBIAN_ACCOUNT_ID = '379101102735' |
56 UBUNTU_ACCOUNT_ID = '099720109477' | 57 UBUNTU_ACCOUNT_ID = '099720109477' |
58 | |
59 | |
60 WINDOWS_BASE_IMAGE_NAME = 'Windows_Server-2019-English-Full-Base-2019.07.12' | |
57 | 61 |
58 | 62 |
59 KEY_PAIRS = { | 63 KEY_PAIRS = { |
60 'automation', | 64 'automation', |
61 } | 65 } |
1044 ec2resource = c.ec2resource | 1048 ec2resource = c.ec2resource |
1045 ssmclient = c.session.client('ssm') | 1049 ssmclient = c.session.client('ssm') |
1046 | 1050 |
1047 name = '%s%s' % (prefix, 'windows-dev') | 1051 name = '%s%s' % (prefix, 'windows-dev') |
1048 | 1052 |
1049 image = find_image(ec2resource, | 1053 image = find_image(ec2resource, AMAZON_ACCOUNT_ID, WINDOWS_BASE_IMAGE_NAME) |
1050 '801119661308', | |
1051 'Windows_Server-2019-English-Full-Base-2019.07.12') | |
1052 | 1054 |
1053 config = { | 1055 config = { |
1054 'BlockDeviceMappings': [ | 1056 'BlockDeviceMappings': [ |
1055 { | 1057 { |
1056 'DeviceName': '/dev/sda1', | 1058 'DeviceName': '/dev/sda1', |