示例#1
0
class CSEBase(ResourceC, SubscribableResource, AccessControlPolicyIDHolder):
    """See TS-0001 section 9.6.3"""

    typename = "CSEBase"

    cseType = Attribute(CSETypeIDE, accesstype=Attribute.WO)
    CSE_ID = UnicodeAttribute(accesstype=Attribute.WO)  # TODO: CSE-ID (minus!)
    supportedResourceType = StringListAttribute(content_type=ResourceTypeE,
                                                accesstype=Attribute.RO)
    pointOfAccess = StringListAttribute()
    nodeLink = UnicodeAttribute()

    __child_types__ = (
        RemoteCSE,
        # Node,
        AE,
        Container,
        # Group,
        AccessControlPolicy,
        Subscription,
        # MgmtCmd,
        # LocationPolicy,
        # StatsConfig,
        # StatsCollect,
        # Request,
        # Delivery,
        # Schedule,
        # M2mServiceSubscriptionProfile,
        DynamicAuthorizationConsultation,
        SemanticDescriptor,
    )
class SemanticDescriptor(AnnounceableResourceC, SubscribableResource):
    # Has a default value : application/rdf+xml:1
    descriptorRepresentation = StringListAttribute(mandatory=True)
    semanticOpExec = Attribute(str)
    descriptor = Attribute(str, mandatory=True)
    ontologyRef = Attribute(AnyURI, mandatory=False)
    relatedSemantics = StringListAttribute(mandatory=False)

    __child_types__ = (Subscription, )
示例#3
0
class DynAuthDasRequestC(OneM2MEntity):
    originator = UnicodeAttribute()  # m2m:ID
    targetedResourceType = Attribute(ResourceTypeE)
    operation = UnicodeAttribute()  # m2m:operation
    # operation = EntityAttribute(OperationE)
    originatorIP = EntityAttribute(OriginatorIPTypeC)
    originatorLocation = EntityAttribute(LocationRegionC)
    requestTimestamp = TimestampS()
    targetedResourceID = UnicodeAttribute()  # xs:anyURI
    # targetedResourceID = Attribute(AnyURI)
    proposedPrivilegesLifetime = TimestampS()
    # TODO(rkr): is this ok?
    originatorRoleIDs = StringListAttribute()  # list of m2m:roleID
    roleIDsFromACPs = StringListAttribute()  # list of m2m:roleID
    tokenIDs = StringListAttribute()  # list of m2m:tokeID
示例#4
0
class RemoteCSEAnnc(AnnouncedResourceC, SubscribableResource):
    cseType = Attribute(CSETypeIDE, accesstype=Attribute.WO, mandatory=False)
    pointOfAccess = StringListAttribute()
    CSEBase = UnicodeAttribute(accesstype=Attribute.WO)
    CSE_ID = UnicodeAttribute(accesstype=Attribute.WO)  # TODO: CSE-ID (minus!)
    requestReachability = Attribute(bool)
    nodeLink = UnicodeAttribute()

    __child_types__ = (
        Subscription,
        # TODO
    )
示例#5
0
class RemoteCSE(AnnounceableResourceC, SubscribableResource):
    """See TS-0001 section 9.6.4"""

    cseType = Attribute(CSETypeIDE, accesstype=Attribute.WO, mandatory=False)
    pointOfAccess = StringListAttribute()
    CSEBase = UnicodeAttribute(accesstype=Attribute.WO)
    CSE_ID = UnicodeAttribute(accesstype=Attribute.WO)  # TODO: CSE-ID (minus!)
    M2M_Ext_ID = UnicodeAttribute()  # TODO: M2M-Ext-ID (minus!)
    Trigger_Recipient_ID = UnicodeAttribute()  # TODO: Trigger-Recipient-ID
    requestReachability = Attribute(bool)
    nodeLink = UnicodeAttribute()

    __child_types__ = (Subscription, )
示例#6
0
class FilterCriteria(OneM2MEntity):
    createdBefore = TimestampS()
    createdAfter = TimestampS()
    modifiedSince = TimestampS()
    unmodifiedSince = TimestampS()
    stateTagSmaller = Attribute(int)  # xs:positiveInteger
    stateTagBigger = Attribute(int)  # xs:nonNegativeInteger
    expireBefore = TimestampS()
    expireAfter = TimestampS()
    labels = StringListAttribute()
    resourceType = ListAttribute(ResourceTypeE)
    sizeAbove = Attribute(int)  # xs:nonNegativeInteger
    sizeBelow = Attribute(int)  # xs:positiveInteger
    contentType = UnicodeAttribute()  # m2m:typeOfContent
    attribute = ListAttribute()  # m2m:attribute
    filterUsage = EntityAttribute(FilterUsageE)
    limit = Attribute(int)  # xs:nonNegativeInteger
示例#7
0
class AE(AnnounceableResourceC, SubscribableResource):
    """See TS-0001 section 9.6.5"""

    typename = "AE"

    appName = UnicodeAttribute()
    App_ID = UnicodeAttribute(accesstype=Attribute.WO, mandatory=True)
    AE_ID = UnicodeAttribute(accesstype=Attribute.RO)
    pointOfAccess = StringListAttribute()
    ontologyRef = UnicodeAttribute()
    nodeLink = UnicodeAttribute(accesstype=Attribute.RO)
    requestReachability = Attribute(bool, mandatory=True)
    contentSerialization = UnicodeAttribute()  # TODO m2m:serializations

    __child_types__ = (
        Container,
        # Group,
        Subscription,
        # AccessControlPolicy,
        # PollingChannel,
        # Schedule,
    )
class AEAnnc(AnnouncedResourceC, SubscribableResource):
    typename = "AEAnnc"

    appName = UnicodeAttribute(accesstype=Attribute.WO)
    App_ID = UnicodeAttribute()
    AE_ID = UnicodeAttribute()
    pointOfAccess = StringListAttribute()
    ontologyRef = UnicodeAttribute()
    nodeLink = UnicodeAttribute()
    requestReachability = Attribute(bool)

    __child_types__ = (
        Container,
        ContainerAnnc,
        Group,
        GroupAnnc,
        Subscription,
        # AccessControlPolicy,
        # AccessControlPolicyAnnc,
        # PollingChannel,
        # Schedule,
        SemanticDescriptor,
    )
class AE(AnnounceableResourceC, SubscribableResource):
    """See TS-0001 section 9.6.5"""

    typename = "AE"

    appName = UnicodeAttribute()
    App_ID = UnicodeAttribute(accesstype=Attribute.WO, mandatory=True)
    AE_ID = UnicodeAttribute(accesstype=Attribute.RO)  # m2m:ID
    pointOfAccess = StringListAttribute()  # m2m:poaList
    ontologyRef = UnicodeAttribute()  # xs:anyURI
    nodeLink = UnicodeAttribute(accesstype=Attribute.RO)  # xs:anyURI
    requestReachability = Attribute(bool, mandatory=True)
    contentSerialization = UnicodeAttribute()  # TODO m2m:serializations

    __child_types__ = (
        Container,
        Group,
        Subscription,
        AccessControlPolicy,
        # PollingChannel,
        # Schedule,
        DynamicAuthorizationConsultation,
        SemanticDescriptor,
    )
示例#10
0
class DynAuthDasResponseC(OneM2MEntity):
    # dynamicACPInfo = ListAttribute(DynamicACPInfoC)
    dynamicACPInfo = EntityAttribute(DynamicACPInfoC)
    tokens = StringListAttribute()  # list of simpleType m2m:dynAuthJWT
示例#11
0
class AccessControlContextsC(OneM2MEntity):
    accessControlWindow = StringListAttribute()   # m2m:scheduleEntry
    accessControlIpAddresses = EntityAttribute(AccessControlIpAddressesC)
    accessControlLocationRegion = ListAttribute(LocationRegionC)   # m2m:locationRegion
示例#12
0
class AccessControlPolicyIDHolder(OneM2MResource):
    accessControlPolicyIDs = StringListAttribute()