cyborg/objects/device_profile.py
def create(self, context):
        """Create a Device Profile record in the DB."""
        # HACK validate with a JSON schema
        if 'name' not in self:
            raise exception.ObjectActionError(action='create',
                                              reason='name is required')

        values = self.obj_get_changes()

        db_devprof = self.dbapi.device_profile_create(context, values)
        self._from_db_object(self, db_devprof)
Create a Device Profile record in the DB.
Create a Device Profile record in the DB.
Create a Device Profile record in the DB .
def create(self, context):
        if 'name' not in self:
            raise exception.ObjectActionError(action='create',
                                              reason='name is required')
        values = self.obj_get_changes()
        db_devprof = self.dbapi.device_profile_create(context, values)
        self._from_db_object(self, db_devprof)
def create ( self , context ) : if 'name' not in self : raise exception . ObjectActionError ( action = 'create' , reason = 'name is required' ) values = self . obj_get_changes ( ) db_devprof = self . dbapi . device_profile_create ( context , values ) self . _from_db_object ( self , db_devprof )
Create a Device Profile record in the DB.
Create a Device Profile record in the DB .
"""Create a Device Profile record in the DB.""" # HACK validate with a JSON schema
self
context