def exchange_stacks(cls, context, resource_id1, resource_id2): return db_api.resource_exchange_stacks(context, resource_id1, resource_id2)
def _exchange_stacks(existing_res, prev_res): db_api.resource_exchange_stacks(existing_res.stack.context, existing_res.id, prev_res.id) prev_stack, existing_stack = prev_res.stack, existing_res.stack prev_stack[existing_res.name] = existing_res existing_stack[prev_res.name] = prev_res
def _exchange_stacks(existing_res, prev_res): db_api.resource_exchange_stacks(existing_res.stack.context, existing_res.id, prev_res.id) prev_stack, existing_stack = prev_res.stack, existing_res.stack prev_stack.add_resource(existing_res) existing_stack.add_resource(prev_res)
def exchange_stacks(cls, context, resource_id1, resource_id2): return db_api.resource_exchange_stacks( context, resource_id1, resource_id2)
def _exchange_stacks(existing_res, prev_res): db_api.resource_exchange_stacks(existing_res.stack.context, existing_res.id, prev_res.id) existing_res.stack, prev_res.stack = prev_res.stack, existing_res.stack existing_res.stack[existing_res.name] = existing_res prev_res.stack[prev_res.name] = prev_res