organisation_devices - bruno-beloff/scs_analysis GitHub Wiki
docs > software repositories > scs_analysis > commands > security relationships
The organisation_devices utility is used to manage the relationship between organisations and devices. The utility can find, create and delete these relationships.
Over a period of time, a device may pass from ownership by one organisation to ownership by another. Each ownership period is represented by a separate record. Where the start of an ownership is not known, the start datetime is recorded as 1970-01-01T00:00:00Z.
The --credentials flag is only required where the user wishes to store multiple identities. Setting the credentials is done interactively using the command line interface.
organisation_devices.py [-c CREDENTIALS] { -F { -l ORG_LABEL | -t DEVICE_TAG } | -C -l ORG_LABEL -t DEVICE_TAG -p PATH_ROOT GROUP LOCATION -d DEPLOYMENT_LABEL | -D -t DEVICE_TAG } [-i INDENT] [-v]
Options | |
---|---|
--version | show program's version number and exit |
-h, --help | show this help message and exit |
-c CREDENTIALS_NAME, --credentials=CREDENTIALS_NAME | the stored credentials to be presented |
-F, --Find | find devices for the organisation or device tag |
-C, --Create | create a device |
-D, --Delete | delete the device |
-l ORG_LABEL, --org-label=ORG_LABEL | the organisation label |
-t DEVICE_TAG, --device-tag=DEVICE_TAG | the device tag |
-p PROJECT, --project=PROJECT | path root, group and location number |
-d DEPLOYMENT_LABEL, --deployment-label=DEPLOYMENT_LABEL | the device's deployment label |
-i INDENT, --indent=INDENT | pretty-print the output with INDENT |
-v, --verbose | report narrative to stderr |
organisation_devices.py -F -l "South Coast Science (Demo)"
organisation_devices.py -c super -vi4 -F -t scs-bgx-570
[ { "DeviceTag": "scs-bgx-570", "OrgID": 68, "DeploymentLabel": "Praxis / Urban @ Preston Circus, Brighton", "DevicePath": "south-coast-science-demo/brighton-urban/device/praxis-000570/", "LocationPath": "south-coast-science-demo/brighton-urban/loc/1/", "StartDatetime": "2021-07-30T10:42:38Z", "EndDatetime": null } ]
scs_analysis/cognito_devices
scs_analysis/cognito_user_credentials