~andrewjbeach/juju-ci-tools/make-local-patcher

« back to all changes in this revision

Viewing changes to fakejuju.py

  • Committer: Curtis Hovey
  • Date: 2016-09-12 23:12:57 UTC
  • mto: This revision was merged to the branch mainline in revision 1589.
  • Revision ID: curtis@canonical.com-20160912231257-y06qqzdnjejnt5n2
Remove set-/set- from config command.

Show diffs side-by-side

added added

removed removed

Lines of Context:
267
267
        for i in reversed(range(len(keys_to_remove))):
268
268
            key = keys_to_remove[i]
269
269
            if key in ('juju-client-key', 'juju-system-key'):
270
 
                keys_to_remove = keys_to_remove[:i] + keys_to_remove[i+1:]
 
270
                keys_to_remove = keys_to_remove[:i] + keys_to_remove[i + 1:]
271
271
                errors.append(
272
272
                    'cannot remove key id "{0}": may not delete internal key:'
273
273
                    ' {0}'.format(key))
542
542
            model_state = self.controller_state.models[model]
543
543
            if command == 'enable-ha':
544
544
                model_state.enable_ha()
545
 
            if (command, args[:1]) == ('set-config', ('dummy-source',)):
 
545
            if ((command, args[:1]) == ('set-config', ('dummy-source',)) or
 
546
                    (command, args[:1]) == ('config', ('dummy-source',))):
546
547
                name, value = args[1].split('=')
547
548
                if name == 'token':
548
549
                    model_state.token = value