Package: vcoclient
vcoclient.py (version 0.1.8)A simple VeloCloud Orchestrator (VCO) Python clientThe idea is to embrace the Linux methodology and to have one VCO client that can be used within a complex workflow under Linux.[iddoc@homeserver:/scripts]vcoclient.py--vco=192.168.2.55login--username=super@domain.com--password
Password:[iddoc@homeserver:/scripts]vcoclient.py--vco=192.168.2.55edges_getBranch1Branch2Branch3Branch4
activationKeyHS7S-QKPA-ZZCC-PG74LHH3-8B4R-7XVJ-6J3VJTWH-EHNW-7LUG-YQ9TYZ8U-CKTY-8MTL-FP4R
activationKeyExpires2019-05-28T11:53:33.000Z2019-05-19T16:58:53.000Z2019-06-01T10:32:39.000Z2019-06-01T16:10:54.000Z
activationStateACTIVATEDACTIVATEDACTIVATEDACTIVATED
activationTime2019-04-28T11:55:38.000Z2019-04-19T17:17:51.000Z2019-05-02T10:55:10.000Z2019-05-02T19:18:20.000Z
alertsEnabled1111buildNumberR322-20190212-GAR322-20190212-GAR322-20190212-GAR322-20190212-GA
created2019-04-19T15:48:50.000Z2019-04-19T16:58:53.000Z2019-05-02T10:32:39.000Z2019-05-02T16:10:54.000Z
...............[iddoc@homeserver:/scripts]vcoclient.py--vco=192.168.2.55logoutIt uses argparse and it is functional hooks. Each functional hook, is a mini method to accomplish something.StatusLicenseVersionTravis CIDownloadsWheelSupported versionsInstallationCompatibilityThe matrix below gives one the vcoclient version on which VCO release it was tested against.For sanity reasons, only the current VCO release will be used for testing and hence vcoclient (and the workflow_examples) will be updated/maintained accordingly. The current VCO release will be market asbold.CAUTION:Using a different version of vcoclient against different VCO release, might cause unwanted results and is not recommended.All tests where performed on a Linux and/or MacOS operation systems. There is no reason why it should not work with Windows but you have been warned.VCO releaseTested with vcoclient version3.3.1-GA-201908190.1.83.3.0-GA-201907240.1.73.2.2-GA-201906060.1.4 and earlierInstructionsTo install the latest version use:pip3 install vcoclientTo install a particular version, e.g. version 0.1.4 use:pip3 install vcoclient==0.1.4UseageGlobal Environment VariablesTo influence program behaviour and avoiding using--options, one can use global environment variables, for some of the options:NameExample UsageSame as UsingDefault ValueVCO_HOSTexport VCO_HOST="vco.domain.net"vcoclient.py --vco="vco.domain.net"NoneVCO_USERexport VCO_USER="my_username@domain.net"vcoclient.py login --username="my_username@domain.net"NoneVCO_PASSexport VCO_PASS="MySuperSecretPassword"vcoclient.py login --password="MySuperSecretPassword"NoneVCO_COOKIE_PATHexport VCO_COOKIE_PATH="/path/where/I/save/cookies/"None (yet)/tmp/VCO_VERIFY_SSLexport VCO_VERIFY_SSL="TRUE"None (yet)FalseGlobal Program Options[iddoc@homeserver:/scripts]vcoclient.py--help
usage:vcoclient.py[-h]--vcoHOSTNAME[--output{pandas,json,csv}]{login,logout,edges_get,sysprop_set}...

AsimpleVeloCloudOrchestrator(VCO)clientviaPython

positionalarguments:{login,logout,edges_get,sysprop_set}optionalarguments:-h,--helpshowthishelpmessageandexit--vcoHOSTNAMEHostname/IPofVCO--output{pandas,json,csv}Pandastablesareusedasdefaultoutputmethodbutonecanalsouse'json'orcsvOne can also use a special os variable called VCO_HOST for--vco, without the need to input the hostname all the time, e.g.:[iddoc@homeserver:/scripts]exportVCO_HOST="192.168.2.55"[iddoc@homeserver:/scripts]vcoclient.pyedges_getExampleOutput to Shell with Pandas format[iddoc@homeserver:/scripts]vcoclient.py--vco=192.168.2.55--output=pandasedges_get--search=Branch1
activationKeyHS7S-QKPA-ZZCC-PG74
activationKeyExpires2019-05-28T11:53:33.000Z
activationStateACTIVATED
activationTime2019-04-28T11:55:38.000Z
...Or in JSON[iddoc@homeserver:/scripts]vcoclient.py--vco=192.168.2.55--output=jsonedges_get--search=Branch1|python-mjson.tool{"activationKey":{"0":"HS7S-QKPA-ZZCC-PG74"},"activationKeyExpires":{"0":"2019-05-28T11:53:33.000Z"},"activationState":{"0":"ACTIVATED"},"activationTime":{"0":"2019-04-28T11:55:38.000Z"},
...or in CSV[iddoc@homeserver:/scripts]vcoclient.py--vco=192.168.2.55--output=csvedges_get--search=Branch1
,activationKey,activationKeyExpires,activationState,activationTime,alertsEnabled,buildNumber,certificates,configuration.enterprise.id,configuration.enterprise.modules,configuration.enterprise.name,configuration.operator.id,configuration.operator.modules,configuration.operator.name,created,description,deviceFamily,deviceId,dnsName,edgeHardwareId,edgeState,edgeStateTime,endpointPkiMode,enterpriseId,factoryBuildNumber,factorySoftwareVersion,haLastContact,haPreviousState,haSerialNumber,haState,id,isLive,lastContact,links,logicalId,modelNumber,modified,name,operatorAlertsEnabled,recentLinks,selfMacAddress,serialNumber,serviceState,serviceUpSince,site.city,site.contactEmail,site.contactMobile,site.contactName,site.contactPhone,site.country,site.created,site.id,site.lat,site.locale,site.lon,site.modified,site.name,site.postalCode,site.shippingAddress,site.shippingAddress2,site.shippingCity,site.shippingContactName,site.shippingCountry,site.shippingPostalCode,site.shippingSameAsLocation,site.shippingState,site.state,site.streetAddress,site.streetAddress2,site.timezone,siteId,softwareUpdated,softwareVersion,systemUpSince0,HS7S-QKPA-ZZCC-PG74,2019-05-28T11:53:33.000Z,ACTIVATED,2019-04-28T11:55:38.000Z,1,R322-20190212-GA,"[{'id': 5, 'created': '2019-04-28T11:55:39.000Z', 'csrId': 5, 'edgeId': 2, 'edgeSerialNumber': 'VMware-42372a8feed7928a-96a106d97231cc5b', 'enterpriseId': 1, 'certificate': '-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMqB79bHrnyJMA0GCSqGSIb3DQEBCwUAMDAxDDAKBgNV\nBAMTA3ZjbzEMMAoGA1UECxMDT1BTMRIwEAYDVQQKEwlWZWxvQ2xvdWQwHhcNMTkw\nNDI3MTE1NTM5WhcNMTkwNzI3MTE1NTM5WjCBoDEtMCsGA1UEAxMkY2RmMTNlNmUt\nMTNlMC00YTZlLTgwYTgtNmQxZmQ1NTE1ZGM4MS0wKwYDVQQKEyRlZTllY2ZiMi01\nNDQyLTRjYzgtOTQ0MC01NzVkM2Y3MzIyMzYxMTAvBgNVBAUTKFZNd2FyZS00MjM3\nMmE4ZmVlZDc5MjhhLTk2YTEwNmQ5NzIzMWNjNWIxDTALBgNVBAwTBGVkZ2UwggEi\nMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC5qm7tr5NdW/Ei9LA1Pq5L5B5B\nA2909MAk3bmnQUD3SGxaPmsaZOlQ4RZea0xX9i/1YicX+iv19/Uch5O7Ogp4qlua\ndWP6h/36ye1dosGXe5iS61gQBvyc862o1thoJwDrRQrrA6ls0dUmwpZ23yX6Po7T\n/12M0liYVM2rbMv9Cjp3IPp02wrKPmrrkQGPoi9L7nJXtw/ejOhpxb+j++pwsAlk\nPFdt1cU2OB+LCrrhCxivmuOw+TcS9a+H3qNnZaLkTGC7S3sv93u3+Uq0c1dBiNoQ\nLMAxRUE5jErVgfWMsKJGnHKFwr9KaIEgJ9iXDoWei5G0+Y5UL1AMLlaLV8RJAgMB\nAAGjYTBfMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAdBgNVHQ4EFgQU\nSELl9l8JeqVuteTUNDQdY+kcEwUwHwYDVR0jBBgwFoAUYaTXIGB2WA2o/jiiwmoZ\n69ZxPQ4wDQYJKoZIhvcNAQELBQADggEBAKwii0EYuR9GSpysBFLW42h3piYUQexV\n3bGl4l7ASo7OdUtUZ0Of/xls3qqKcZDz7DmbFnFgsxkraFfNJflzj+vhaBHf4kcS\n/rZGCKyS840lndGkqIPM9Gu+oBX1RoblVA3hRQvqSugye8srEgmG6YsEPAtv5Fo4\npw079wMmkTb3rP1LslMT3Mcrc/7VnGkq/F5owwpueBF13XJfJhXZP2/eAQ4gDSF/\n1f4DLHJzDliSYDRN5C+jrWm3JVIu5vvJUIQSN3PAimZOgo5pjOridJvIdxRjCrlf\n4oFWVTQM5R0IQZTIbBwBHE0vkwHPbIV9RybYOm9aaT60NRSYLCqmboI=\n-----END CERTIFICATE-----\n', 'serialNumber': 'CA81EFD6C7AE7C89', 'subjectKeyId': '4842e5f65f097aa56eb5e4d434341d63e91c1305', 'fingerPrint': '780ac499e5e4f2968c9b35d03bdc70ef87069050', 'validFrom': '2019-04-27T11:55:39.000Z', 'validTo': '2019-07-27T11:55:39.000Z'}, {'id': 6, 'created': '2019-04-28T12:18:30.000Z', 'csrId': 6, 'edgeId': 2, 'edgeSerialNumber':....Login - MethodOne needs to authenticate himself/herself via username and password to VCO. A user can be type "operator" or "enterprise" and hence has different rights in VCO.Please note:Session cookie is getting created as soon as this method gets called. The session cookie gets saved under/tmp/<hostname>.txt, and used later by new method calls (so one does not need to use the login method everytime). As the cookie has no expire date and VCO holds the time on the expiry of the session, it is recommendedto execute login method every so oftento ensure nothing gets broken over time.Maybe to-do for the future, to store session time and check accordingly.[iddoc@homeserver:/scripts]vcoclient.pylogin--help
usage:vcoclient.pylogin[-h]--usernameUSERNAME[--passwordPASSWORD][--no-operator]optionalarguments:-h,--helpshowthishelpmessageandexit--usernameUSERNAMEUsernameforAuthentication--password[PASSWORD]PasswordforAuthentication--no-operatorPerdefaultweloginasoperatortoVCO.Ifnot,usethisflagExampleEither use the  unsecure method to provide a password:[iddoc@homeserver:/scripts]vcoclient.py--vco=192.168.2.55login--username=super@domain.com--password=VeloCloud123[iddoc@homeserver:/scripts]or use the more secure method to provide it:[iddoc@homeserver:/scripts]vcoclient.py--vco=192.168.2.55login--username=super@domain.com--password
Password:[iddoc@homeserver:/scripts]or use VCO_USER and/or VCO_PASS environment variables to pass no login information to the script itself:[iddoc@homeserver:/scripts]exportVCO_USER="super@domain.com"[iddoc@homeserver:/scripts]exportVCO_PASS="SuperSecretPassword"[iddoc@homeserver:/scripts]vcoclient.py--vco=192.168.2.55login[iddoc@homeserver:/scripts]LogoutThe logout method logsout from VCO itself and deletes the session cookie stored under/tmp/<hostname>.txt.It is best practice to use it after done using different methods with vcoclient.pyExample[iddoc@homeserver:/scripts]vcoclient.py--vco=192.168.2.55logoutGet edgesTo get a list of all or filtered VeloCloud Edges (VCEs) from VCO. One can--searchper value, get only one--nameVCE and--filtersonly given keys. Each of the methods (--name,--filtersor--search), one can use "|" to find for several values (e.g. to find several VCEs with names Branch1 or Branch2, use ``--name="Branch1|Branch2"). This gives one a powerful option to compare and evaluate several VCEs against each other and use those returned values for another workflow.--enterpriseidcan be used to find all specify VCEs from specific customer in VCO. For msp based users this is a must to use.Please note:--name,--searchand--filtersare all doing a loose search rather then an exact match, meaning you will get more values then maybe requested but you do not need to be very specific for your search. Maybe as a to-do, give different options in the future.usage:vcoclient.pyedges_get[-h][--nameNAME][--filtersFILTERS][--searchSEARCH][--enterpriseidID][--rows_name]optionalarguments:-h,--helpshowthishelpmessageandexit--nameNAMESearchEdge/Edgescontainingthegivenname--filtersFILTERSReturnsonlygivenfiltersoutofthereturnedvalue.Defaultallvaluesarereturned--searchSEARCHSearchanydatafrompropertiesofEdges,e.g.searchforUSBinterfaces--enterpriseidIDReturnstheEdgesofonlythatgivenenterprise.DefaultallEdgesofallenterprisesatoperatorvieworallEdgesofanenterpriseatcustomerviewarereturned.--rows_nameReturnsonlytherownamesfromtheoutputresult.ExampleTo get all VCEs, with all values and keys, use default:[iddoc@homeserver:/scripts]vcoclient.py--vco=192.168.2.55edges_get0123activationKeyHS7S-QKPA-ZZCC-PG74LHH3-8B4R-7XVJ-6J3VJTWH-EHNW-7LUG-YQ9TYZ8U-CKTY-8MTL-FP4R
activationKeyExpires2019-05-28T11:53:33.000Z2019-05-19T16:58:53.000Z2019-06-01T10:32:39.000Z2019-06-01T16:10:54.000Z
activationStateACTIVATEDACTIVATEDACTIVATEDACTIVATED
activationTime2019-04-28T11:55:38.000Z2019-04-19T17:17:51.000Z2019-05-02T10:55:10.000Z2019-05-02T19:18:20.000Z
alertsEnabled1111buildNumberR322-20190212-GAR322-20190212-GAR322-20190212-GAR322-20190212-GA
created2019-04-19T15:48:50.000Z2019-04-19T16:58:53.000Z2019-05-02T10:32:39.000Z2019-05-02T16:10:54.000Z
...............or use--nameto filter one branch:[iddoc@homeserver:/scripts]vcoclient.py--vco=192.168.2.55edges_get--name=Branch10activationKeyHS7S-QKPA-ZZCC-PG74
activationKeyExpires2019-05-28T11:53:33.000Z
activationStateACTIVATED
activationTime2019-04-28T11:55:38.000Z
alertsEnabled1buildNumberR322-20190212-GA
created2019-04-19T15:48:50.000Z
......or several:[iddoc@homeserver:/scripts]vcoclient.py--vco=192.168.2.55edges_get--name="Branch1|Branch-2"01activationKeyHS7S-QKPA-ZZCC-PG74LHH3-8B4R-7XVJ-6J3V
activationKeyExpires2019-05-28T11:53:33.000Z2019-05-19T16:58:53.000Z
activationStateACTIVATEDACTIVATED
activationTime2019-04-28T11:55:38.000Z2019-04-19T17:17:51.000Z
alertsEnabled11buildNumberR322-20190212-GAR322-20190212-GA
created2019-04-19T15:48:50.000Z2019-04-19T16:58:53.000Z
.........Another option is to filter a specific value out of the return with--filtersoption, e.g. if one wants to filter activationKey and activationKeyExpires for all or some Edges:[iddoc@homeserver:/scripts]vcoclient.py--vco=192.168.2.55edges_get--filters="activationKey|activationKeyExpires"Branch1-HABranch-2Branch-3Branch-4
activationKeyHS7S-QKPA-ZZCC-PG74LHH3-8B4R-7XVJ-6J3VJTWH-EHNW-7LUG-YQ9TYZ8U-CKTY-8MTL-FP4R
activationKeyExpires2019-05-28T11:53:33.000Z2019-05-19T16:58:53.000Z2019-06-01T10:32:39.000Z2019-06-01T16:10:54.000Zor one can combine it with--nameas well to filter it more specific:[iddoc@homeserver:/scripts]vcoclient.py--vco=192.168.2.55edges_get--filters="activationKey|activationKeyExpires"--name="Branch1|Branch-2"Branch1-HABranch-2
activationKeyHS7S-QKPA-ZZCC-PG74LHH3-8B4R-7XVJ-6J3V
activationKeyExpires2019-05-28T11:53:33.000Z2019-05-19T16:58:53.000ZEven more, one can search for any value within the VCE properties with--search, let see what if we want to see all values:[iddoc@homeserver:/scripts]vcoclient.py--vco=192.168.2.55edges_get--search="*"Branch1-HA...Branch-4
...
certificates_0_certificate-----BEGINCERTIFICATE-----\nMIIDtTCCAp2gAwIBA......-----BEGINCERTIFICATE-----\nMIIDtTCCAp2gAwIBA...
certificates_0_created2019-04-28T11:55:39.000Z...2019-05-14T18:00:10.000Z
certificates_0_csrId5...8certificates_0_edgeId2...5certificates_0_edgeSerialNumberVMware-42372a8feed7928a-96a106d97231cc5b...VMware-4237c421fc52ed55-3ed39a20fbc24354
certificates_0_enterpriseId1...1certificates_0_fingerPrint780ac499e5e4f2968c9b35d03bdc70ef87069050...af32143b2fee7e2bfca62ab0042244d7cb7f7e5e
certificates_0_id5...8certificates_0_serialNumberCA81EFD6C7AE7C89...D4C2500333FE1757
...In the background--searchflattens the returned JSON and returns all values when*used. One can however, search for specific values as well, e.g. lets search for interface properties with 191. or 10. IPs:[iddoc@homeserver:/scripts]vcoclient.py--vco=192.168.2.55edges_get--search="191.|10."Branch1-HABranch-2Branch-3Branch-4
....
configuration_enterprise_modules_0_edgeSpecific...191.168.1.2191.168.3.2NaNNaN
configuration_enterprise_modules_0_edgeSpecific...191.168.1.1191.168.3.1NaNNaN
configuration_enterprise_modules_0_edgeSpecific...191.168.2.2191.168.4.210.0.3.2NaN
configuration_enterprise_modules_0_edgeSpecific...191.168.2.1191.168.4.110.0.3.1NaN
configuration_enterprise_modules_0_edgeSpecific...NaN10.2.1.2NaNNaN
configuration_enterprise_modules_0_edgeSpecific...NaN10.2.1.1NaNNaN
configuration_enterprise_modules_0_edgeSpecific...NaN10.2.2.2NaNNaN
configuration_enterprise_modules_0_edgeSpecific...NaN10.2.2.1NaNNaN
configuration_enterprise_modules_1_edgeSpecific...NaN191.168.0.310.0.254.2NaN
configuration_enterprise_modules_1_edgeSpecific...NaN10.0.254.2NaNNaN
links_0_displayName191.168.1.2191.168.3.2191.168.0.5NaN
links_0_ipAddress191.168.1.2191.168.3.2191.168.0.5NaN
links_1_displayName191.168.2.2191.168.4.2NaNNaN
links_1_ipAddress191.168.2.2191.168.4.2NaNNaN
links_2_ipAddressNaN10.2.1.2NaNNaN
links_3_ipAddressNaN10.2.2.2NaNNaN
...and filter the 'ipAddress' column only for all VCEs (Branch1-HA, Branch-2, Branch-3 or Branch-4):[iddoc@homeserver:/scripts]vcoclient.py--vco=192.168.2.55edges_get--search="191.|10."--filters="ipAddress"Branch1-HABranch-2Branch-3Branch-4
links_0_ipAddress191.168.1.2191.168.3.2191.168.0.5NaN
links_1_ipAddress191.168.2.2191.168.4.2NaNNaN
links_2_ipAddressNaN10.2.1.2NaNNaN
links_3_ipAddressNaN10.2.2.2NaNNaNAll those outputs can be then converted into CSV or JSON.Get Customers VCEs (as MSP or Operator) - MethodTo get a list of all VCEs as a MSP/Partner or as operator one can usemsp_customers_getoroperator_customers_get. Same as edges_get method, one can use--search.--filtersand--namesto narrow down the result accordingly.ExampleThe help output formsp_customers_get:[iddoc@homeserver:/scripts]vcoclient.pymsp_customers_get--help
usage:vcoclient.pymsp_customers_get[-h][--nameNAME][--filtersFILTERS][--searchSEARCH][--rows_name]optionalarguments:-h,--helpshowthishelpmessageandexit--nameNAMESearchEnterprise/Enterprisescontainingthegivenname--filtersFILTERSReturnsonlygivenfiltersoutofthereturnedvalue.Defaultallvaluesarereturned--searchSEARCHSearchanydatafrompropertiesofcustomers,e.g.searchforparticularedge--rows_nameReturnsonlytherownamesfromtheoutputresult.and the help output foròperator_custmers_get:[iddoc@homeserver:/scripts]vcoclient.pyoperator_customers_get--help
usage:vcoclient.pyoperator_customers_get[-h][--nameNAME][--filtersFILTERS][--searchSEARCH][--rows_name]optionalarguments:-h,--helpshowthishelpmessageandexit--nameNAMESearchEnterprise/Enterprisescontainingthegivenname--filtersFILTERSReturnsonlygivenfiltersoutofthereturnedvalue.Defaultallvaluesarereturned--searchSEARCHSearchanydatafrompropertiesofcustomers,e.g.searchforparticularedge--rows_nameReturnsonlytherownamesfromtheoutputresult.Here an example (customer names and account numbers obscured on purpose):[iddoc@homeserver:/scripts]vcoclient.pymsp_customers_get--search="*"POCCustomerTest...Customer5Customer4accountNumberXXX-XXX-H86XXX-XXX-BKW...XXX-XXXDGLXXX-XXX-4EB
alertsEnabled11...11cityNaNNaN...NaNNaN
contactEmailNaNNaN...NaNNaN
contactMobileNaNNaN...NaNNaN
contactNameNaNNaN...NaNNaN
contactPhoneNaNNaN...NaNNaN
countryNaNNaN...NaNNaN
created2017-10-09T13:47:29.000Z2018-02-01T21:56:50.000Z...2019-05-17T18:11:40.000Z2019-06-20T15:52:27.000Z
descriptionNaNNaN...NaNNaN
domainNaNNaN...NaNNaN
....Get edges behind gatewayThis method will give one the ability to get all/some gateways behind a given customer[iddoc@homeserver:/scripts]vcoclient.pyenterprise_get_gateway--help
usage:vcoclient.pyenterprise_get_gateway[-h]--enterpriseidENTERPRISEID[--nameNAME][--filtersFILTERS][--searchSEARCH][--rows_name]optionalarguments:-h,--helpshowthishelpmessageandexit--nameNAMESearchforagivencolumnname--enterpriseidENTERPRISEIDGetgatewaysassociatedtoanenterprise--filtersFILTERSReturnsonlygivenfiltersoutofthereturnedvalue.Defaultallvaluesarereturned--searchSEARCHSearchanydatafrompropertiesofcustomers,e.g.searchforparticularedge--rows_nameReturnsonlytherownamesfromtheoutputresult.ExampleGet the gateways associated to that enterprise:[iddoc@homeserver:/scripts]vcoclient.pyenterprise_get_gateway--enterpriseid=26vcg115-xxx1vcg101-xxx2vcg133-xxx1vcg104-xxx2
addressxxx.193.30.11xxx.193.31.36xxx.193.29.52xxx.193.28.72Get gateways behind customerThis method will give one the ability to get all/some edges behind a given gateway[iddoc@homeserver:/scripts]vcoclient.pygateway_get_edges--help
usage:vcoclient.pygateway_get_edges[-h]--gatewayidGATEWAYID[--nameNAME][--filtersFILTERS][--searchSEARCH][--rows_name]optionalarguments:-h,--helpshowthishelpmessageandexit--nameNAMESearchforagivencolumnname--gatewayidGATEWAYIDGetedgesassociatedtoagateway--filtersFILTERSReturnsonlygivenfiltersoutofthereturnedvalue.Defaultallvaluesarereturned--searchSEARCHSearchanydatafrompropertiesofcustomers,e.g.searchforparticularedge--rows_nameReturnsonlytherownamesfromtheoutputresult.ExampleGet all edges behind gateway (output hidden):[iddoc@homeserver:/scripts]vcoclient.py--gatewayid5AlpharettaxxxxxxxDallasxxxx
activationKey3WCR-xxxx-xxxx-xxxx3MQZ-xxx-xxxx-xxx
activationKeyExpires2018-10-20T13:26:00.000Z2018-04-06T02:11:14.000Z
activationStateREACTIVATION_PENDINGACTIVATED
activationTime2018-05-25T00:02:08.000Z2018-03-07T18:50:44.000Z
alertsEnabled11buildNumberR321-20181018-GA-27175-28009R320-20180409-GA
cityPhoenixDallas
countryUSUS
created2018-04-04T20:51:55.000Z2018-03-07T02:11:14.000ZGet link metric of a given edgeOne can get the link metric of a particular VCE for a given time.[iddoc@homeserver:/scripts]vcoclient.pyedge_get_lm--help
usage:vcoclient.pyedge_get_lm[-h][--filtersFILTERS][--searchSEARCH]--edgeidEDGEID[--enterpriseidENTERPRISEID]--starttimeSTARTTIME[--endtimeENDTIME][--rows_name]CollectlinkstatisticsforaVCEbetweenagivenperiod.

optionalarguments:-h,--helpshowthishelpmessageandexit--filtersFILTERSReturnsonlygivenfiltersoutofthereturnedvalue.Defaultallvaluesarereturned--searchSEARCHSearchforthemetricvalue--edgeidEDGEIDGetinformationforthatspecificEdge.Edgeidcanbefoundunderedges_getmethodunderid.--enterpriseidENTERPRISEIDGetinformationforthatspecificEdgeinthatspecificcustomer.EnterpriseIdcanbeeitherfoundfrom*_customers_getmethodunderidoredges_getmethodunderenterpriseId.--starttimeSTARTTIMEThestarttimefromwhenonewantstogetthedata.FormatisinYYYY-MM-DDorYYYY-MM-DDHH:MM.--endtimeENDTIMETheendtimefromwhenonewantstogetthedata.FormatisinYYYY-MM-DDorYYYY-MM-DDHH:MM.Endtimeisdefaulttotimenow.--rows_nameReturnsonlytherownamesfromtheoutputresult.ExampleGet the metric of all the links of a given edge from a given customer in the past until now:[iddoc@homeserver:/scripts]vcoclient.pyedge_get_lm--edgeid=1712--enterpriseid=214--starttime="2019-07-21"GE3GE4
bestJitterMsRx0.07080.429
bestJitterMsTx0.00070.0677
bestLatencyMsRx5.91135.6578
bestLatencyMsTx8.29169.771
bestLossPctRx1.004360.009067
bestLossPctTx0.9924020.010039
bpsOfBestPathRx100000005000000bpsOfBestPathTx100000005000000bytesRx6756806035942812687bytesTx58314546201543851068controlBytesRx3161065177798578528controlBytesTx41741908741477374932controlPacketsRx282296497410590controlPacketsTx287632139038440....
link_networkTypeETHERNETETHERNET
link_operatorAlertsEnabled11link_serviceStateIN_SERVICEIN_SERVICE
link_stateSTABLESTABLE
link_vpnStateSTABLESTABLE
p1BytesRx987982019802676p1BytesTx9816461440242590p1PacketsRx53984111780p1PacketsTx14402386695p2BytesRx1342611884123590823p2BytesTx98837758425282998p2PacketsRx1806817510994p2PacketsTx205809957703p3BytesRx2243249154840660p3BytesTx570721548950548p3PacketsRx128917372738p3PacketsTx32792543994packetsRx429821878036102packetsTx342445899186832scoreRx4.335824.39847
scoreTx4.336134.39684
signalStrength00totalBytes125882606552486663755totalPackets7722677617222934Get link metric for the whole enterpriseOne can get the link metrics of all VCEs of a given enterprise.[iddoc@homeserver:/scripts]vcoclient.pyedge_get_agg_lm--help
usage:vcoclient.pyedges_get_agg_lm[-h][--enterpriseidENTERPRISEID]--starttimeSTARTTIME[--endtimeENDTIME][--nameNAME][--filtersFILTERS][--searchSEARCH][--rows_name][--stats]CollectaggregatedlinkstatisticsforseveralVCEsbetweenagivenperiod

optionalarguments:-h,--helpshowthishelpmessageandexit--enterpriseidENTERPRISEIDGetinformationforthatspecificEdgeinthatspecificcustomer.EnterpriseIdcanbeeitherfoundfrom*_customers_getmethodunderidoredges_getmethodunderenterpriseId.--starttimeSTARTTIMEThestarttimefromwhenonewantstogetthedata.FormatisinYYYY-MM-DDorYYYY-MM-DDHH:MM.--endtimeENDTIMETheendtimefromwhenonewantstogetthedata.FormatisinYYYY-MM-DDorYYYY-MM-DDHH:MM.--nameNAMESearchcolumnwhichcontainsthegivenname--filtersFILTERSReturnsonlygivenfiltersoutofthereturnedvalue.Defaultallvaluesarereturned--searchSEARCHSearchanyvaluewithinthereturn,e.g.searchforUSBinterfaces--rows_nameReturnsonlytherownamesfromtheoutputresult.--statsReturnsthestatisticsofthedatastructureExampleGet the metric of all the links of a given edge from a given customer in the past until now:[iddoc@homeserver:/scripts]vcoclient.pyedges_get_agg_lm--enterpriseid=214--starttime="2019-10-04"GE3GE4...GE4GE4
bestJitterMsRx00...00bestJitterMsTx00...10bestLatencyMsRx2830...1413bestLatencyMsTx3637...95bestLossPctRx00...00bestLossPctTx00...00bpsOfBestPathRx200000000200000000...3011400098408000bpsOfBestPathTx200000000200000000...139200010185000bytesRx813833144354...560482922079bytesTx901650171777...736663874260controlBytesRx683561144354...399858435730controlBytesTx820243171777...736663512154controlPacketsRx59062398...55434928controlPacketsTx57472399...58654752linkId31633166...3700938690...Set system propertiesSystem properties of VCO can be changed/added. Only applicable at "operator" mode but needed for on-premiss installation of VCO.Please Note: Some system properties can break VCO and use this method carefully.[iddoc@homeserver:/scripts]vcoclient.pysysprop_set--help
usage:vcoclient.pysysprop_set[-h]--nameNAME--valueVALUE

optionalarguments:-h,--helpshowthishelpmessageandexit--nameNAMENameofthenew/editsystemproperty--valueVALUENewvalueofthesystempropertyExampleEnable google API for VCO:[iddoc@homeserver:/scripts]vcoclient.pysysprop_set--name=service.client.googleMapsApi.enable--value=trueContributingFork it (https://github.com/iddocohen/vcoclient/fork)Create your feature branch (git checkout -b feature/fooBar)Commit your changes (git commit -am 'Add some fooBar')Push to the branch (git push origin feature/fooBar)Create a new Pull RequestLicenceMIT, seeLICENSE