Example #1
0
    def __call__(self, behavior=None):

        # if behavior not in behavior_apis:
        #     raise CommandError('Unknown behavior.')

        bus.queryenv_service = new_queryenv()
        api = ServiceAPI()
        # api.init_service()
        if behavior and behavior not in behavior_apis:
            raise CommandError('Unknown behavior.')
        if behavior:
            print "Reconfiguring behavior %s..." % behavior
        else:
            print "Reconfiguring..."

        behavior_params = {behavior: None} if behavior else None

        try:
            api.reconfigure(behavior_params=behavior_params, async=False)
        except (BaseException, Exception), e:
            raise CommandError('Reconfigure failed.\n%s' % e)
Example #2
0
    def __call__(self, behavior=None):

        # if behavior not in behavior_apis:
        #     raise CommandError('Unknown behavior.')

        bus.queryenv_service = new_queryenv()
        api = ServiceAPI()
        # api.init_service()
        if behavior and behavior not in behavior_apis:
            raise CommandError('Unknown behavior.')
        if behavior:
            print "Reconfiguring behavior %s..." % behavior
        else:
            print "Reconfiguring..."

        behavior_params = {behavior: None} if behavior else None

        try:
            api.reconfigure(behavior_params=behavior_params, async=False)
        except (BaseException, Exception), e:
            raise CommandError('Reconfigure failed.\n%s' % e)
Example #3
0
 def queryenv(cls):
     if not hasattr(cls, '_queryenv'):
         cls._queryenv = new_queryenv()
     return cls._queryenv
Example #4
0
 def queryenv(cls):
     if not hasattr(cls, '_queryenv'):
         cls._queryenv = new_queryenv()
     return cls._queryenv