iotcs.activation module¶
-
class
iotcs.activation.
ActivationPolicy
(activationPolicyResponse)¶ Bases:
object
Parameters: activationPolicyResponse – is the raw response object from urllib -
PROPERTY_OS_NAME
= 'OSName'¶
-
PROPERTY_OS_VERSION
= 'OSVersion'¶
-
getHashAlgorithm
()¶
-
getKeySize
()¶
-
getKeyType
()¶
-
hashAlgorithm
¶
-
keySize
¶
-
keyType
¶
-
-
class
iotcs.activation.
DirectActivationRequest
¶ Bases:
object
-
class
CertificationRequestInfo
¶ Bases:
object
-
FIELD_ATTRIBUTES
= 'attributes'¶
-
FIELD_SUBJECT
= 'subject'¶
-
FIELD_SUBJECT_PUBLIC_KEY_INFO
= 'subjectPublicKeyInfo'¶
-
attributes
¶
-
fromJson
(jsonObject)¶
-
getAttributes
()¶
-
getSubject
()¶
-
getSubjectPublicKeyInfo
()¶
-
setAttributes
(attributes)¶
-
setSubject
(subject)¶
-
setSubjectPublicKeyInfo
(subjectPublicKeyInfo)¶
-
subject
¶
-
subjectPublicKeyInfo
¶
-
toJson
()¶
-
-
FIELD_CERTIFICATION_REQUEST_INFO
= 'certificationRequestInfo'¶
-
FIELD_DEVICE_MODELS
= 'deviceModels'¶
-
FIELD_SIGNATURE
= 'signature'¶
-
FIELD_SIGNATURE_ALGORITHM
= 'signatureAlgorithm'¶
-
class
SubjectPublicKeyInfo
¶ Bases:
object
-
FIELD_ALGORITHM
= 'algorithm'¶
-
FIELD_FORMAT
= 'format'¶
-
FIELD_PUBLIC_KEY
= 'publicKey'¶
-
FIELD_SECRET_HASH_ALGORITHM
= 'secretHashAlgorithm'¶
-
PUBILIC_KEY_ENCODING_FORMAT_X509
= 'X.509'¶
-
algorithm
¶
-
fromJson
(jsonObject)¶
-
getAlgorithm
()¶
-
getKeyFormat
()¶
-
getPublicKey
()¶
-
getSecretHashAlgorithm
()¶
-
is_valid
()¶
-
keyformat
¶
-
publickey
¶
-
secrethashalgorithm
¶
-
setAlgorithm
(algorithm)¶
-
setKeyFormat
(keyformat)¶
-
setPublicKey
(publickey)¶
-
setSecretHashAlgorithm
(secrethashalgorithm)¶
-
toJson
()¶ Returns: jsonObject (python object)
-
-
certificationRequestInfo
¶
-
deviceModels
¶
-
static
fromJson
(jsonString)¶
-
getCertificationRequestInfo
()¶
-
getDeviceModels
()¶
-
getSignatureAlgorithm
()¶
-
setCertificationRequestInfo
(certificationRequestInfo)¶
-
setSignature
(signature)¶
-
setSignatureAlgorithm
(signatureAlgorithm)¶
-
signature
¶
-
signatureAlgorithm
¶
-
toJson
()¶
-
class
-
class
iotcs.activation.
DirectActivationResponse
¶ Bases:
object
-
FIELD_ACTIVATION_TIME
= 'activationTime'¶
-
FIELD_CERTIFICATE
= 'certificate'¶
-
FIELD_ENDPOINT_ID
= 'endpointId'¶
-
FIELD_ENDPOINT_STATE
= 'endpointState'¶
-
activationTime
¶
-
certificate
¶
-
endpointId
¶
-
endpointState
¶
-
fromJson
(jsonObject)¶
-
getActivationTime
()¶
-
getCertificate
()¶
-
getEndpointId
()¶
-
getEndpointState
()¶
-
setActivationTime
(activationTime)¶
-
setCertificate
(certificate)¶
-
setEndpointId
(endpointId)¶
-
setEndpointState
(endpointState)¶
-
toJson
()¶
-
-
class
iotcs.activation.
IndirectActivationRequest
(hardwareId=None, metadata=None, deviceModels=None, signature=None)¶ Bases:
object
-
FIELD_DEVICE_MODELS
= 'deviceModels'¶
-
FIELD_SIGNATURE
= 'signature'¶
-
HARDWARE_ID
= 'hardwareId'¶
-
deviceModels
¶
-
fromJson
(jsonObject)¶
-
getDeviceModesls
()¶
-
getHardwareId
()¶
-
getMetadata
()¶
-
getPublicKey
()¶
-
getSignature
()¶
-
hardwareId
¶
-
metadata
¶
-
publicKey
¶
-
setDeviceModesl
(deviceModels)¶
-
setHardwareId
(hardwareId)¶
-
signature
¶
-
toJson
()¶ Return a json object (python object) :return: json object (python object)
-
-
class
iotcs.activation.
IndirectActivationResponse
¶ Bases:
object
-
FIELD_ACTIVATION_TIME
= 'activationTime'¶
-
FIELD_ENDPOINT_ID
= 'endpointId'¶
-
FIELD_ENDPOINT_STATE
= 'endpointState'¶
-
activationTime
¶
-
endpointId
¶
-
endpointState
¶
-
fromJson
(jsonObject)¶ Parameters: jsonObject – python object Returns: this instance
-
getActivationTime
()¶
-
getEndpointId
()¶
-
getEndpointState
()¶
-
setActivationTime
(activationTime)¶
-
setEndpointId
(endpointId)¶
-
setEndpointState
(endpointState)¶
-
toJson
()¶
-
-
iotcs.activation.
createDirectActivationRequest
(trustedAssetsManager, hashAlgorithm, deviceModels)¶ Parameters: - trustedAssetsManager –
- hashAlgorithm –
- deviceModels – Set of device model urns
Returns:
-
iotcs.activation.
createIndirectActivationRequest
(hardwareId, metadata, deviceModels, signature)¶
-
iotcs.activation.
getActivationPolicy
(secureConnection, deviceId)¶ Parameters: - secureConnection –
- deviceId –
Returns: ActivationPolicy
-
iotcs.activation.
postDirectActivationRequest
(secureConnection, directActivationRequest)¶ Parameters: - secureConnection –
- directActivationRequest –
Returns:
-
iotcs.activation.
postIndirectActivationRequest
(secureConnection, indirectActivationRequest)¶ Parameters: - secureConnection –
- indirectActivationRequest –
Returns: