Package: cloudgenix-tagger
CloudGenix TaggerSynopsisUtility to manage tags across a large number of CloudGenix sites, elements, interfaces, and Circuit Catagories.FeaturesTBDRequirementsActive CloudGenix AccountPython >= 2.7 or >=3.6Python modules:CloudGenix Python SDK >= 5.1.1b1 -https://github.com/CloudGenix/sdk-pythonLicenseMITInstallation:PIP:pip install cloudgenix_tagger. After install,do_tag. Scripts should be placed in the Python
Scripts directory.Github:Download files to a local directory, manually rundo_tag.pyscript.Examples of usage:Add tag "Aaron_Likes_tags" to all sites with "Name" starting with "AUTO"edwards-mbp-pro:cloudgenix_taggeraaron$./do_tags.py-T"Aaron_Likes_tags"-Osites-P"^AUTO.*"-A
Workingon'sites'..100%|############################################################################################################################################################################################################################################################################################################################################################################################################|Time:  0:00:00TagActionObjectNameObjectKeyObjectKeyValueObjectMatchChangeDetail
-------------------------------------------------------------------------------------------------------------------------
Aaron_Likes_tagsaddAUTOMATION-LABnameAUTOMATION-LABTrueadded:['Aaron_Likes_tags']Aaron_Likes_tagsaddAzureCentralUSnameAzureCentralUSFalse
Aaron_Likes_tagsaddChicagoBranch2nameChicagoBranch2False
Aaron_Likes_tagsaddNewYorkBranch1nameNewYorkBranch1False
Aaron_Likes_tagsaddOracleDCnameOracleDCFalse
Aaron_Likes_tagsaddOrange-TestnameOrange-TestFalse
Aaron_Likes_tagsaddSanFranciscoDC1nameSanFranciscoDC1False
Aaron_Likes_tagsaddSeattleBranch3nameSeattleBranch3False
Aaron_Likes_tagsaddWashingtonD.C.-DC2nameWashingtonD.C.-DC2False
Aaron_Likes_tagsaddtestnametestFalse
edwards-mbp-pro:cloudgenix_taggeraaron$Remove tag "Aaron_Likes_tags" from all sites.edwards-mbp-pro:cloudgenix_taggeraaron$./do_tags.py-T"Aaron_Likes_tags"-Osites-P".*"-R
Workingon'sites'..100%|############################################################################################################################################################################################################################################################################################################################################################################################################|Time:  0:00:00TagActionObjectNameObjectKeyObjectKeyValueObjectMatchChangeDetail
---------------------------------------------------------------------------------------------------------------------------
Aaron_Likes_tagsremoveAUTOMATION-LABnameAUTOMATION-LABTrueremoved:['Aaron_Likes_tags']Aaron_Likes_tagsremoveAzureCentralUSnameAzureCentralUSTruenochangesrequired.
Aaron_Likes_tagsremoveChicagoBranch2nameChicagoBranch2Truenochangesrequired.
Aaron_Likes_tagsremoveNewYorkBranch1nameNewYorkBranch1Truenochangesrequired.
Aaron_Likes_tagsremoveOracleDCnameOracleDCTruenochangesrequired.
Aaron_Likes_tagsremoveOrange-TestnameOrange-TestTruenochangesrequired.
Aaron_Likes_tagsremoveSanFranciscoDC1nameSanFranciscoDC1Truenochangesrequired.
Aaron_Likes_tagsremoveSeattleBranch3nameSeattleBranch3Truenochangesrequired.
Aaron_Likes_tagsremoveWashingtonD.C.-DC2nameWashingtonD.C.-DC2Truenochangesrequired.
Aaron_Likes_tagsremovetestnametestTruenochangesrequired.
edwards-mbp-pro:cloudgenix_taggeraaron$Caveats and known issues:NoneVersionVersionBuildChanges1.0.0b1Initial Release.Command line helpedwards-mbp-pro:cloudgenix_taggeraaron$./do_tags.py-h
usage:do_tags.py[-h](--add|--remove)[--simulate]--tagTAG--objectOBJECT[--interfaces-site-keyINTERFACES_SITE_KEY][--interfaces-element-keyINTERFACES_ELEMENT_KEY][--keyKEY][--interfaces-site-patternINTERFACES_SITE_PATTERN][--interfaces-element-patternINTERFACES_ELEMENT_PATTERN]--patternPATTERN[--outputOUTPUT][--controllerCONTROLLER][--emailEMAIL][--passwordPASSWORD][--insecure][--noregion][--sdkdebugSDKDEBUG]CloudGenixTagger(v1.0.0)optionalarguments:-h,--helpshowthishelpmessageandexitAction:AddorRemoveTags--add,-A--remove,-R--simulate,-SSimulateanddisplayprospectivechanges.Don't makeany actual modifications.--tag TAG, -T TAG     Tag to add or remove from objects.--object OBJECT, -O OBJECTObject to add/remove tags from. One of sites,elements, interfaces, circuitcatagories.--interfaces-site-key INTERFACES_SITE_KEY, -SK INTERFACES_SITE_KEYKey in Site object to use for inclusion ('interfaces'only). Default 'name'--interfaces-element-key INTERFACES_ELEMENT_KEY, -EK INTERFACES_ELEMENT_KEYKey in Element object to use for inclusion('interfaces' only). Default 'name'--key KEY, -K KEY     Key in object to use for match. Default 'name'.--interfaces-site-pattern INTERFACES_SITE_PATTERN, -SP INTERFACES_SITE_PATTERNREGEX Pattern to match Site Object with for inclusion('interfaces' only). Default '.*'--interfaces-element-pattern INTERFACES_ELEMENT_PATTERN, -EP INTERFACES_ELEMENT_PATTERNREGEX Pattern to match Element Object with forinclusion ('interfaces' only). Default '.*'--patternPATTERN,-PPATTERNREGEXPatterntomatchObjectKeyvaluewith.--outputOUTPUTOutputtofilename.Ifnotspecified,willprintoutputonSTDOUT.

API:TheseoptionschangehowthisprogramconnectstotheAPI.--controllerCONTROLLER,-CCONTROLLERControllerURI,ex.https://api.elcapitan.cloudgenix.com

Login:Theseoptionsallowskippingofinteractivelogin--emailEMAIL,-EEMAILUsethisemailasUserNameinsteadofcloudgenix_settings.pyorprompting--passwordPASSWORD,-PWPASSWORDUsethisPasswordinsteadofcloudgenix_settings.pyorprompting--insecure,-IDonotverifySSLcertificate--noregion,-NRIgnoreRegion-basedredirection.

Debug:Theseoptionsenabledebuggingoutput--sdkdebugSDKDEBUG,-DSDKDEBUGEnableSDKDebugoutput,levels0-2
edwards-mbp-pro:cloudgenix_taggeraaron$