Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
advornic committed Feb 9, 2015
1 parent 9d49680 commit 13ff740
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions actions/run_bash_script
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ def main(attributes):
-
action: run_bash_script
attributes:
url: files/templates/ma1.template
url: files/scripts/install_script
variables:
version: 1.2.3
name: "install temp package"
name: 'install temp package'
'''

node = attributes.get('NODE')
Expand Down
10 changes: 6 additions & 4 deletions actions/run_cli_commands
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def main(attributes):
url: files/templates/ma1.template
variables:
ipaddress: allocate('mgmt_subnet')
name: "configure ma1"
name: 'configure ma1'
'''

node = attributes.get('NODE')
Expand All @@ -81,14 +81,16 @@ def main(attributes):
raise Exception('Unable to perform variable substitution - '
'invalid variables')


contents = node.substitute(contents, variables)
commands = [x for x in contents.split('\n') if x]

try:
node.api_enable_cmds(contents.split('\n'),
node.api_enable_cmds(commands,
text_format=True)
except Exception as exc:
raise Exception('Running CLI commands failed: %s' %
exc.message)
raise Exception('Running CLI commands %s failed: %s' %
(commands, exc.message))

# Only remove this in case everything else succeeded
# for debugging purposes
Expand Down

0 comments on commit 13ff740

Please sign in to comment.