apamax.eplapplications.platform¶
CumulocityPlatform¶
-
class
apamax.eplapplications.platform.
CumulocityPlatform
(parent)[source]¶ Bases:
object
Class to create a connection to the Cumulocity IoT platform configured in pysysproject.xml and spool the logs from the platform locally.
- Requires the following properties to be set in pysysproject.xml:
CUMULOCITY_SERVER_URL
CUMULOCITY_TENANT
CUMULOCITY_USERNAME
CUMULOCITY_PASSWORD
- For use with the EPLApps class for uploading EPL applications:
self.platform = CumulocityPlatform(self) eplapps = EPLApps(self.platform.getC8YConnection()) eplapps.deploy(self.input+’/test.mon’, activate=True) self.waitForGrep(self.platform.getApamaLogFile(), expr=’Added monitor eplfiles.test’)
- Parameters
parent – The PySys test object using this platform object.
-
getC8yConnectionDetails
()[source]¶ Return the (url, tenantid, username, password) defined in the pysysproject.xml)
-
getSubscribedTenants
()[source]¶ Get list of Cumulocity IoT tenants subscribed to the Apama-ctrl microservice if testing against a multi-tenant Apama-ctrl microservice.
If the Apama-ctrl microservice is per-tenant, it returns a list only containing the configured tenant.
- Returns
List of Cumulocity IoT tenants.
- Return type
list[
CumulocityTenant
]
-
getTenant
()[source]¶ Get the Cumulocity IoT tenant configured in the pysysproject.xml file. :return: The Cumulocity IoT tenant. :rtype:
CumulocityTenant