@base.remotable
def create(self):
    if self.obj_attr_is_set('id'):
        raise exception.ObjectActionError(action='create', reason='already created')
    self._check_minimum_version()
    updates = self.obj_get_changes()
    if ('uuid' not in updates):
        updates['uuid'] = uuidutils.generate_uuid()
        self.uuid = updates['uuid']
    db_service = db.service_create(self._context, updates)
    self._from_db_object(self._context, self, db_service)
    self._send_notification(fields.NotificationAction.CREATE)
@base.remotable
def create(self):
    if self.obj_attr_is_set('id'):
        raise exception.ObjectActionError(action='create', reason='already created')
    self._check_minimum_version()
    updates = self.obj_get_changes()
    if ('uuid' not in updates):
        updates['uuid'] = uuidutils.generate_uuid()
        self.uuid = updates['uuid']
    db_service = db.service_create(self._context, updates)
    self._from_db_object(self._context, self, db_service)
    self._send_notification(fields.NotificationAction.CREATE)