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, )
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
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 )
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, )
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
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, )
class DynAuthDasResponseC(OneM2MEntity): # dynamicACPInfo = ListAttribute(DynamicACPInfoC) dynamicACPInfo = EntityAttribute(DynamicACPInfoC) tokens = StringListAttribute() # list of simpleType m2m:dynAuthJWT
class AccessControlContextsC(OneM2MEntity): accessControlWindow = StringListAttribute() # m2m:scheduleEntry accessControlIpAddresses = EntityAttribute(AccessControlIpAddressesC) accessControlLocationRegion = ListAttribute(LocationRegionC) # m2m:locationRegion
class AccessControlPolicyIDHolder(OneM2MResource): accessControlPolicyIDs = StringListAttribute()