def setUp(self): super(EngineRpcAPITestCase, self).setUp() self.stubs = stubout.StubOutForTesting() self.identity = dict(identifier.HeatIdentifier('engine_test_tenant', '6', 'wordpress')) self.rpcapi = rpc_client.EngineClient()
def setUp(self): messaging.setup("fake://", optional=True) self.addCleanup(messaging.cleanup) self.context = utils.dummy_context() self.stubs = stubout.StubOutForTesting() self.identity = dict( identifier.HeatIdentifier('engine_test_tenant', '6', 'wordpress')) self.rpcapi = rpc_client.EngineClient() super(EngineRpcAPITestCase, self).setUp()
def do_migrate(): messaging.setup() client = rpc_client.EngineClient() ctxt = context.get_admin_context() try: client.migrate_convergence_1(ctxt, CONF.command.stack_id) except exception.NotFound: raise Exception( _("Stack with id %s can not be found.") % CONF.command.stack_id) except (exception.NotSupported, exception.ActionNotComplete) as ex: raise Exception(ex.message)
def do_migrate(): messaging.setup() client = rpc_client.EngineClient() ctxt = context.get_admin_context() try: client.migrate_convergence_1(ctxt, CONF.command.stack_id) except exception.NotFound: raise Exception( _("Stack with id %s can not be found.") % CONF.command.stack_id) except exception.ActionInProgress: raise Exception( _("The stack or some of its nested stacks are " "in progress. Note, that all the stacks should be " "in COMPLETE state in order to be migrated."))
def __call__(self, env, start_response): """ Handle incoming request. Authenticate send downstream on success. Reject request if we can't authenticate. """ LOG.debug(_('Authenticating user token')) context = local.store.context engine = rpc_client.EngineClient() authenticated = engine.authenticated_to_backend(context) if authenticated: return self.app(env, start_response) else: return self._reject_request(env, start_response)
def __init__(self, options): self.options = options self.rpc_client = rpc_client.EngineClient()
def __init__(self, app, conf): self.conf = conf self.app = app self.rpc_client = rpc_client.EngineClient()
def __init__(self, options): self.options = options self.rpc_client = rpc_client.EngineClient() self.policy = policy.Enforcer(scope='cloudwatch')
def __init__(self, options): self.options = options self.engine_rpcapi = rpc_client.EngineClient() self.policy = policy.Enforcer(scope='cloudformation')
def rpc_client(self): '''Return a client for making engine RPC calls.''' if not self._rpc_client: self._rpc_client = rpc_client.EngineClient() return self._rpc_client