tests: update gcloud.py to match terraform config
This commit is contained in:
parent
4dfbe82e76
commit
5ed0b93669
|
@ -14,14 +14,14 @@ import googleapiclient.discovery
|
||||||
def main():
|
def main():
|
||||||
project = 'mitogen-load-testing'
|
project = 'mitogen-load-testing'
|
||||||
zone = 'europe-west1-d'
|
zone = 'europe-west1-d'
|
||||||
group_name = 'micro-debian9'
|
prefix = 'node-'
|
||||||
|
|
||||||
client = googleapiclient.discovery.build('compute', 'v1')
|
client = googleapiclient.discovery.build('compute', 'v1')
|
||||||
resp = client.instances().list(project=project, zone=zone).execute()
|
resp = client.instances().list(project=project, zone=zone).execute()
|
||||||
|
|
||||||
ips = []
|
ips = []
|
||||||
for inst in resp['items']:
|
for inst in resp['items']:
|
||||||
if inst['status'] == 'RUNNING' and inst['name'].startswith(group_name):
|
if inst['status'] == 'RUNNING' and inst['name'].startswith(prefix):
|
||||||
ips.extend(
|
ips.extend(
|
||||||
#bytes(config['natIP'])
|
#bytes(config['natIP'])
|
||||||
bytes(interface['networkIP'])
|
bytes(interface['networkIP'])
|
||||||
|
|
Loading…
Reference in New Issue