Skip to content

Instantly share code, notes, and snippets.

@jstanley23
Created October 16, 2017 13:27
Show Gist options
  • Select an option

  • Save jstanley23/7933f974d6ab24d6c6357a0d49190e24 to your computer and use it in GitHub Desktop.

Select an option

Save jstanley23/7933f974d6ab24d6c6357a0d49190e24 to your computer and use it in GitHub Desktop.
get Catalog lengths
def getCatalogNumbers():
catalogsToCheck = [
('CiscoUCS.ucsSearchCatalog', 'dmd.Devices.CiscoUCS.ucsSearchCatalog'),
('CloudStack.HostCatalog', 'dmd.Devices.CloudStack.HostCatalog'),
('CloudStack.RouterVMCatalog', 'dmd.Devices.CloudStack.RouterVMCatalog'),
('CloudStack.SystemVMCatalog', 'dmd.Devices.CloudStack.SystemVMCatalog'),
('CloudStack.VirtualMachineCatalog', 'dmd.Devices.CloudStack.VirtualMachineCatalog'),
('Devices.deviceSearch', 'dmd.Devices.deviceSearch'),
('Devices.searchRRDTemplates', 'dmd.Devices.searchRRDTemplates'),
('Events.eventClassSearch', 'dmd.Events.eventClassSearch'),
('global_catalog', 'dmd.global_catalog'),
('HP.Proliant.deviceSearch', 'dmd.Devices.Server.HP.Proliant.deviceSearch'),
('IPv6Networks.ipSearch', 'dmd.IPv6Networks.ipSearch'),
('JobManager.job_catalog', 'dmd.JobManager.job_catalog'),
('Layer2.macs_catalog', 'dmd.Devices.macs_catalog'),
('maintenanceWindowSearch', 'dmd.maintenanceWindowSearch'),
('Manufacturers.productSearch', 'dmd.Manufacturers.productSearch'),
('Mibs.mibSearch', 'dmd.Mibs.mibSearch'),
('Networks.ipSearch', 'dmd.Networks.ipSearch'),
('Services.serviceSearch', 'dmd.Services.serviceSearch'),
('Storage.iqnCatalog', 'dmd.Devices.Storage.iqnCatalog'),
('Storage.wwnCatalog', 'dmd.Devices.Storage.wwnCatalog'),
('vCloud.vCloudVMSearch', 'dmd.Devices.vCloud.vCloudVMSearch'),
('VMware.vmwareGuestSearch', 'dmd.Devices.VMware.vmwareGuestSearch'),
('vSphere.lunCatalog', 'dmd.Devices.vSphere.lunCatalog'),
('vSphere.pnicCatalog', 'dmd.Devices.vSphere.pnicCatalog'),
('vSphere.vnicCatalog', 'dmd.Devices.vSphere.vnicCatalog'),
('XenServer.PIFCatalog', 'dmd.Devices.XenServer.PIFCatalog'),
('XenServer.VIFCatalog', 'dmd.Devices.XenServer.VIFCatalog'),
('XenServer.XenServerCatalog', 'dmd.Devices.XenServer.XenServerCatalog'),
('ZenLinkManager.layer2_catalog', 'dmd.ZenLinkManager.layer2_catalog'),
('ZenLinkManager.layer3_catalog', 'dmd.ZenLinkManager.layer3_catalog'),
('zenPackPersistence', 'dmd.zenPackPersistence')
]
for catalog in catalogsToCheck:
print catalog[0], len(catalog[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment