~ajkavanagh/openstack-mojo-specs/remove-cinder-from-vrrp-ha

« back to all changes in this revision

Viewing changes to helper/utils/mojo_utils.py

  • Committer: Ryan Beisner
  • Date: 2017-09-05 17:00:36 UTC
  • Revision ID: ryan.beisner@canonical.com-20170905170036-3oxqpn49bnmhgdxl
Additional switch cmd update

Show diffs side-by-side

added added

removed removed

Lines of Context:
509
509
    # Switch and path are now mutually exclusive
510
510
    if switch and switch.get(svc):
511
511
        cmd.extend(['--switch', charm_dir, svc])
512
 
    elif not switch:
 
512
    elif switch and not switch.get(svc):
 
513
        raise Exception('Ambiguous upgrade_service usage: {} {} '
 
514
                        '{}'.format(charm_dir, svc, switch))
 
515
    else:
513
516
        cmd.extend(['--path', charm_dir, svc])
514
517
    subprocess.check_call(cmd)
515
518