~nskaggs/juju-ci-tools/add-assess-terms

« back to all changes in this revision

Viewing changes to jujupy.py

  • Committer: Curtis Hovey
  • Date: 2016-11-14 20:10:26 UTC
  • mto: This revision was merged to the branch mainline in revision 1726.
  • Revision ID: curtis@canonical.com-20161114201026-315ys51e1ct7f413
Rename disable_command_* to command_set_*.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1039
1039
    reserved_spaces = frozenset([
1040
1040
        'endpoint-bindings-data', 'endpoint-bindings-public'])
1041
1041
 
1042
 
    disable_command_destroy_model = 'destroy-model'
1043
 
 
1044
 
    disable_command_remove_object = 'remove-object'
1045
 
 
1046
 
    disable_command_all = 'all'
 
1042
    command_set_destroy_model = 'destroy-model'
 
1043
 
 
1044
    command_set_remove_object = 'remove-object'
 
1045
 
 
1046
    command_set_all = 'all'
1047
1047
 
1048
1048
    @classmethod
1049
1049
    def preferred_container(cls):
2408
2408
        return yaml.safe_load(raw)
2409
2409
 
2410
2410
    def disable_command(self, command_set, message=''):
2411
 
        """Disable a command set."""
 
2411
        """Disable a command-set."""
2412
2412
        return self.juju('disable-command', (command_set, message))
2413
2413
 
2414
2414
    def enable_command(self, args):
2415
 
        """Enable a command set."""
 
2415
        """Enable a command-set."""
2416
2416
        return self.juju('enable-command', args)
2417
2417
 
2418
2418
    def sync_tools(self, local_dir=None):
2489
2489
 
2490
2490
    _show_status = 'status'
2491
2491
 
2492
 
    disable_command_destroy_model = 'destroy-environment'
2493
 
 
2494
 
    disable_command_remove_object = 'remove-object'
2495
 
 
2496
 
    disable_command_all = 'all-changes'
 
2492
    command_set_destroy_model = 'destroy-environment'
 
2493
 
 
2494
    command_set_all = 'all-changes'
2497
2495
 
2498
2496
    @classmethod
2499
2497
    def _get_env(cls, env):
2913
2911
        return yaml.safe_load(raw)
2914
2912
 
2915
2913
    def disable_command(self, command_set, message=''):
2916
 
        """Disable a command set."""
 
2914
        """Disable a command-set."""
2917
2915
        return self.juju('block {}'.format(command_set), (message, ))
2918
2916
 
2919
2917
    def enable_command(self, args):
2920
 
        """Enable a command set."""
 
2918
        """Enable a command-set."""
2921
2919
        return self.juju('unblock', args)
2922
2920
 
2923
2921