{ "info": { "author": "Iddo Cohen", "author_email": "iddocohen@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# vcoclient.py (version 0.1.8) \n\nA simple VeloCloud Orchestrator (VCO) Python client\n\nThe idea is to embrace the Linux methodology and to have one VCO client that can be used within a complex workflow under Linux.\n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py --vco=192.168.2.55 login --username=super@domain.com --password\nPassword: \n[iddoc@homeserver:/scripts] vcoclient.py --vco=192.168.2.55 edges_get\n\n Branch1 Branch2 Branch3 Branch4\nactivationKey HS7S-QKPA-ZZCC-PG74 LHH3-8B4R-7XVJ-6J3V JTWH-EHNW-7LUG-YQ9T YZ8U-CKTY-8MTL-FP4R\nactivationKeyExpires 2019-05-28T11:53:33.000Z 2019-05-19T16:58:53.000Z 2019-06-01T10:32:39.000Z 2019-06-01T16:10:54.000Z\nactivationState ACTIVATED ACTIVATED ACTIVATED ACTIVATED\nactivationTime 2019-04-28T11:55:38.000Z 2019-04-19T17:17:51.000Z 2019-05-02T10:55:10.000Z 2019-05-02T19:18:20.000Z\nalertsEnabled 1 1 1 1\nbuildNumber R322-20190212-GA R322-20190212-GA R322-20190212-GA R322-20190212-GA\ncreated 2019-04-19T15:48:50.000Z 2019-04-19T16:58:53.000Z 2019-05-02T10:32:39.000Z 2019-05-02T16:10:54.000Z\n... ... ... ... ...\n\n[iddoc@homeserver:/scripts] vcoclient.py --vco=192.168.2.55 logout\n```\n\nIt uses argparse and it is functional hooks. Each functional hook, is a mini method to accomplish something. \n\n## Status\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
LicenseVersion
Travis CIDownloads
WheelSupported versions
\n\n\n## Installation\n\n### Compatibility\n\nThe matrix below gives one the vcoclient version on which VCO release it was tested against.\n\nFor 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 as **bold**.\n\n**CAUTION:** Using a different version of vcoclient against different VCO release, might cause unwanted results and is not recommended.\n\nAll 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. \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
VCO releaseTested with vcoclient version
3.3.1-GA-201908190.1.8
3.3.0-GA-201907240.1.7
3.2.2-GA-201906060.1.4 and earlier
\n\n### Instructions\n\nTo install the latest version use:\n\n``pip3 install vcoclient``\n\nTo install a particular version, e.g. version 0.1.4 use:\n\n``pip3 install vcoclient==0.1.4``\n\n## Useage\n\n### Global Environment Variables\n\nTo influence program behaviour and avoiding using ``--``options, one can use global environment variables, for some of the options:\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameExample UsageSame as UsingDefault Value
VCO_HOSTexport VCO_HOST=\"vco.domain.net\"vcoclient.py --vco=\"vco.domain.net\"None
VCO_USERexport VCO_USER=\"my_username@domain.net\"vcoclient.py login --username=\"my_username@domain.net\"None
VCO_PASSexport VCO_PASS=\"MySuperSecretPassword\"vcoclient.py login --password=\"MySuperSecretPassword\"None
VCO_COOKIE_PATHexport VCO_COOKIE_PATH=\"/path/where/I/save/cookies/\"None (yet)/tmp/
VCO_VERIFY_SSLexport VCO_VERIFY_SSL=\"TRUE\"None (yet)False
\n\n### Global Program Options\n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py --help\nusage: vcoclient.py [-h] --vco HOSTNAME [--output {pandas,json, csv}]\n {login,logout,edges_get,sysprop_set} ...\n\nA simple VeloCloud Orchestrator (VCO) client via Python\n\npositional arguments:\n {login,logout,edges_get,sysprop_set}\n\noptional arguments:\n -h, --help show this help message and exit\n --vco HOSTNAME Hostname/IP of VCO\n --output {pandas,json,csv}\n Pandas tables are used as default output method but\n one can also use 'json' or csv\n```\n\nOne can also use a special os variable called VCO_HOST for ``--vco``, without the need to input the hostname all the time, e.g.:\n\n```sh\n[iddoc@homeserver:/scripts] export VCO_HOST=\"192.168.2.55\"\n[iddoc@homeserver:/scripts] vcoclient.py edges_get \n```\n\n#### Example\n\nOutput to Shell with Pandas format\n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py --vco=192.168.2.55 --output=pandas edges_get --search=Branch1\nactivationKey HS7S-QKPA-ZZCC-PG74\nactivationKeyExpires 2019-05-28T11:53:33.000Z\nactivationState ACTIVATED\nactivationTime 2019-04-28T11:55:38.000Z\n...\n```\n\nOr in JSON\n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py --vco=192.168.2.55 --output=json edges_get --search=Branch1 | python -m json.tool\n{\n \"activationKey\": {\n \"0\": \"HS7S-QKPA-ZZCC-PG74\"\n },\n \"activationKeyExpires\": {\n \"0\": \"2019-05-28T11:53:33.000Z\"\n },\n \"activationState\": {\n \"0\": \"ACTIVATED\"\n },\n \"activationTime\": {\n \"0\": \"2019-04-28T11:55:38.000Z\"\n },\n...\n```\n\nor in CSV\n\n```sh\n\n[iddoc@homeserver:/scripts] vcoclient.py --vco=192.168.2.55 --output=csv edges_get --search=Branch1\n,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,systemUpSince\n0,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':.\n...\n```\n\n### Login - Method \n\nOne 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.\n\n**Please note:** Session cookie is getting created as soon as this method gets called. The session cookie gets saved under ``/tmp/.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 recommended **to execute login method every so often** to ensure nothing gets broken over time. \n\nMaybe to-do for the future, to store session time and check accordingly. \n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py login --help\nusage: vcoclient.py login [-h] --username USERNAME [--password PASSWORD]\n [--no-operator]\n\noptional arguments:\n -h, --help show this help message and exit\n --username USERNAME Username for Authentication\n --password [PASSWORD]\n Password for Authentication\n --no-operator Per default we login as operator to VCO. If not, use\n this flag\n```\n#### Example\n\nEither use the unsecure method to provide a password:\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py --vco=192.168.2.55 login --username=super@domain.com --password=VeloCloud123\n[iddoc@homeserver:/scripts]\n```\nor use the more secure method to provide it:\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py --vco=192.168.2.55 login --username=super@domain.com --password\nPassword:\n[iddoc@homeserver:/scripts]\n```\nor use VCO_USER and/or VCO_PASS environment variables to pass no login information to the script itself:\n```sh\n[iddoc@homeserver:/scripts] export VCO_USER=\"super@domain.com\"\n[iddoc@homeserver:/scripts] export VCO_PASS=\"SuperSecretPassword\"\n[iddoc@homeserver:/scripts] vcoclient.py --vco=192.168.2.55 login\n[iddoc@homeserver:/scripts]\n```\n\n### Logout\n\nThe logout method logsout from VCO itself and deletes the session cookie stored under ``/tmp/.txt``.\n\nIt is best practice to use it after done using different methods with vcoclient.py\n\n#### Example\n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py --vco=192.168.2.55 logout\n```\n\n### Get edges\n\nTo get a list of all or filtered VeloCloud Edges (VCEs) from VCO. One can ``--search`` per value, get only one ``--name`` VCE and ``--filters``only given keys. Each of the methods (``--name``, ``--filters`` or ``--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. \n\n``--enterpriseid`` can be used to find all specify VCEs from specific customer in VCO. For msp based users this is a must to use. \n\n**Please note:** ``--name``, ``--search`` and ``--filters``are 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. \n\n```sh\n\nusage: vcoclient.py edges_get [-h] [--name NAME] [--filters FILTERS]\n [--search SEARCH] [--enterpriseid ID] [--rows_name]\n\noptional arguments:\n -h, --help show this help message and exit\n --name NAME Search Edge/Edges containing the given name\n --filters FILTERS Returns only given filters out of the returned value.\n Default all values are returned\n --search SEARCH Search any data from properties of Edges, e.g. search for\n USB interfaces\n --enterpriseid ID Returns the Edges of only that given enterprise. Default\n all Edges of all enterprises at operator view or all\n Edges of an enterprise at customer view are returned.\n --rows_name Returns only the row names from the output result.\n\n```\n\n#### Example\n\nTo get all VCEs, with all values and keys, use default:\n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py --vco=192.168.2.55 edges_get\n 0 1 2 3\nactivationKey HS7S-QKPA-ZZCC-PG74 LHH3-8B4R-7XVJ-6J3V JTWH-EHNW-7LUG-YQ9T YZ8U-CKTY-8MTL-FP4R\nactivationKeyExpires 2019-05-28T11:53:33.000Z 2019-05-19T16:58:53.000Z 2019-06-01T10:32:39.000Z 2019-06-01T16:10:54.000Z\nactivationState ACTIVATED ACTIVATED ACTIVATED ACTIVATED\nactivationTime 2019-04-28T11:55:38.000Z 2019-04-19T17:17:51.000Z 2019-05-02T10:55:10.000Z 2019-05-02T19:18:20.000Z\nalertsEnabled 1 1 1 1\nbuildNumber R322-20190212-GA R322-20190212-GA R322-20190212-GA R322-20190212-GA\ncreated 2019-04-19T15:48:50.000Z 2019-04-19T16:58:53.000Z 2019-05-02T10:32:39.000Z 2019-05-02T16:10:54.000Z\n... ... ... ... ...\n```\nor use ``--name`` to filter one branch:\n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py --vco=192.168.2.55 edges_get --name=Branch1\n 0\nactivationKey HS7S-QKPA-ZZCC-PG74\nactivationKeyExpires 2019-05-28T11:53:33.000Z\nactivationState ACTIVATED\nactivationTime 2019-04-28T11:55:38.000Z\nalertsEnabled 1\nbuildNumber R322-20190212-GA\ncreated 2019-04-19T15:48:50.000Z\n... ...\n```\n\nor several: \n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py --vco=192.168.2.55 edges_get --name=\"Branch1|Branch-2\"\n 0 1\nactivationKey HS7S-QKPA-ZZCC-PG74 LHH3-8B4R-7XVJ-6J3V\nactivationKeyExpires 2019-05-28T11:53:33.000Z 2019-05-19T16:58:53.000Z\nactivationState ACTIVATED ACTIVATED\nactivationTime 2019-04-28T11:55:38.000Z 2019-04-19T17:17:51.000Z\nalertsEnabled 1 1\nbuildNumber R322-20190212-GA R322-20190212-GA\ncreated 2019-04-19T15:48:50.000Z 2019-04-19T16:58:53.000Z\n... ... ...\n```\nAnother option is to filter a specific value out of the return with ``--filters`` option, e.g. if one wants to filter activationKey and activationKeyExpires for all or some Edges:\n\n```sh\n\n[iddoc@homeserver:/scripts] vcoclient.py --vco=192.168.2.55 edges_get --filters=\"activationKey|activationKeyExpires\"\n\n Branch1-HA Branch-2 Branch-3 Branch-4\nactivationKey HS7S-QKPA-ZZCC-PG74 LHH3-8B4R-7XVJ-6J3V JTWH-EHNW-7LUG-YQ9T YZ8U-CKTY-8MTL-FP4R\nactivationKeyExpires 2019-05-28T11:53:33.000Z 2019-05-19T16:58:53.000Z 2019-06-01T10:32:39.000Z 2019-06-01T16:10:54.000Z\n\n```\n\nor one can combine it with ``--name`` as well to filter it more specific:\n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py --vco=192.168.2.55 edges_get --filters=\"activationKey|activationKeyExpires\" --name=\"Branch1|Branch-2\"\n Branch1-HA Branch-2\nactivationKey HS7S-QKPA-ZZCC-PG74 LHH3-8B4R-7XVJ-6J3V\nactivationKeyExpires 2019-05-28T11:53:33.000Z 2019-05-19T16:58:53.000Z\n\n```\n\nEven more, one can search for any value within the VCE properties with ``--search``, let see what if we want to see all values:\n\n```sh\n\n[iddoc@homeserver:/scripts] vcoclient.py --vco=192.168.2.55 edges_get --search=\"*\"\n Branch1-HA ... Branch-4\n...\ncertificates_0_certificate -----BEGIN CERTIFICATE-----\\nMIIDtTCCAp2gAwIBA... ... -----BEGIN CERTIFICATE-----\\nMIIDtTCCAp2gAwIBA...\ncertificates_0_created 2019-04-28T11:55:39.000Z ... 2019-05-14T18:00:10.000Z\ncertificates_0_csrId 5 ... 8\ncertificates_0_edgeId 2 ... 5\ncertificates_0_edgeSerialNumber VMware-42372a8feed7928a-96a106d97231cc5b ... VMware-4237c421fc52ed55-3ed39a20fbc24354\ncertificates_0_enterpriseId 1 ... 1\ncertificates_0_fingerPrint 780ac499e5e4f2968c9b35d03bdc70ef87069050 ... af32143b2fee7e2bfca62ab0042244d7cb7f7e5e\ncertificates_0_id 5 ... 8\ncertificates_0_serialNumber CA81EFD6C7AE7C89 ... D4C2500333FE1757\n...\n\n```\n\n\nIn the background ``--search`` flattens 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:\n\n```sh\n\n[iddoc@homeserver:/scripts] vcoclient.py --vco=192.168.2.55 edges_get --search=\"191.|10.\"\n\n Branch1-HA Branch-2 Branch-3 Branch-4\n....\nconfiguration_enterprise_modules_0_edgeSpecific... 191.168.1.2 191.168.3.2 NaN NaN\nconfiguration_enterprise_modules_0_edgeSpecific... 191.168.1.1 191.168.3.1 NaN NaN\nconfiguration_enterprise_modules_0_edgeSpecific... 191.168.2.2 191.168.4.2 10.0.3.2 NaN\nconfiguration_enterprise_modules_0_edgeSpecific... 191.168.2.1 191.168.4.1 10.0.3.1 NaN\nconfiguration_enterprise_modules_0_edgeSpecific... NaN 10.2.1.2 NaN NaN\nconfiguration_enterprise_modules_0_edgeSpecific... NaN 10.2.1.1 NaN NaN\nconfiguration_enterprise_modules_0_edgeSpecific... NaN 10.2.2.2 NaN NaN\nconfiguration_enterprise_modules_0_edgeSpecific... NaN 10.2.2.1 NaN NaN\nconfiguration_enterprise_modules_1_edgeSpecific... NaN 191.168.0.3 10.0.254.2 NaN\nconfiguration_enterprise_modules_1_edgeSpecific... NaN 10.0.254.2 NaN NaN\nlinks_0_displayName 191.168.1.2 191.168.3.2 191.168.0.5 NaN\nlinks_0_ipAddress 191.168.1.2 191.168.3.2 191.168.0.5 NaN\nlinks_1_displayName 191.168.2.2 191.168.4.2 NaN NaN\nlinks_1_ipAddress 191.168.2.2 191.168.4.2 NaN NaN\nlinks_2_ipAddress NaN 10.2.1.2 NaN NaN\nlinks_3_ipAddress NaN 10.2.2.2 NaN NaN\n...\n```\n\nand filter the 'ipAddress' column only for all VCEs (Branch1-HA, Branch-2, Branch-3 or Branch-4):\n\n```sh\n\n[iddoc@homeserver:/scripts] vcoclient.py --vco=192.168.2.55 edges_get --search=\"191.|10.\" --filters=\"ipAddress\"\n Branch1-HA Branch-2 Branch-3 Branch-4\nlinks_0_ipAddress 191.168.1.2 191.168.3.2 191.168.0.5 NaN\nlinks_1_ipAddress 191.168.2.2 191.168.4.2 NaN NaN\nlinks_2_ipAddress NaN 10.2.1.2 NaN NaN\nlinks_3_ipAddress NaN 10.2.2.2 NaN NaN\n\n```\n\nAll those outputs can be then converted into CSV or JSON.\n\n### Get Customers VCEs (as MSP or Operator) - Method\n\nTo get a list of all VCEs as a MSP/Partner or as operator one can use ``msp_customers_get`` or ``operator_customers_get``. Same as edges_get method, one can use ``--search``. ``--filters`` and ``--names`` to narrow down the result accordingly.\n\n\n#### Example\n\nThe help output for ``msp_customers_get``:\n\n```sh\n\n[iddoc@homeserver:/scripts] vcoclient.py msp_customers_get --help\nusage: vcoclient.py msp_customers_get [-h] [--name NAME] [--filters FILTERS]\n [--search SEARCH] [--rows_name]\n\noptional arguments:\n -h, --help show this help message and exit\n --name NAME Search Enterprise/Enterprises containing the given name\n --filters FILTERS Returns only given filters out of the returned value.\n Default all values are returned\n --search SEARCH Search any data from properties of customers, e.g. search\n for particular edge\n --rows_name Returns only the row names from the output result.\n\n```\n\nand the help output for ``\u00f2perator_custmers_get``:\n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py operator_customers_get --help\nusage: vcoclient.py operator_customers_get [-h] [--name NAME]\n [--filters FILTERS]\n [--search SEARCH] [--rows_name]\n\noptional arguments:\n -h, --help show this help message and exit\n --name NAME Search Enterprise/Enterprises containing the given name\n --filters FILTERS Returns only given filters out of the returned value.\n Default all values are returned\n --search SEARCH Search any data from properties of customers, e.g. search\n for particular edge\n --rows_name Returns only the row names from the output result.\n```\n\nHere an example (customer names and account numbers obscured on purpose):\n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py msp_customers_get --search=\"*\"\n POC Customer Test ... Customer 5 Customer 4\naccountNumber XXX-XXX-H86 XXX-XXX-BKW ... XXX-XXXDGL XXX-XXX-4EB\nalertsEnabled 1 1 ... 1 1\ncity NaN NaN ... NaN NaN\ncontactEmail NaN NaN ... NaN NaN\ncontactMobile NaN NaN ... NaN NaN\ncontactName NaN NaN ... NaN NaN\ncontactPhone NaN NaN ... NaN NaN\ncountry NaN NaN ... NaN NaN\ncreated 2017-10-09T13:47:29.000Z 2018-02-01T21:56:50.000Z ... 2019-05-17T18:11:40.000Z 2019-06-20T15:52:27.000Z\ndescription NaN NaN ... NaN NaN\ndomain NaN NaN ... NaN NaN\n....\n```\n### Get edges behind gateway\n\nThis method will give one the ability to get all/some gateways behind a given customer\n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py enterprise_get_gateway --help\nusage: vcoclient.py enterprise_get_gateway [-h] --enterpriseid ENTERPRISEID\n [--name NAME]\n [--filters FILTERS]\n [--search SEARCH] [--rows_name]\n\noptional arguments:\n -h, --help show this help message and exit\n --name NAME Search for a given column name\n --enterpriseid ENTERPRISEID\n Get gateways associated to an enterprise\n --filters FILTERS Returns only given filters out of the returned value.\n Default all values are returned\n --search SEARCH Search any data from properties of customers, e.g.\n search for particular edge\n --rows_name Returns only the row names from the output result.\n\n```\n\n#### Example\n\nGet the gateways associated to that enterprise:\n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py enterprise_get_gateway --enterpriseid=26\n\nvcg115-xxx1 vcg101-xxx2 vcg133-xxx1 vcg104-xxx2\naddress xxx.193.30.11 xxx.193.31.36 xxx.193.29.52 xxx.193.28.72\n```\n\n### Get gateways behind customer\n\nThis method will give one the ability to get all/some edges behind a given gateway\n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py gateway_get_edges --help\nusage: vcoclient.py gateway_get_edges [-h] --gatewayid GATEWAYID [--name NAME]\n [--filters FILTERS] [--search SEARCH]\n [--rows_name]\n\noptional arguments:\n -h, --help show this help message and exit\n --name NAME Search for a given column name\n --gatewayid GATEWAYID\n Get edges associated to a gateway\n --filters FILTERS Returns only given filters out of the returned value.\n Default all values are returned\n --search SEARCH Search any data from properties of customers, e.g.\n search for particular edge\n --rows_name Returns only the row names from the output result.\n```\n\n#### Example\n\nGet all edges behind gateway (output hidden): \n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py --gatewayid 5\n\n Alpharetta xxxxxxx Dallas xxxx\nactivationKey 3WCR-xxxx-xxxx-xxxx 3MQZ-xxx-xxxx-xxx\nactivationKeyExpires 2018-10-20T13:26:00.000Z 2018-04-06T02:11:14.000Z\nactivationState REACTIVATION_PENDING ACTIVATED\nactivationTime 2018-05-25T00:02:08.000Z 2018-03-07T18:50:44.000Z\nalertsEnabled 1 1\nbuildNumber R321-20181018-GA-27175-28009 R320-20180409-GA\ncity Phoenix Dallas\ncountry US US\ncreated 2018-04-04T20:51:55.000Z 2018-03-07T02:11:14.000Z\n\n```\n\n### Get link metric of a given edge\n\nOne can get the link metric of a particular VCE for a given time.\n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py edge_get_lm --help\nusage: vcoclient.py edge_get_lm [-h] [--filters FILTERS] [--search SEARCH]\n --edgeid EDGEID [--enterpriseid ENTERPRISEID]\n --starttime STARTTIME [--endtime ENDTIME]\n [--rows_name]\n\nCollect link statistics for a VCE between a given period.\n\noptional arguments:\n -h, --help show this help message and exit\n --filters FILTERS Returns only given filters out of the returned value.\n Default all values are returned\n --search SEARCH Search for the metric value\n --edgeid EDGEID Get information for that specific Edge. Edgeid can be\n found under edges_get method under id.\n --enterpriseid ENTERPRISEID\n Get information for that specific Edge in that\n specific customer. EnterpriseId can be either found\n from *_customers_get method under id or edges_get\n method under enterpriseId.\n --starttime STARTTIME\n The start time from when one wants to get the data.\n Format is in YYYY-MM-DD or YYYY-MM-DD HH:MM.\n --endtime ENDTIME The end time from when one wants to get the data.\n Format is in YYYY-MM-DD or YYYY-MM-DD HH:MM. End time\n is default to time now.\n --rows_name Returns only the row names from the output result.\n\n```\n\n#### Example\n\nGet the metric of all the links of a given edge from a given customer in the past until now:\n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py edge_get_lm --edgeid=1712 --enterpriseid=214 --starttime=\"2019-07-21\"\n\n GE3 GE4\nbestJitterMsRx 0.0708 0.429\nbestJitterMsTx 0.0007 0.0677\nbestLatencyMsRx 5.9113 5.6578\nbestLatencyMsTx 8.2916 9.771\nbestLossPctRx 1.00436 0.009067\nbestLossPctTx 0.992402 0.010039\nbpsOfBestPathRx 10000000 5000000\nbpsOfBestPathTx 10000000 5000000\nbytesRx 6756806035 942812687\nbytesTx 5831454620 1543851068\ncontrolBytesRx 3161065177 798578528\ncontrolBytesTx 4174190874 1477374932\ncontrolPacketsRx 28229649 7410590\ncontrolPacketsTx 28763213 9038440\n....\nlink_networkType ETHERNET ETHERNET\nlink_operatorAlertsEnabled 1 1\nlink_serviceState IN_SERVICE IN_SERVICE\nlink_state STABLE STABLE\nlink_vpnState STABLE STABLE\np1BytesRx 9879820 19802676\np1BytesTx 98164614 40242590\np1PacketsRx 53984 111780\np1PacketsTx 144023 86695\np2BytesRx 1342611884 123590823\np2BytesTx 988377584 25282998\np2PacketsRx 1806817 510994\np2PacketsTx 2058099 57703\np3BytesRx 2243249154 840660\np3BytesTx 570721548 950548\np3PacketsRx 12891737 2738\np3PacketsTx 3279254 3994\npacketsRx 42982187 8036102\npacketsTx 34244589 9186832\nscoreRx 4.33582 4.39847\nscoreTx 4.33613 4.39684\nsignalStrength 0 0\ntotalBytes 12588260655 2486663755\ntotalPackets 77226776 17222934\n```\n\n### Get link metric for the whole enterprise\n\nOne can get the link metrics of all VCEs of a given enterprise.\n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py edge_get_agg_lm --help\nusage: vcoclient.py edges_get_agg_lm [-h] [--enterpriseid ENTERPRISEID]\n --starttime STARTTIME [--endtime ENDTIME]\n [--name NAME] [--filters FILTERS]\n [--search SEARCH] [--rows_name] [--stats]\n\nCollect aggregated link statistics for several VCEs between a given period\n\noptional arguments:\n -h, --help show this help message and exit\n --enterpriseid ENTERPRISEID\n Get information for that specific Edge in that\n specific customer. EnterpriseId can be either found\n from *_customers_get method under id or edges_get\n method under enterpriseId.\n --starttime STARTTIME\n The start time from when one wants to get the data.\n Format is in YYYY-MM-DD or YYYY-MM-DD HH:MM.\n --endtime ENDTIME The end time from when one wants to get the data.\n Format is in YYYY-MM-DD or YYYY-MM-DD HH:MM.\n --name NAME Search column which contains the given name\n --filters FILTERS Returns only given filters out of the returned value.\n Default all values are returned\n --search SEARCH Search any value within the return, e.g. search for\n USB interfaces\n --rows_name Returns only the row names from the output result.\n --stats Returns the statistics of the datastructure\n```\n\n#### Example\n\nGet the metric of all the links of a given edge from a given customer in the past until now:\n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py edges_get_agg_lm --enterpriseid=214 --starttime=\"2019-10-04\"\n GE3 GE4 ... GE4 GE4\nbestJitterMsRx 0 0 ... 0 0\nbestJitterMsTx 0 0 ... 1 0\nbestLatencyMsRx 28 30 ... 14 13\nbestLatencyMsTx 36 37 ... 9 5\nbestLossPctRx 0 0 ... 0 0\nbestLossPctTx 0 0 ... 0 0\nbpsOfBestPathRx 200000000 200000000 ... 30114000 98408000\nbpsOfBestPathTx 200000000 200000000 ... 1392000 10185000\nbytesRx 813833 144354 ... 560482 922079\nbytesTx 901650 171777 ... 736663 874260\ncontrolBytesRx 683561 144354 ... 399858 435730\ncontrolBytesTx 820243 171777 ... 736663 512154\ncontrolPacketsRx 5906 2398 ... 5543 4928\ncontrolPacketsTx 5747 2399 ... 5865 4752\nlinkId 3163 3166 ... 37009 38690\n...\n```\n\n### Set system properties\n\nSystem properties of VCO can be changed/added. Only applicable at \"operator\" mode but needed for on-premiss installation of VCO.\n\n**Please Note**: Some system properties can break VCO and use this method carefully.\n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py sysprop_set --help\nusage: vcoclient.py sysprop_set [-h] --name NAME --value VALUE\n\noptional arguments:\n -h, --help show this help message and exit\n --name NAME Name of the new/edit system property\n --value VALUE New value of the system property\n\n```\n\n#### Example\n\nEnable google API for VCO:\n\n```sh\n[iddoc@homeserver:/scripts] vcoclient.py sysprop_set --name=service.client.googleMapsApi.enable --value=true\n```\n\n## Contributing\n\n1. Fork it ()\n2. Create your feature branch (`git checkout -b feature/fooBar`)\n3. Commit your changes (`git commit -am 'Add some fooBar'`)\n4. Push to the branch (`git push origin feature/fooBar`)\n5. Create a new Pull Request\n\n## Licence\nMIT, see ``LICENSE``\n\n\n[wiki]: https://github.com/iddocohen/vcoclient/wiki\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/iddocohen/vcoclient", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "vcoclient", "package_url": "https://pypi.org/project/vcoclient/", "platform": "", "project_url": "https://pypi.org/project/vcoclient/", "project_urls": { "Homepage": "https://github.com/iddocohen/vcoclient" }, "release_url": "https://pypi.org/project/vcoclient/0.1.8/", "requires_dist": [ "certifi (==2019.3.9)", "chardet (==3.0.4)", "idna (==2.8)", "numpy (==1.16.3)", "pandas (==0.24.2)", "python-dateutil (==2.8.0)", "pytz (==2019.1)", "requests (==2.21.0)", "six (==1.12.0)", "urllib3 (==1.24.3)" ], "requires_python": ">=3.6", "summary": "A simple VeloCloud Orchestrator (VCO) Python client", "version": "0.1.8" }, "last_serial": 5927040, "releases": { "0.1.4": [ { "comment_text": "", "digests": { "md5": "75085842db56cf0fd4d7e5b9a10e0951", "sha256": "a63b5b7a9d2dbc2c289f411fa155ad02e3ddf3294b09e1cd73371802d31694da" }, "downloads": -1, "filename": "vcoclient-0.1.4-py3.7.egg", "has_sig": false, "md5_digest": "75085842db56cf0fd4d7e5b9a10e0951", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": ">=3.6", "size": 14242, "upload_time": "2019-08-07T08:44:42", "url": "https://files.pythonhosted.org/packages/12/0c/f493f1e516eb6cbf985ad26c3c5208984e88ce24bb6e36f09dc38e8c717e/vcoclient-0.1.4-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "626b606ec3a55cc7e48f4e05f265d544", "sha256": "3b45eddd2f108ca2f59cd6669808f6f14dfcfdae7bd90237749d42521d396754" }, "downloads": -1, "filename": "vcoclient-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "626b606ec3a55cc7e48f4e05f265d544", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 15058, "upload_time": "2019-07-04T14:05:26", "url": "https://files.pythonhosted.org/packages/a2/e8/14b1c17288a0833c1296ee66e7376e37705ef2ec49211679b101c1c4bf4f/vcoclient-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a75958ddca2a1a1f2a84733b66fa634a", "sha256": "137c527361a85347bec4f2bfd16d55b5e4021e4436f74deb45c7783e9a8df42b" }, "downloads": -1, "filename": "vcoclient-0.1.4.tar.gz", "has_sig": false, "md5_digest": "a75958ddca2a1a1f2a84733b66fa634a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 21524, "upload_time": "2019-07-04T14:05:28", "url": "https://files.pythonhosted.org/packages/fb/dc/23f79320fdd8459fee35364ad057e0fe04daaec2f22915667be78d132a7b/vcoclient-0.1.4.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "7f6b4fc9ec54ca8203496ad0af0823e2", "sha256": "5571bd1860a41379efba08f7e271462caecda60246d0e9543d5bbb6a82ccc8f3" }, "downloads": -1, "filename": "vcoclient-0.1.7-py3.7.egg", "has_sig": false, "md5_digest": "7f6b4fc9ec54ca8203496ad0af0823e2", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": ">=3.6", "size": 16092, "upload_time": "2019-08-07T09:03:07", "url": "https://files.pythonhosted.org/packages/92/15/61701eb7779d9ef53361815bbaac2ad09da3ee2827594d30008942bae32a/vcoclient-0.1.7-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "fa59f30c129ee19521a0d6b4aed30eb2", "sha256": "fe76cca7aa802d9caf3e030ac4ffdce43f9029eee17d49d3b0860b6945de434d" }, "downloads": -1, "filename": "vcoclient-0.1.7-py3-none-any.whl", "has_sig": false, "md5_digest": "fa59f30c129ee19521a0d6b4aed30eb2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 16801, "upload_time": "2019-08-07T09:03:05", "url": "https://files.pythonhosted.org/packages/03/76/94554401cdd0fef3397a9dd8cf650ad5ea04a8e13a48df8d086915e07768/vcoclient-0.1.7-py3-none-any.whl" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "a0b35aa92e1e23123d9e27c56c8ce07b", "sha256": "02f2822c422aec3514b812b2b048abd4ec2aea6a0c23d8bcf0b32902a9d4f0da" }, "downloads": -1, "filename": "vcoclient-0.1.8-py3.7.egg", "has_sig": false, "md5_digest": "a0b35aa92e1e23123d9e27c56c8ce07b", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": ">=3.6", "size": 16926, "upload_time": "2019-10-04T07:16:48", "url": "https://files.pythonhosted.org/packages/9a/65/8d122d065ef1d5b088c08b3f3ae1e06ccbb111024454d2e449a922c7c80f/vcoclient-0.1.8-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "00ed6487455385ecd9a0af79743477d4", "sha256": "1b6264944cc46eab290393ae8bef69c9ed2060931fa3648219ac092c714cb8d0" }, "downloads": -1, "filename": "vcoclient-0.1.8-py3-none-any.whl", "has_sig": false, "md5_digest": "00ed6487455385ecd9a0af79743477d4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 17603, "upload_time": "2019-10-04T07:16:45", "url": "https://files.pythonhosted.org/packages/a3/62/516d2f0c9e85c6eaba33f3b91d245572700883511d6dab50e2534375daab/vcoclient-0.1.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c5e0623b15ce5e6dda70f3cda7598f2b", "sha256": "a25c378621a02cd29df2f322b92e3b53ae79096aa2815d414be185b573d327e4" }, "downloads": -1, "filename": "vcoclient-0.1.8.tar.gz", "has_sig": false, "md5_digest": "c5e0623b15ce5e6dda70f3cda7598f2b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 33849, "upload_time": "2019-10-04T07:16:50", "url": "https://files.pythonhosted.org/packages/ad/f2/94efffa6ccba7e084f5cee6cc2241880235857d2bb854474b1f859d52fc2/vcoclient-0.1.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a0b35aa92e1e23123d9e27c56c8ce07b", "sha256": "02f2822c422aec3514b812b2b048abd4ec2aea6a0c23d8bcf0b32902a9d4f0da" }, "downloads": -1, "filename": "vcoclient-0.1.8-py3.7.egg", "has_sig": false, "md5_digest": "a0b35aa92e1e23123d9e27c56c8ce07b", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": ">=3.6", "size": 16926, "upload_time": "2019-10-04T07:16:48", "url": "https://files.pythonhosted.org/packages/9a/65/8d122d065ef1d5b088c08b3f3ae1e06ccbb111024454d2e449a922c7c80f/vcoclient-0.1.8-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "00ed6487455385ecd9a0af79743477d4", "sha256": "1b6264944cc46eab290393ae8bef69c9ed2060931fa3648219ac092c714cb8d0" }, "downloads": -1, "filename": "vcoclient-0.1.8-py3-none-any.whl", "has_sig": false, "md5_digest": "00ed6487455385ecd9a0af79743477d4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 17603, "upload_time": "2019-10-04T07:16:45", "url": "https://files.pythonhosted.org/packages/a3/62/516d2f0c9e85c6eaba33f3b91d245572700883511d6dab50e2534375daab/vcoclient-0.1.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c5e0623b15ce5e6dda70f3cda7598f2b", "sha256": "a25c378621a02cd29df2f322b92e3b53ae79096aa2815d414be185b573d327e4" }, "downloads": -1, "filename": "vcoclient-0.1.8.tar.gz", "has_sig": false, "md5_digest": "c5e0623b15ce5e6dda70f3cda7598f2b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 33849, "upload_time": "2019-10-04T07:16:50", "url": "https://files.pythonhosted.org/packages/ad/f2/94efffa6ccba7e084f5cee6cc2241880235857d2bb854474b1f859d52fc2/vcoclient-0.1.8.tar.gz" } ] }