Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Commit

Permalink
Fix call to retrieve HA address
Browse files Browse the repository at this point in the history
  • Loading branch information
danhigham committed Mar 1, 2016
1 parent 4aa7ea2 commit d722bf0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 1 addition & 6 deletions install_steps/configure_security_groups.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions install_steps/index_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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

0 comments on commit d722bf0

Please sign in to comment.