def _create_instance_group(self, context, values, policies=None, members=None): return db.instance_group_create(context, values, policies=policies, members=members)
def create(self, context): if self.obj_attr_is_set("id"): raise exception.ObjectActionError(action="create", reason="already created") updates = self.obj_get_changes() updates.pop("id", None) policies = updates.pop("policies", None) members = updates.pop("members", None) db_inst = db.instance_group_create(context, updates, policies=policies, members=members) self._from_db_object(context, self, db_inst)
def create(self, context): if self.obj_attr_is_set('id'): raise exception.ObjectActionError(action='create', reason='already created') updates = self.obj_get_changes() updates.pop('id', None) policies = updates.pop('policies', None) members = updates.pop('members', None) db_inst = db.instance_group_create(context, updates, policies=policies, members=members) self._from_db_object(context, self, db_inst)
def create(self): if self.obj_attr_is_set('id'): raise exception.ObjectActionError(action='create', reason='already created') updates = self.obj_get_changes() payload = dict(updates) updates.pop('id', None) policies = updates.pop('policies', None) members = updates.pop('members', None) db_inst = db.instance_group_create(self._context, updates, policies=policies, members=members) self._from_db_object(self._context, self, db_inst) payload['server_group_id'] = self.uuid compute_utils.notify_about_server_group_update(self._context, "create", payload)
def create(self, context): if self.obj_attr_is_set('id'): raise exception.ObjectActionError(action='create', reason='already created') updates = {} for attr in self.obj_what_changed(): updates[attr] = self[attr] updates.pop('id', None) policies = updates.pop('policies', None) members = updates.pop('members', None) metadetails = updates.pop('metadetails', None) db_inst = db.instance_group_create(context, updates, policies=policies, metadata=metadetails, members=members) self._from_db_object(context, self, db_inst)
def _create_instance_group(self, context, values, policies=None, metadata=None, members=None): return db.instance_group_create(context, values, policies=policies, metadata=metadata, members=members)