Skip to content

Commit

Permalink
Added unccommited file. (hitachienergy#542)
Browse files Browse the repository at this point in the history
* Commit forgotten file.
  • Loading branch information
seriva authored Oct 1, 2019
1 parent d6d6bd2 commit 84ad816
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/src/epicli/cli/engine/providers/azure/APIProxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ def login_account(self):
return subscription

def login_sp(self, sp_data):
return self.run(self, f'az login --service-principal -u {sp_data.name} -p {sp_data.password} --tenant {sp_data.tenant}')
name = sp_data['name']
password = sp_data['password']
tenant = sp_data['tenant']
return self.run(self, f'az login --service-principal -u {name} -p {password} --tenant {tenant}')

def set_active_subscribtion(self, subscription_id):
self.run(self, f'az account set --subscription {subscription_id}')
Expand All @@ -44,7 +47,7 @@ def create_sp(self, app_name, subscription_id):
#TODO: make role configurable?
sp = self.run(self, f'az ad sp create-for-rbac -n "{app_name}" --role="Contributor" --scopes="/subscriptions/{subscription_id}"')
# Sleep for a while. Sometimes the call returns before the rights of the SP are finished creating.
self.wait(self, 20)
self.wait(self, 60)
return sp

def get_ips_for_feature(self, component_key):
Expand Down

0 comments on commit 84ad816

Please sign in to comment.