From d722bf09ce7a6990e39836722b8ceb5570c4b944 Mon Sep 17 00:00:00 2001 From: Dan Higham Date: Mon, 29 Feb 2016 18:47:37 -0800 Subject: [PATCH] Fix call to retrieve HA address --- install_steps/configure_security_groups.py | 7 +------ install_steps/index_client.py | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/install_steps/configure_security_groups.py b/install_steps/configure_security_groups.py index 2176c69..ef3cb5b 100644 --- a/install_steps/configure_security_groups.py +++ b/install_steps/configure_security_groups.py @@ -1,4 +1,3 @@ -from install_steps import bosh_client from install_steps import index_client from azure.mgmt.network import NetworkResourceProviderClient, SecurityRule from azure.mgmt.network.networkresourceprovider import SecurityRuleOperations @@ -50,17 +49,13 @@ def do_step(context): settings = context.meta['settings'] # cf specific configuration (configure security groups for haproxy) - deployment_name = "elastic-runtime" subscription_id = settings['SUBSCRIPTION-ID'] tenant = settings['TENANT-ID'] endpoint = "https://login.microsoftonline.com/{0}/oauth2/token".format(tenant) client_token = settings['CLIENT-ID'] client_secret = settings['CLIENT-SECRET'] - client = bosh_client.BoshClient("https://10.0.0.4:25555", "admin", "admin") - ip_table = client.ip_table(deployment_name) - - ha_proxy_address = ip_table['haproxy'][0] + ha_proxy_address = get_ha_proxy_address(context) token = get_token_from_client_credentials(endpoint, client_token, client_secret) creds = SubscriptionCloudCredentials(subscription_id, token) diff --git a/install_steps/index_client.py b/install_steps/index_client.py index 31d8b0f..ff2b468 100644 --- a/install_steps/index_client.py +++ b/install_steps/index_client.py @@ -3,7 +3,7 @@ class IndexClient: def __init__(self, index_file): - self.index_file = index_file + self.index_file = "manifests/{0}".format(index_file) with open(self.index_file, 'r') as stream: content = stream.read() @@ -14,7 +14,7 @@ def __init__(self, index_file): def find_by_release(self, release_name): for manifest in self.doc['manifests']: - if manifest['release_name'] == release_name: + if manifest['release-name'] == release_name: return manifest return None