def __init__(self, scheme, term, title, attributes=None, location=None, parent=None, actions=[]): super(Kind, self).__init__(scheme, term, title, attributes=attributes, location=location) helpers.check_single_type(parent, Kind) helpers.check_type(actions, action.Action) self.parent = parent self.actions = actions
def __init__(self, scheme, term, title, attributes=None, location=None, related=[], actions=[]): super(Kind, self).__init__(scheme, term, title, attributes=attributes, location=location) helpers.check_type(related, Kind) helpers.check_type(actions, action.Action) self.related = related self.actions = actions
def __init__(self, title, mixins, id=None): helpers.check_type(mixins, mixin.Mixin) self.mixins = mixins # NOTE(aloga): we need a copy of the attributes, otherwise we will be # using the class ones instead of the object ones. self.attributes = self.attributes.copy() # damn, we're shading a builtin if id is None: id = uuid.uuid4().hex self.attributes["occi.core.id"] = attribute.InmutableAttribute( "occi.core.id", id) self.attributes["occi.core.title"] = attribute.MutableAttribute( "occi.core.title", title)
def __init__(self, scheme, term, title, attributes=None, location=None, related=[], actions=[]): super(Mixin, self).__init__(scheme, term, title, attributes=attributes, location=location) helpers.check_type(related, Mixin) helpers.check_type(actions, action.Action) self.related = related self.actions = actions
def __init__(self, scheme, term, title, attributes=None, location=None, depends=[], applies=[], actions=[]): super(Mixin, self).__init__(scheme, term, title, attributes=attributes, location=location) helpers.check_type(depends, Mixin) helpers.check_type(actions, action.Action) helpers.check_type(applies, kind.Kind) self.depends = depends self.actions = actions self.applies = applies