用于与pertino通信的python包。
pertinosdk的Python项目详细描述
欢迎使用pertino python sdk
示例用法
''' Created on Jul 26, 2014 @author: lwoydziak '''frompertinosdkimportPertinoSdk,wherefromjsonconfigfileimportEnvdeftest_whenOrgsAvailableThenCanListThem():pertinoSdk=PertinoSdk(Env().get("Pertino","login"),Env().get("Pertino","password"))organizations=pertinoSdk.listOrgs()assertlen(organizations)>0deftest_whenDevicesInOrganizationsThenCanListThem():pertinoSdk=PertinoSdk(Env().get("Pertino","login"),Env().get("Pertino","password"))organizations=pertinoSdk.listOrgs()devices=pertinoSdk.listDevicesIn(organizations[0])assertlen(devices)>0deftest_deleteMachinesWithNameContainingAuto():pertinoSdk=PertinoSdk(Env().get("Pertino","login"),Env().get("Pertino","password"))organizations=pertinoSdk.listOrgs()devices=pertinoSdk.listDevicesIn(organizations[0],where("hostName").contains("auto"))pertinoSdk.deleteFrom(organizations[0],devices)assertnotpertinoSdk.listDevicesIn(organizations[0],where("hostName").contains("auto"))
建造
antenvantinitantpackage
运行单元测试
anttest
运行验收测试
使用pertino凭据创建一个文件(格式/名称请参见acceptance/conftest.py)
antacceptance