catocli 2.1.1__py3-none-any.whl → 2.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of catocli might be problematic. Click here for more details.
- catocli/Utils/clidriver.py +214 -209
- catocli/__init__.py +1 -1
- catocli/parsers/custom/customLib.py +1 -1
- catocli/parsers/custom/export_sites/export_sites.py +118 -130
- catocli/parsers/customParserApiClient.py +1195 -0
- catocli/parsers/custom_private/__init__.py +1 -1
- catocli/parsers/mutation_accountManagement/__init__.py +45 -58
- catocli/parsers/mutation_accountManagement_addAccount/README.md +7 -5
- catocli/parsers/mutation_accountManagement_removeAccount/README.md +4 -5
- catocli/parsers/mutation_accountManagement_updateAccount/README.md +7 -5
- catocli/parsers/mutation_admin/__init__.py +84 -45
- catocli/parsers/mutation_admin_addAdmin/README.md +7 -5
- catocli/parsers/mutation_admin_addServicePrincipalAdmin/README.md +19 -0
- catocli/parsers/mutation_admin_removeAdmin/README.md +7 -5
- catocli/parsers/mutation_admin_removeServicePrincipalAdmin/README.md +19 -0
- catocli/parsers/mutation_admin_updateAdmin/README.md +8 -6
- catocli/parsers/mutation_admin_updateServicePrincipalAdmin/README.md +20 -0
- catocli/parsers/mutation_container/__init__.py +135 -135
- catocli/parsers/mutation_container_delete/README.md +7 -5
- catocli/parsers/mutation_container_fqdn_addValues/README.md +7 -5
- catocli/parsers/mutation_container_fqdn_createFromFile/README.md +7 -5
- catocli/parsers/mutation_container_fqdn_removeValues/README.md +7 -5
- catocli/parsers/mutation_container_fqdn_updateFromFile/README.md +7 -5
- catocli/parsers/mutation_container_ipAddressRange_addValues/README.md +7 -5
- catocli/parsers/mutation_container_ipAddressRange_createFromFile/README.md +7 -5
- catocli/parsers/mutation_container_ipAddressRange_removeValues/README.md +7 -5
- catocli/parsers/mutation_container_ipAddressRange_updateFromFile/README.md +7 -5
- catocli/parsers/mutation_enterpriseDirectory/README.md +7 -0
- catocli/parsers/mutation_enterpriseDirectory/__init__.py +61 -0
- catocli/parsers/mutation_enterpriseDirectory_archiveLocation/README.md +19 -0
- catocli/parsers/mutation_enterpriseDirectory_createLocation/README.md +19 -0
- catocli/parsers/mutation_enterpriseDirectory_restoreLocation/README.md +19 -0
- catocli/parsers/mutation_enterpriseDirectory_updateLocation/README.md +19 -0
- catocli/parsers/mutation_groups/__init__.py +45 -45
- catocli/parsers/mutation_groups_createGroup/README.md +8 -6
- catocli/parsers/mutation_groups_deleteGroup/README.md +8 -6
- catocli/parsers/mutation_groups_updateGroup/README.md +8 -6
- catocli/parsers/mutation_hardware/__init__.py +16 -16
- catocli/parsers/mutation_hardware_updateHardwareShipping/README.md +7 -5
- catocli/parsers/mutation_policy/__init__.py +1302 -1302
- catocli/parsers/mutation_policy_appTenantRestriction_addRule/README.md +8 -6
- catocli/parsers/mutation_policy_appTenantRestriction_addSection/README.md +8 -6
- catocli/parsers/mutation_policy_appTenantRestriction_createPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_appTenantRestriction_discardPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_appTenantRestriction_moveRule/README.md +8 -6
- catocli/parsers/mutation_policy_appTenantRestriction_moveSection/README.md +8 -6
- catocli/parsers/mutation_policy_appTenantRestriction_publishPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_appTenantRestriction_removeRule/README.md +8 -6
- catocli/parsers/mutation_policy_appTenantRestriction_removeSection/README.md +8 -6
- catocli/parsers/mutation_policy_appTenantRestriction_updatePolicy/README.md +8 -6
- catocli/parsers/mutation_policy_appTenantRestriction_updateRule/README.md +8 -6
- catocli/parsers/mutation_policy_appTenantRestriction_updateSection/README.md +8 -6
- catocli/parsers/mutation_policy_dynamicIpAllocation_addRule/README.md +8 -6
- catocli/parsers/mutation_policy_dynamicIpAllocation_addSection/README.md +8 -6
- catocli/parsers/mutation_policy_dynamicIpAllocation_createPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_dynamicIpAllocation_discardPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_dynamicIpAllocation_moveRule/README.md +8 -6
- catocli/parsers/mutation_policy_dynamicIpAllocation_moveSection/README.md +8 -6
- catocli/parsers/mutation_policy_dynamicIpAllocation_publishPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_dynamicIpAllocation_removeRule/README.md +8 -6
- catocli/parsers/mutation_policy_dynamicIpAllocation_removeSection/README.md +8 -6
- catocli/parsers/mutation_policy_dynamicIpAllocation_updatePolicy/README.md +8 -6
- catocli/parsers/mutation_policy_dynamicIpAllocation_updateRule/README.md +8 -6
- catocli/parsers/mutation_policy_dynamicIpAllocation_updateSection/README.md +8 -6
- catocli/parsers/mutation_policy_internetFirewall_addRule/README.md +8 -6
- catocli/parsers/mutation_policy_internetFirewall_addSection/README.md +8 -6
- catocli/parsers/mutation_policy_internetFirewall_createPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_internetFirewall_discardPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_internetFirewall_moveRule/README.md +8 -6
- catocli/parsers/mutation_policy_internetFirewall_moveSection/README.md +8 -6
- catocli/parsers/mutation_policy_internetFirewall_publishPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_internetFirewall_removeRule/README.md +8 -6
- catocli/parsers/mutation_policy_internetFirewall_removeSection/README.md +8 -6
- catocli/parsers/mutation_policy_internetFirewall_updatePolicy/README.md +8 -6
- catocli/parsers/mutation_policy_internetFirewall_updateRule/README.md +8 -6
- catocli/parsers/mutation_policy_internetFirewall_updateSection/README.md +8 -6
- catocli/parsers/mutation_policy_remotePortFwd_addRule/README.md +8 -6
- catocli/parsers/mutation_policy_remotePortFwd_addSection/README.md +8 -6
- catocli/parsers/mutation_policy_remotePortFwd_createPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_remotePortFwd_discardPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_remotePortFwd_moveRule/README.md +8 -6
- catocli/parsers/mutation_policy_remotePortFwd_moveSection/README.md +8 -6
- catocli/parsers/mutation_policy_remotePortFwd_publishPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_remotePortFwd_removeRule/README.md +8 -6
- catocli/parsers/mutation_policy_remotePortFwd_removeSection/README.md +8 -6
- catocli/parsers/mutation_policy_remotePortFwd_updatePolicy/README.md +8 -6
- catocli/parsers/mutation_policy_remotePortFwd_updateRule/README.md +8 -6
- catocli/parsers/mutation_policy_remotePortFwd_updateSection/README.md +8 -6
- catocli/parsers/mutation_policy_socketLan_addRule/README.md +8 -6
- catocli/parsers/mutation_policy_socketLan_addSection/README.md +8 -6
- catocli/parsers/mutation_policy_socketLan_createPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_socketLan_discardPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_socketLan_moveRule/README.md +8 -6
- catocli/parsers/mutation_policy_socketLan_moveSection/README.md +8 -6
- catocli/parsers/mutation_policy_socketLan_publishPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_socketLan_removeRule/README.md +8 -6
- catocli/parsers/mutation_policy_socketLan_removeSection/README.md +8 -6
- catocli/parsers/mutation_policy_socketLan_updatePolicy/README.md +8 -6
- catocli/parsers/mutation_policy_socketLan_updateRule/README.md +8 -6
- catocli/parsers/mutation_policy_socketLan_updateSection/README.md +8 -6
- catocli/parsers/mutation_policy_terminalServer_addRule/README.md +8 -6
- catocli/parsers/mutation_policy_terminalServer_addSection/README.md +8 -6
- catocli/parsers/mutation_policy_terminalServer_createPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_terminalServer_discardPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_terminalServer_moveRule/README.md +8 -6
- catocli/parsers/mutation_policy_terminalServer_moveSection/README.md +8 -6
- catocli/parsers/mutation_policy_terminalServer_publishPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_terminalServer_removeRule/README.md +8 -6
- catocli/parsers/mutation_policy_terminalServer_removeSection/README.md +8 -6
- catocli/parsers/mutation_policy_terminalServer_updatePolicy/README.md +8 -6
- catocli/parsers/mutation_policy_terminalServer_updateRule/README.md +8 -6
- catocli/parsers/mutation_policy_terminalServer_updateSection/README.md +8 -6
- catocli/parsers/mutation_policy_wanFirewall_addRule/README.md +8 -6
- catocli/parsers/mutation_policy_wanFirewall_addSection/README.md +8 -6
- catocli/parsers/mutation_policy_wanFirewall_createPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_wanFirewall_discardPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_wanFirewall_moveRule/README.md +8 -6
- catocli/parsers/mutation_policy_wanFirewall_moveSection/README.md +8 -6
- catocli/parsers/mutation_policy_wanFirewall_publishPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_wanFirewall_removeRule/README.md +8 -6
- catocli/parsers/mutation_policy_wanFirewall_removeSection/README.md +8 -6
- catocli/parsers/mutation_policy_wanFirewall_updatePolicy/README.md +8 -6
- catocli/parsers/mutation_policy_wanFirewall_updateRule/README.md +8 -6
- catocli/parsers/mutation_policy_wanFirewall_updateSection/README.md +8 -6
- catocli/parsers/mutation_policy_wanNetwork_addRule/README.md +8 -6
- catocli/parsers/mutation_policy_wanNetwork_addSection/README.md +8 -6
- catocli/parsers/mutation_policy_wanNetwork_createPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_wanNetwork_discardPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_wanNetwork_moveRule/README.md +8 -6
- catocli/parsers/mutation_policy_wanNetwork_moveSection/README.md +8 -6
- catocli/parsers/mutation_policy_wanNetwork_publishPolicyRevision/README.md +8 -6
- catocli/parsers/mutation_policy_wanNetwork_removeRule/README.md +8 -6
- catocli/parsers/mutation_policy_wanNetwork_removeSection/README.md +8 -6
- catocli/parsers/mutation_policy_wanNetwork_updatePolicy/README.md +8 -6
- catocli/parsers/mutation_policy_wanNetwork_updateRule/README.md +8 -6
- catocli/parsers/mutation_policy_wanNetwork_updateSection/README.md +8 -6
- catocli/parsers/mutation_sandbox/__init__.py +27 -27
- catocli/parsers/mutation_sandbox_deleteReport/README.md +7 -5
- catocli/parsers/mutation_sandbox_uploadFile/README.md +7 -5
- catocli/parsers/mutation_site/__init__.py +474 -474
- catocli/parsers/mutation_site_addBgpPeer/README.md +7 -5
- catocli/parsers/mutation_site_addCloudInterconnectPhysicalConnection/README.md +7 -5
- catocli/parsers/mutation_site_addCloudInterconnectSite/README.md +7 -5
- catocli/parsers/mutation_site_addIpsecIkeV2Site/README.md +7 -5
- catocli/parsers/mutation_site_addIpsecIkeV2SiteTunnels/README.md +8 -6
- catocli/parsers/mutation_site_addNetworkRange/README.md +8 -6
- catocli/parsers/mutation_site_addSecondaryAwsVSocket/README.md +7 -5
- catocli/parsers/mutation_site_addSecondaryAzureVSocket/README.md +7 -5
- catocli/parsers/mutation_site_addSocketAddOnCard/README.md +7 -5
- catocli/parsers/mutation_site_addSocketSite/README.md +7 -5
- catocli/parsers/mutation_site_addStaticHost/README.md +8 -6
- catocli/parsers/mutation_site_assignSiteBwLicense/README.md +7 -5
- catocli/parsers/mutation_site_removeBgpPeer/README.md +7 -5
- catocli/parsers/mutation_site_removeCloudInterconnectPhysicalConnection/README.md +7 -5
- catocli/parsers/mutation_site_removeIpsecIkeV2SiteTunnels/README.md +8 -6
- catocli/parsers/mutation_site_removeNetworkRange/README.md +7 -5
- catocli/parsers/mutation_site_removeSecondaryAwsVSocket/README.md +7 -5
- catocli/parsers/mutation_site_removeSecondaryAzureVSocket/README.md +7 -5
- catocli/parsers/mutation_site_removeSite/README.md +7 -5
- catocli/parsers/mutation_site_removeSiteBwLicense/README.md +7 -5
- catocli/parsers/mutation_site_removeSocketAddOnCard/README.md +7 -5
- catocli/parsers/mutation_site_removeStaticHost/README.md +7 -5
- catocli/parsers/mutation_site_replaceSiteBwLicense/README.md +7 -5
- catocli/parsers/mutation_site_startSiteUpgrade/README.md +7 -5
- catocli/parsers/mutation_site_updateBgpPeer/README.md +7 -5
- catocli/parsers/mutation_site_updateCloudInterconnectPhysicalConnection/README.md +7 -5
- catocli/parsers/mutation_site_updateHa/README.md +8 -6
- catocli/parsers/mutation_site_updateIpsecIkeV2SiteGeneralDetails/README.md +8 -6
- catocli/parsers/mutation_site_updateIpsecIkeV2SiteTunnels/README.md +8 -6
- catocli/parsers/mutation_site_updateNetworkRange/README.md +8 -6
- catocli/parsers/mutation_site_updateSecondaryAwsVSocket/README.md +7 -5
- catocli/parsers/mutation_site_updateSecondaryAzureVSocket/README.md +7 -5
- catocli/parsers/mutation_site_updateSiteBwLicense/README.md +7 -5
- catocli/parsers/mutation_site_updateSiteGeneralDetails/README.md +8 -6
- catocli/parsers/mutation_site_updateSocketInterface/README.md +9 -7
- catocli/parsers/mutation_site_updateStaticHost/README.md +8 -6
- catocli/parsers/mutation_sites/__init__.py +474 -474
- catocli/parsers/mutation_sites_addBgpPeer/README.md +7 -5
- catocli/parsers/mutation_sites_addCloudInterconnectPhysicalConnection/README.md +7 -5
- catocli/parsers/mutation_sites_addCloudInterconnectSite/README.md +7 -5
- catocli/parsers/mutation_sites_addIpsecIkeV2Site/README.md +7 -5
- catocli/parsers/mutation_sites_addIpsecIkeV2SiteTunnels/README.md +8 -6
- catocli/parsers/mutation_sites_addNetworkRange/README.md +8 -6
- catocli/parsers/mutation_sites_addSecondaryAwsVSocket/README.md +7 -5
- catocli/parsers/mutation_sites_addSecondaryAzureVSocket/README.md +7 -5
- catocli/parsers/mutation_sites_addSocketAddOnCard/README.md +7 -5
- catocli/parsers/mutation_sites_addSocketSite/README.md +7 -5
- catocli/parsers/mutation_sites_addStaticHost/README.md +8 -6
- catocli/parsers/mutation_sites_assignSiteBwLicense/README.md +7 -5
- catocli/parsers/mutation_sites_removeBgpPeer/README.md +7 -5
- catocli/parsers/mutation_sites_removeCloudInterconnectPhysicalConnection/README.md +7 -5
- catocli/parsers/mutation_sites_removeIpsecIkeV2SiteTunnels/README.md +8 -6
- catocli/parsers/mutation_sites_removeNetworkRange/README.md +7 -5
- catocli/parsers/mutation_sites_removeSecondaryAwsVSocket/README.md +7 -5
- catocli/parsers/mutation_sites_removeSecondaryAzureVSocket/README.md +7 -5
- catocli/parsers/mutation_sites_removeSite/README.md +7 -5
- catocli/parsers/mutation_sites_removeSiteBwLicense/README.md +7 -5
- catocli/parsers/mutation_sites_removeSocketAddOnCard/README.md +7 -5
- catocli/parsers/mutation_sites_removeStaticHost/README.md +7 -5
- catocli/parsers/mutation_sites_replaceSiteBwLicense/README.md +7 -5
- catocli/parsers/mutation_sites_startSiteUpgrade/README.md +7 -5
- catocli/parsers/mutation_sites_updateBgpPeer/README.md +7 -5
- catocli/parsers/mutation_sites_updateCloudInterconnectPhysicalConnection/README.md +7 -5
- catocli/parsers/mutation_sites_updateHa/README.md +8 -6
- catocli/parsers/mutation_sites_updateIpsecIkeV2SiteGeneralDetails/README.md +8 -6
- catocli/parsers/mutation_sites_updateIpsecIkeV2SiteTunnels/README.md +8 -6
- catocli/parsers/mutation_sites_updateNetworkRange/README.md +8 -6
- catocli/parsers/mutation_sites_updateSecondaryAwsVSocket/README.md +7 -5
- catocli/parsers/mutation_sites_updateSecondaryAzureVSocket/README.md +7 -5
- catocli/parsers/mutation_sites_updateSiteBwLicense/README.md +7 -5
- catocli/parsers/mutation_sites_updateSiteGeneralDetails/README.md +8 -6
- catocli/parsers/mutation_sites_updateSocketInterface/README.md +9 -7
- catocli/parsers/mutation_sites_updateStaticHost/README.md +8 -6
- catocli/parsers/mutation_xdr/__init__.py +45 -45
- catocli/parsers/mutation_xdr_addStoryComment/README.md +7 -5
- catocli/parsers/mutation_xdr_analystFeedback/README.md +7 -6
- catocli/parsers/mutation_xdr_deleteStoryComment/README.md +7 -5
- catocli/parsers/query_accountBySubdomain/README.md +7 -5
- catocli/parsers/query_accountBySubdomain/__init__.py +12 -12
- catocli/parsers/query_accountManagement/README.md +4 -5
- catocli/parsers/query_accountManagement/__init__.py +12 -12
- catocli/parsers/query_accountMetrics/README.md +20 -18
- catocli/parsers/query_accountMetrics/__init__.py +12 -12
- catocli/parsers/query_accountRoles/README.md +7 -5
- catocli/parsers/query_accountRoles/__init__.py +12 -12
- catocli/parsers/query_accountSnapshot/README.md +8 -6
- catocli/parsers/query_accountSnapshot/__init__.py +12 -12
- catocli/parsers/query_admin/README.md +7 -5
- catocli/parsers/query_admin/__init__.py +12 -12
- catocli/parsers/query_admins/README.md +11 -9
- catocli/parsers/query_admins/__init__.py +12 -12
- catocli/parsers/query_appStats/README.md +20 -11
- catocli/parsers/query_appStats/__init__.py +12 -12
- catocli/parsers/query_appStatsTimeSeries/README.md +21 -12
- catocli/parsers/query_appStatsTimeSeries/__init__.py +12 -12
- catocli/parsers/query_auditFeed/README.md +10 -8
- catocli/parsers/query_auditFeed/__init__.py +12 -12
- catocli/parsers/query_catalogs/README.md +9 -7
- catocli/parsers/query_catalogs/__init__.py +12 -12
- catocli/parsers/query_container/README.md +13 -11
- catocli/parsers/query_container/__init__.py +12 -12
- catocli/parsers/query_devices/README.md +10 -8
- catocli/parsers/query_devices/__init__.py +12 -12
- catocli/parsers/query_enterpriseDirectory/README.md +19 -0
- catocli/parsers/query_enterpriseDirectory/__init__.py +16 -0
- catocli/parsers/query_entityLookup/README.md +19 -17
- catocli/parsers/query_entityLookup/__init__.py +12 -12
- catocli/parsers/query_events/README.md +13 -11
- catocli/parsers/query_events/__init__.py +12 -12
- catocli/parsers/query_eventsFeed/README.md +9 -7
- catocli/parsers/query_eventsFeed/__init__.py +12 -12
- catocli/parsers/query_eventsTimeSeries/README.md +14 -12
- catocli/parsers/query_eventsTimeSeries/__init__.py +12 -12
- catocli/parsers/query_groups/__init__.py +51 -51
- catocli/parsers/query_groups_groupList/README.md +8 -6
- catocli/parsers/query_groups_group_members/README.md +8 -6
- catocli/parsers/query_groups_whereUsed/README.md +7 -5
- catocli/parsers/query_hardware/README.md +7 -5
- catocli/parsers/query_hardware/__init__.py +12 -12
- catocli/parsers/query_hardwareManagement/README.md +7 -5
- catocli/parsers/query_hardwareManagement/__init__.py +12 -12
- catocli/parsers/query_licensing/README.md +4 -5
- catocli/parsers/query_licensing/__init__.py +12 -12
- catocli/parsers/query_policy/__init__.py +158 -158
- catocli/parsers/query_policy_appTenantRestriction_policy/README.md +7 -5
- catocli/parsers/query_policy_dynamicIpAllocation_policy/README.md +7 -5
- catocli/parsers/query_policy_internetFirewall_policy/README.md +7 -5
- catocli/parsers/query_policy_remotePortFwd_policy/README.md +7 -5
- catocli/parsers/query_policy_socketLan_policy/README.md +7 -5
- catocli/parsers/query_policy_terminalServer_policy/README.md +7 -5
- catocli/parsers/query_policy_wanFirewall_policy/README.md +7 -5
- catocli/parsers/query_policy_wanNetwork_policy/README.md +7 -5
- catocli/parsers/query_popLocations/README.md +7 -5
- catocli/parsers/query_popLocations/__init__.py +12 -12
- catocli/parsers/query_sandbox/README.md +7 -5
- catocli/parsers/query_sandbox/__init__.py +12 -12
- catocli/parsers/query_servicePrincipalAdmin/README.md +19 -0
- catocli/parsers/query_servicePrincipalAdmin/__init__.py +16 -0
- catocli/parsers/query_site/__init__.py +123 -123
- catocli/parsers/query_siteLocation/__init__.py +10 -10
- catocli/parsers/query_site_availableVersionList/README.md +7 -5
- catocli/parsers/query_site_bgpPeer/README.md +7 -5
- catocli/parsers/query_site_bgpPeerList/README.md +7 -5
- catocli/parsers/query_site_cloudInterconnectConnectionConnectivity/README.md +7 -5
- catocli/parsers/query_site_cloudInterconnectPhysicalConnection/README.md +7 -5
- catocli/parsers/query_site_cloudInterconnectPhysicalConnectionId/README.md +7 -5
- catocli/parsers/query_site_secondaryAwsVSocket/README.md +7 -5
- catocli/parsers/query_site_secondaryAzureVSocket/README.md +7 -5
- catocli/parsers/query_site_siteBgpStatus/README.md +7 -5
- catocli/parsers/query_socketPortMetrics/README.md +13 -11
- catocli/parsers/query_socketPortMetrics/__init__.py +12 -12
- catocli/parsers/query_socketPortMetricsTimeSeries/README.md +14 -12
- catocli/parsers/query_socketPortMetricsTimeSeries/__init__.py +12 -12
- catocli/parsers/query_subDomains/README.md +7 -5
- catocli/parsers/query_subDomains/__init__.py +12 -12
- catocli/parsers/query_xdr/__init__.py +27 -27
- catocli/parsers/query_xdr_stories/README.md +7 -6
- catocli/parsers/query_xdr_story/README.md +9 -8
- catocli/parsers/raw/__init__.py +9 -9
- {catocli-2.1.1.dist-info → catocli-2.1.2.dist-info}/METADATA +1 -1
- catocli-2.1.2.dist-info/RECORD +659 -0
- models/mutation.accountManagement.addAccount.json +5 -15
- models/mutation.accountManagement.updateAccount.json +1 -3
- models/mutation.admin.addAdmin.json +14 -35
- models/mutation.admin.addServicePrincipalAdmin.json +2554 -0
- models/mutation.admin.removeAdmin.json +1 -1
- models/mutation.admin.removeServicePrincipalAdmin.json +201 -0
- models/mutation.admin.updateAdmin.json +13 -30
- models/mutation.admin.updateServicePrincipalAdmin.json +2554 -0
- models/mutation.container.delete.json +9 -435
- models/mutation.container.fqdn.addValues.json +6 -11
- models/mutation.container.fqdn.createFromFile.json +4 -12
- models/mutation.container.fqdn.removeValues.json +6 -11
- models/mutation.container.fqdn.updateFromFile.json +5 -15
- models/mutation.container.ipAddressRange.addValues.json +4 -12
- models/mutation.container.ipAddressRange.createFromFile.json +4 -12
- models/mutation.container.ipAddressRange.removeValues.json +4 -12
- models/mutation.container.ipAddressRange.updateFromFile.json +5 -15
- models/mutation.enterpriseDirectory.archiveLocation.json +1046 -0
- models/mutation.enterpriseDirectory.createLocation.json +2521 -0
- models/mutation.enterpriseDirectory.restoreLocation.json +1046 -0
- models/mutation.enterpriseDirectory.updateLocation.json +2567 -0
- models/mutation.groups.createGroup.json +39 -171
- models/mutation.groups.deleteGroup.json +36 -162
- models/mutation.groups.updateGroup.json +41 -177
- models/mutation.hardware.updateHardwareShipping.json +18 -47
- models/mutation.policy.appTenantRestriction.addRule.json +50 -136
- models/mutation.policy.appTenantRestriction.addSection.json +4 -12
- models/mutation.policy.appTenantRestriction.createPolicyRevision.json +3 -9
- models/mutation.policy.appTenantRestriction.discardPolicyRevision.json +2 -6
- models/mutation.policy.appTenantRestriction.moveRule.json +4 -12
- models/mutation.policy.appTenantRestriction.moveSection.json +4 -12
- models/mutation.policy.appTenantRestriction.publishPolicyRevision.json +3 -9
- models/mutation.policy.appTenantRestriction.removeRule.json +2 -6
- models/mutation.policy.appTenantRestriction.removeSection.json +2 -6
- models/mutation.policy.appTenantRestriction.updatePolicy.json +2 -6
- models/mutation.policy.appTenantRestriction.updateRule.json +49 -133
- models/mutation.policy.appTenantRestriction.updateSection.json +3 -9
- models/mutation.policy.dynamicIpAllocation.addRule.json +15 -45
- models/mutation.policy.dynamicIpAllocation.addSection.json +4 -12
- models/mutation.policy.dynamicIpAllocation.createPolicyRevision.json +3 -9
- models/mutation.policy.dynamicIpAllocation.discardPolicyRevision.json +2 -6
- models/mutation.policy.dynamicIpAllocation.moveRule.json +4 -12
- models/mutation.policy.dynamicIpAllocation.moveSection.json +4 -12
- models/mutation.policy.dynamicIpAllocation.publishPolicyRevision.json +3 -9
- models/mutation.policy.dynamicIpAllocation.removeRule.json +2 -6
- models/mutation.policy.dynamicIpAllocation.removeSection.json +2 -6
- models/mutation.policy.dynamicIpAllocation.updatePolicy.json +2 -6
- models/mutation.policy.dynamicIpAllocation.updateRule.json +14 -42
- models/mutation.policy.dynamicIpAllocation.updateSection.json +3 -9
- models/mutation.policy.internetFirewall.addRule.json +248 -542
- models/mutation.policy.internetFirewall.addSection.json +4 -12
- models/mutation.policy.internetFirewall.createPolicyRevision.json +3 -9
- models/mutation.policy.internetFirewall.discardPolicyRevision.json +2 -6
- models/mutation.policy.internetFirewall.moveRule.json +4 -12
- models/mutation.policy.internetFirewall.moveSection.json +4 -12
- models/mutation.policy.internetFirewall.publishPolicyRevision.json +3 -9
- models/mutation.policy.internetFirewall.removeRule.json +2 -6
- models/mutation.policy.internetFirewall.removeSection.json +2 -6
- models/mutation.policy.internetFirewall.updatePolicy.json +2 -6
- models/mutation.policy.internetFirewall.updateRule.json +247 -539
- models/mutation.policy.internetFirewall.updateSection.json +3 -9
- models/mutation.policy.remotePortFwd.addRule.json +35 -91
- models/mutation.policy.remotePortFwd.addSection.json +4 -12
- models/mutation.policy.remotePortFwd.createPolicyRevision.json +3 -9
- models/mutation.policy.remotePortFwd.discardPolicyRevision.json +2 -6
- models/mutation.policy.remotePortFwd.moveRule.json +4 -12
- models/mutation.policy.remotePortFwd.moveSection.json +4 -12
- models/mutation.policy.remotePortFwd.publishPolicyRevision.json +3 -9
- models/mutation.policy.remotePortFwd.removeRule.json +2 -6
- models/mutation.policy.remotePortFwd.removeSection.json +2 -6
- models/mutation.policy.remotePortFwd.updatePolicy.json +2 -6
- models/mutation.policy.remotePortFwd.updateRule.json +34 -88
- models/mutation.policy.remotePortFwd.updateSection.json +3 -9
- models/mutation.policy.socketLan.addRule.json +78 -185
- models/mutation.policy.socketLan.addSection.json +4 -12
- models/mutation.policy.socketLan.createPolicyRevision.json +3 -9
- models/mutation.policy.socketLan.discardPolicyRevision.json +2 -6
- models/mutation.policy.socketLan.moveRule.json +4 -12
- models/mutation.policy.socketLan.moveSection.json +4 -12
- models/mutation.policy.socketLan.publishPolicyRevision.json +3 -9
- models/mutation.policy.socketLan.removeRule.json +2 -6
- models/mutation.policy.socketLan.removeSection.json +2 -6
- models/mutation.policy.socketLan.updatePolicy.json +2 -6
- models/mutation.policy.socketLan.updateRule.json +77 -182
- models/mutation.policy.socketLan.updateSection.json +3 -9
- models/mutation.policy.terminalServer.addRule.json +10 -30
- models/mutation.policy.terminalServer.addSection.json +4 -12
- models/mutation.policy.terminalServer.createPolicyRevision.json +3 -9
- models/mutation.policy.terminalServer.discardPolicyRevision.json +2 -6
- models/mutation.policy.terminalServer.moveRule.json +4 -12
- models/mutation.policy.terminalServer.moveSection.json +4 -12
- models/mutation.policy.terminalServer.publishPolicyRevision.json +3 -9
- models/mutation.policy.terminalServer.removeRule.json +2 -6
- models/mutation.policy.terminalServer.removeSection.json +2 -6
- models/mutation.policy.terminalServer.updatePolicy.json +2 -6
- models/mutation.policy.terminalServer.updateRule.json +9 -27
- models/mutation.policy.terminalServer.updateSection.json +3 -9
- models/mutation.policy.wanFirewall.addRule.json +290 -654
- models/mutation.policy.wanFirewall.addSection.json +4 -12
- models/mutation.policy.wanFirewall.createPolicyRevision.json +3 -9
- models/mutation.policy.wanFirewall.discardPolicyRevision.json +2 -6
- models/mutation.policy.wanFirewall.moveRule.json +4 -12
- models/mutation.policy.wanFirewall.moveSection.json +4 -12
- models/mutation.policy.wanFirewall.publishPolicyRevision.json +3 -9
- models/mutation.policy.wanFirewall.removeRule.json +2 -6
- models/mutation.policy.wanFirewall.removeSection.json +2 -6
- models/mutation.policy.wanFirewall.updatePolicy.json +2 -6
- models/mutation.policy.wanFirewall.updateRule.json +289 -651
- models/mutation.policy.wanFirewall.updateSection.json +3 -9
- models/mutation.policy.wanNetwork.addRule.json +204 -514
- models/mutation.policy.wanNetwork.addSection.json +4 -12
- models/mutation.policy.wanNetwork.createPolicyRevision.json +3 -9
- models/mutation.policy.wanNetwork.discardPolicyRevision.json +2 -6
- models/mutation.policy.wanNetwork.moveRule.json +4 -12
- models/mutation.policy.wanNetwork.moveSection.json +4 -12
- models/mutation.policy.wanNetwork.publishPolicyRevision.json +3 -9
- models/mutation.policy.wanNetwork.removeRule.json +2 -6
- models/mutation.policy.wanNetwork.removeSection.json +2 -6
- models/mutation.policy.wanNetwork.updatePolicy.json +2 -6
- models/mutation.policy.wanNetwork.updateRule.json +203 -511
- models/mutation.policy.wanNetwork.updateSection.json +3 -9
- models/mutation.sandbox.deleteReport.json +1 -3
- models/mutation.sandbox.uploadFile.json +1 -3
- models/mutation.site.addBgpPeer.json +48 -123
- models/mutation.site.addCloudInterconnectPhysicalConnection.json +12 -36
- models/mutation.site.addCloudInterconnectSite.json +8 -24
- models/mutation.site.addIpsecIkeV2Site.json +10 -30
- models/mutation.site.addIpsecIkeV2SiteTunnels.json +14 -40
- models/mutation.site.addNetworkRange.json +15 -43
- models/mutation.site.addSecondaryAwsVSocket.json +5 -15
- models/mutation.site.addSecondaryAzureVSocket.json +4 -12
- models/mutation.site.addSocketAddOnCard.json +4 -12
- models/mutation.site.addSocketSite.json +12 -36
- models/mutation.site.addStaticHost.json +4 -10
- models/mutation.site.assignSiteBwLicense.json +120 -11782
- models/mutation.site.removeBgpPeer.json +1 -3
- models/mutation.site.removeCloudInterconnectPhysicalConnection.json +1 -3
- models/mutation.site.removeIpsecIkeV2SiteTunnels.json +2 -4
- models/mutation.site.removeNetworkRange.json +1 -1
- models/mutation.site.removeSecondaryAwsVSocket.json +1 -1
- models/mutation.site.removeSecondaryAzureVSocket.json +1 -1
- models/mutation.site.removeSite.json +1 -1
- models/mutation.site.removeSiteBwLicense.json +119 -11779
- models/mutation.site.removeSocketAddOnCard.json +3 -9
- models/mutation.site.removeStaticHost.json +1 -1
- models/mutation.site.replaceSiteBwLicense.json +121 -11785
- models/mutation.site.startSiteUpgrade.json +3 -9
- models/mutation.site.updateBgpPeer.json +47 -120
- models/mutation.site.updateCloudInterconnectPhysicalConnection.json +10 -30
- models/mutation.site.updateHa.json +4 -10
- models/mutation.site.updateIpsecIkeV2SiteGeneralDetails.json +11 -24
- models/mutation.site.updateIpsecIkeV2SiteTunnels.json +15 -43
- models/mutation.site.updateNetworkRange.json +15 -43
- models/mutation.site.updateSecondaryAwsVSocket.json +4 -12
- models/mutation.site.updateSecondaryAzureVSocket.json +3 -9
- models/mutation.site.updateSiteBwLicense.json +120 -11782
- models/mutation.site.updateSiteGeneralDetails.json +14 -40
- models/mutation.site.updateSocketInterface.json +26 -74
- models/mutation.site.updateStaticHost.json +4 -10
- models/mutation.sites.addBgpPeer.json +48 -123
- models/mutation.sites.addCloudInterconnectPhysicalConnection.json +12 -36
- models/mutation.sites.addCloudInterconnectSite.json +8 -24
- models/mutation.sites.addIpsecIkeV2Site.json +10 -30
- models/mutation.sites.addIpsecIkeV2SiteTunnels.json +14 -40
- models/mutation.sites.addNetworkRange.json +15 -43
- models/mutation.sites.addSecondaryAwsVSocket.json +5 -15
- models/mutation.sites.addSecondaryAzureVSocket.json +4 -12
- models/mutation.sites.addSocketAddOnCard.json +4 -12
- models/mutation.sites.addSocketSite.json +12 -36
- models/mutation.sites.addStaticHost.json +4 -10
- models/mutation.sites.assignSiteBwLicense.json +120 -11782
- models/mutation.sites.removeBgpPeer.json +1 -3
- models/mutation.sites.removeCloudInterconnectPhysicalConnection.json +1 -3
- models/mutation.sites.removeIpsecIkeV2SiteTunnels.json +2 -4
- models/mutation.sites.removeNetworkRange.json +1 -1
- models/mutation.sites.removeSecondaryAwsVSocket.json +1 -1
- models/mutation.sites.removeSecondaryAzureVSocket.json +1 -1
- models/mutation.sites.removeSite.json +1 -1
- models/mutation.sites.removeSiteBwLicense.json +119 -11779
- models/mutation.sites.removeSocketAddOnCard.json +3 -9
- models/mutation.sites.removeStaticHost.json +1 -1
- models/mutation.sites.replaceSiteBwLicense.json +121 -11785
- models/mutation.sites.startSiteUpgrade.json +3 -9
- models/mutation.sites.updateBgpPeer.json +47 -120
- models/mutation.sites.updateCloudInterconnectPhysicalConnection.json +10 -30
- models/mutation.sites.updateHa.json +4 -10
- models/mutation.sites.updateIpsecIkeV2SiteGeneralDetails.json +11 -24
- models/mutation.sites.updateIpsecIkeV2SiteTunnels.json +15 -43
- models/mutation.sites.updateNetworkRange.json +15 -43
- models/mutation.sites.updateSecondaryAwsVSocket.json +4 -12
- models/mutation.sites.updateSecondaryAzureVSocket.json +3 -9
- models/mutation.sites.updateSiteBwLicense.json +120 -11782
- models/mutation.sites.updateSiteGeneralDetails.json +14 -40
- models/mutation.sites.updateSocketInterface.json +26 -74
- models/mutation.sites.updateStaticHost.json +4 -10
- models/mutation.xdr.addStoryComment.json +15 -113
- models/mutation.xdr.analystFeedback.json +229 -26307
- models/mutation.xdr.deleteStoryComment.json +15 -113
- models/query.accountBySubdomain.json +2 -1
- models/query.accountMetrics.json +15 -12
- models/query.accountRoles.json +1 -1
- models/query.accountSnapshot.json +4 -2
- models/query.admin.json +1 -1
- models/query.admins.json +7 -10
- models/query.appStats.json +633 -33
- models/query.appStatsTimeSeries.json +15 -28
- models/query.auditFeed.json +225 -16
- models/query.catalogs.json +106 -215
- models/query.container.json +21 -471
- models/query.devices.json +333 -620
- models/query.enterpriseDirectory.json +3596 -0
- models/query.entityLookup.json +15 -27
- models/query.events.json +1875 -33
- models/query.eventsFeed.json +30 -14
- models/query.eventsTimeSeries.json +15 -28
- models/query.groups.group.members.json +23 -55
- models/query.groups.groupList.json +87 -266
- models/query.groups.whereUsed.json +2 -6
- models/query.hardware.json +92 -192
- models/query.hardwareManagement.json +21 -63
- models/query.licensing.json +76 -11721
- models/query.policy.appTenantRestriction.policy.json +2 -6
- models/query.policy.dynamicIpAllocation.policy.json +2 -6
- models/query.policy.internetFirewall.policy.json +2 -6
- models/query.policy.remotePortFwd.policy.json +2 -6
- models/query.policy.socketLan.policy.json +2 -6
- models/query.policy.terminalServer.policy.json +2 -6
- models/query.policy.wanFirewall.policy.json +2 -6
- models/query.policy.wanNetwork.policy.json +2 -6
- models/query.popLocations.json +34 -74
- models/query.sandbox.json +44 -83
- models/query.servicePrincipalAdmin.json +1098 -0
- models/query.site.availableVersionList.json +4 -5
- models/query.site.bgpPeer.json +2 -6
- models/query.site.bgpPeerList.json +2 -6
- models/query.site.cloudInterconnectConnectionConnectivity.json +1 -3
- models/query.site.cloudInterconnectPhysicalConnection.json +1 -3
- models/query.site.cloudInterconnectPhysicalConnectionId.json +3 -9
- models/query.site.secondaryAwsVSocket.json +1 -1
- models/query.site.secondaryAzureVSocket.json +1 -1
- models/query.site.siteBgpStatus.json +2 -6
- models/query.socketPortMetrics.json +465 -33
- models/query.socketPortMetricsTimeSeries.json +15 -28
- models/query.subDomains.json +1 -1
- models/query.xdr.stories.json +306 -26440
- models/query.xdr.story.json +40 -26100
- schema/catolib.py +1262 -970
- schema/importSchema.py +53 -48
- catocli/parsers/mutation/README.md +0 -4
- catocli/parsers/mutation_accountManagement_disableAccount/README.md +0 -16
- catocli/parsers/parserApiClient.py +0 -948
- catocli/parsers/query/README.md +0 -3
- catocli-2.1.1.dist-info/RECORD +0 -645
- models/mutation.accountManagement.disableAccount.json +0 -545
- models/query.policy.json +0 -40899
- models/query.site.json +0 -5688
- schema/remove_policyid.py +0 -89
- schema/remove_policyid_mutations.py +0 -89
- {catocli-2.1.1.dist-info → catocli-2.1.2.dist-info}/WHEEL +0 -0
- {catocli-2.1.1.dist-info → catocli-2.1.2.dist-info}/entry_points.txt +0 -0
- {catocli-2.1.1.dist-info → catocli-2.1.2.dist-info}/licenses/LICENSE +0 -0
- {catocli-2.1.1.dist-info → catocli-2.1.2.dist-info}/top_level.txt +0 -0
|
@@ -18,7 +18,7 @@ def export_socket_site_to_json(args, configuration):
|
|
|
18
18
|
'missing_data': 0,
|
|
19
19
|
'missing_interface_details': []
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
try:
|
|
23
23
|
settings = {}
|
|
24
24
|
with open(os.path.join(os.path.dirname(__file__), '../../../../settings.json'), 'r', encoding='utf-8') as f:
|
|
@@ -46,20 +46,31 @@ def export_socket_site_to_json(args, configuration):
|
|
|
46
46
|
## Create processed_data object indexed by siteId with location ##
|
|
47
47
|
##################################################################
|
|
48
48
|
for snapshot_site in snapshot_sites['data']['accountSnapshot']['sites']:
|
|
49
|
+
site_id = snapshot_site.get('id')
|
|
50
|
+
connectionType = snapshot_site.get('infoSiteSnapshot', {}).get('connType', "")
|
|
51
|
+
# if connectionType=="VSOCKET_VGX_AWS":
|
|
52
|
+
# connectionType = "SOCKET_AWS1500"
|
|
53
|
+
# elif connectionType=="VSOCKET_VGX_AZURE":
|
|
54
|
+
# connectionType = "SOCKET_AZ1500"
|
|
55
|
+
# elif connectionType=="VSOCKET_VGX_ESX":
|
|
56
|
+
# connectionType = "SOCKET_ESX1500"
|
|
57
|
+
|
|
49
58
|
cur_site = {
|
|
50
59
|
'wan_interfaces': [],
|
|
51
60
|
'lan_interfaces': [],
|
|
61
|
+
'native_range': {}
|
|
52
62
|
}
|
|
53
|
-
|
|
54
|
-
connectionType
|
|
55
|
-
if connectionType not in settings["ignore_export_by_socket_type"]:
|
|
63
|
+
|
|
64
|
+
if connectionType in settings["export_by_socket_type"]:
|
|
56
65
|
cur_site['id'] = site_id
|
|
57
66
|
cur_site['name'] = snapshot_site.get('infoSiteSnapshot', {}).get('name')
|
|
58
67
|
cur_site['description'] = snapshot_site.get('infoSiteSnapshot', {}).get('description')
|
|
59
|
-
cur_site['
|
|
68
|
+
cur_site['connection_type'] = connectionType
|
|
60
69
|
cur_site['type'] = snapshot_site.get('infoSiteSnapshot', {}).get('type')
|
|
61
70
|
cur_site = populateSiteLocationData(args, snapshot_site, cur_site)
|
|
62
|
-
|
|
71
|
+
# print("connectionType={connectionType} site_id={site_id} site_name={site_name}".format(connectionType=connectionType, site_id=site_id, site_name=cur_site['name']))
|
|
72
|
+
# if connectionType in settings["default_socket_interface_map"]:
|
|
73
|
+
# print("default_interface__index="+settings["default_socket_interface_map"][connectionType])
|
|
63
74
|
site_interfaces = snapshot_site.get('infoSiteSnapshot', {}).get('interfaces', [])
|
|
64
75
|
for wan_ni in site_interfaces:
|
|
65
76
|
cur_wan_interface = {}
|
|
@@ -71,9 +82,9 @@ def export_socket_site_to_json(args, configuration):
|
|
|
71
82
|
else:
|
|
72
83
|
cur_wan_interface['id'] = site_id+":INT_"+ wan_ni.get('id', "")
|
|
73
84
|
cur_wan_interface['name'] = wan_ni.get('name', "")
|
|
74
|
-
cur_wan_interface['
|
|
75
|
-
cur_wan_interface['
|
|
76
|
-
cur_wan_interface['
|
|
85
|
+
cur_wan_interface['upstream_bandwidth'] = wan_ni.get('upstreamBandwidth', 0)
|
|
86
|
+
cur_wan_interface['downstream_bandwidth'] = wan_ni.get('downstreamBandwidth', 0)
|
|
87
|
+
cur_wan_interface['dest_type'] = wan_ni.get('destType', "")
|
|
77
88
|
cur_wan_interface['role'] = role
|
|
78
89
|
cur_site['wan_interfaces'].append(cur_wan_interface)
|
|
79
90
|
|
|
@@ -83,48 +94,36 @@ def export_socket_site_to_json(args, configuration):
|
|
|
83
94
|
##################################################################################
|
|
84
95
|
## Process entity lookup LAN network interfaces adding to site object by site_id##
|
|
85
96
|
##################################################################################
|
|
86
|
-
interface_map = {}
|
|
87
97
|
for lan_ni in entity_network_interfaces:
|
|
88
|
-
cur_lan_interface = {
|
|
89
|
-
'network_ranges': [],
|
|
90
|
-
}
|
|
91
|
-
site_id = str(lan_ni.get("helperFields","").get('siteId', ""))
|
|
92
|
-
id = str(lan_ni.get('entity', "").get('id', ""))
|
|
93
|
-
interfaceName = lan_ni.get('helperFields', "").get('interfaceName', "")
|
|
94
|
-
cur_lan_interface['id'] = id
|
|
95
|
-
cur_lan_interface['name'] = interfaceName
|
|
96
|
-
# Split interfaceName on " \ " and take the last element
|
|
97
|
-
cur_lan_interface['index'] = lan_ni.get("helperFields","").get('interfaceId', "")
|
|
98
|
-
cur_lan_interface['destType'] = lan_ni.get("helperFields","").get('destType', "")
|
|
99
|
-
|
|
100
|
-
for range in entity_network_ranges:
|
|
101
|
-
if hasattr(args, 'verbose') and args.verbose:
|
|
102
|
-
print(f"Processing network range: {type(range)} - {range}")
|
|
103
|
-
helper_fields = range.get("helperFields", {})
|
|
104
|
-
entity_data = range.get('entity', {})
|
|
105
|
-
range_name = entity_data.get('name', "")
|
|
106
|
-
if range_name and " \\ " in range_name:
|
|
107
|
-
range_name = range_name.split(" \\ ").pop()
|
|
108
|
-
else:
|
|
109
|
-
range_name = range_name
|
|
110
|
-
network_range_site_id = str(helper_fields.get('siteId', ""))
|
|
111
|
-
network_range_interface_name = str(helper_fields.get('interfaceName', ""))
|
|
112
|
-
if site_id == network_range_site_id and interfaceName == network_range_interface_name and range_name == "Native Range":
|
|
113
|
-
cur_lan_interface['subnet'] = helper_fields.get('subnet', "")
|
|
114
|
-
cur_lan_interface['vlanTag'] = helper_fields.get('vlanTag', "")
|
|
115
|
-
cur_lan_interface['microsegmentation'] = helper_fields.get('microsegmentation', "")
|
|
116
|
-
|
|
117
|
-
# Create a composite key for interface mapping that includes site_id
|
|
118
|
-
interface_key = f"{site_id}_{interfaceName}"
|
|
119
|
-
interface_map[interface_key] = id
|
|
120
|
-
|
|
121
98
|
# Only add interface if the site exists in processed_data
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
99
|
+
lan_ni_helper_fields = lan_ni.get("helperFields", {})
|
|
100
|
+
lan_ni_entity_data = lan_ni.get('entity', {})
|
|
101
|
+
lan_ni_site_id = str(lan_ni_helper_fields.get('siteId', ""))
|
|
102
|
+
cur_site_entry = next((site for site in processed_data['sites'] if site['id'] == lan_ni_site_id), None)
|
|
103
|
+
if cur_site_entry:
|
|
104
|
+
cur_lan_interface = {
|
|
105
|
+
'network_ranges': []
|
|
106
|
+
}
|
|
107
|
+
ni_interface_id = lan_ni_entity_data.get('id', "")
|
|
108
|
+
ni_interface_name = lan_ni_helper_fields.get('interfaceName', "")
|
|
109
|
+
lan_ni_subnet = str(lan_ni_helper_fields.get('subnet', ""))
|
|
110
|
+
ni_index = lan_ni_helper_fields.get('interfaceId', "")
|
|
111
|
+
ni_index = f"INT_{ni_index}" if isinstance(ni_index, (int, str)) and str(ni_index).isdigit() else ni_index
|
|
112
|
+
if cur_site_entry["connection_type"] in settings["default_socket_interface_map"] and ni_index in settings["default_socket_interface_map"][cur_site["connection_type"]]:
|
|
113
|
+
cur_native_range = cur_site_entry["native_range"]
|
|
114
|
+
cur_site_entry["native_range"]["interface_id"] = ni_interface_id
|
|
115
|
+
cur_site_entry["native_range"]["interface_name"] = ni_interface_name
|
|
116
|
+
cur_site_entry["native_range"]["subnet"] = lan_ni_subnet
|
|
117
|
+
cur_site_entry["native_range"]["index"] = ni_index
|
|
118
|
+
else:
|
|
119
|
+
cur_lan_interface['id'] = ni_interface_id
|
|
120
|
+
cur_lan_interface['name'] = ni_interface_name
|
|
121
|
+
cur_lan_interface['index'] = ni_index
|
|
122
|
+
cur_lan_interface['dest_type'] = lan_ni_helper_fields.get('destType', "")
|
|
123
|
+
cur_site_entry['lan_interfaces'].append(cur_lan_interface)
|
|
125
124
|
else:
|
|
126
125
|
if hasattr(args, 'verbose') and args.verbose:
|
|
127
|
-
print(f"WARNING: Site {
|
|
126
|
+
print(f"WARNING: Site {lan_ni_site_id} not found in snapshot data, skipping interface {ni_interface_name} ({id})")
|
|
128
127
|
|
|
129
128
|
#############################################################################
|
|
130
129
|
## Process entity lookup network ranges populating by network interface id ##
|
|
@@ -132,91 +131,80 @@ def export_socket_site_to_json(args, configuration):
|
|
|
132
131
|
for range in entity_network_ranges:
|
|
133
132
|
if hasattr(args, 'verbose') and args.verbose:
|
|
134
133
|
print(f"Processing network range: {type(range)} - {range}")
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
range_name = entity_data.get('name', "")
|
|
151
|
-
if range_name and " \\ " in range_name:
|
|
152
|
-
cur_range['rangeName'] = range_name.split(" \\ ").pop()
|
|
153
|
-
else:
|
|
154
|
-
cur_range['rangeName'] = range_name
|
|
155
|
-
cur_range['name'] = range_name
|
|
156
|
-
cur_range['subnet'] = helper_fields.get('subnet', "")
|
|
157
|
-
cur_range['vlanTag'] = helper_fields.get('vlanTag', "")
|
|
158
|
-
cur_range['microsegmentation'] = helper_fields.get('microsegmentation', "")
|
|
159
|
-
|
|
160
|
-
# Safely add to processed_data with existence checks
|
|
161
|
-
if site_id and interface_id and range_id and cur_range['rangeName'] != "Native Range":
|
|
162
|
-
site_entry = next((site for site in processed_data['sites'] if site['id'] == site_id), None)
|
|
163
|
-
if not site_entry:
|
|
164
|
-
# print(f"WARNING: Site ID {site_id} not found in processed_data")
|
|
165
|
-
warning_stats['missing_sites'] += 1
|
|
166
|
-
continue
|
|
167
|
-
|
|
168
|
-
# Find the interface in the lan_interfaces array
|
|
169
|
-
interface_entry = next((iface for iface in site_entry['lan_interfaces'] if iface['id'] == interface_id), None)
|
|
170
|
-
if not interface_entry:
|
|
171
|
-
print(f"WARNING: Interface {interface_id} (name: {interface_name}) not found in site {site_id}. Range {range_id} will be skipped.")
|
|
172
|
-
warning_stats['missing_interfaces'] += 1
|
|
173
|
-
warning_stats['missing_interface_details'].append({
|
|
174
|
-
'interface_id': interface_id,
|
|
175
|
-
'interface_name': interface_name,
|
|
176
|
-
'site_id': site_id,
|
|
177
|
-
'range_id': range_id
|
|
178
|
-
})
|
|
179
|
-
if hasattr(args, 'verbose') and args.verbose:
|
|
180
|
-
available_interfaces = [iface['id'] for iface in site_entry['lan_interfaces']]
|
|
181
|
-
print(f" Available interfaces in site {site_id}: {available_interfaces}")
|
|
182
|
-
print(f" Looked up interface with key: {interface_key}")
|
|
183
|
-
continue
|
|
184
|
-
interface_entry['network_ranges'].append(cur_range)
|
|
185
|
-
if hasattr(args, 'verbose') and args.verbose:
|
|
186
|
-
print(f" Successfully added range {range_id} to site {site_id}, interface_name {interface_name} with interface_id {interface_id}")
|
|
187
|
-
else:
|
|
188
|
-
if not interface_id:
|
|
189
|
-
print(f"WARNING: Interface lookup failed for range {range_id}. Site: {site_id}, Interface name: {interface_name}, Lookup key: {interface_key}")
|
|
190
|
-
if hasattr(args, 'verbose') and args.verbose:
|
|
191
|
-
print(f" Available interface keys: {list(interface_map.keys())[:10]}...") # Show first 10 keys
|
|
192
|
-
else:
|
|
193
|
-
print(f"WARNING: Missing required data for range: site_id={site_id}, interface_id={interface_id}, range_id={range_id}")
|
|
194
|
-
warning_stats['missing_data'] += 1
|
|
134
|
+
nr_helper_fields = range.get("helperFields", {})
|
|
135
|
+
nr_entity_data = range.get('entity', {})
|
|
136
|
+
nr_interface_name = str(nr_helper_fields.get('interfaceName', ""))
|
|
137
|
+
nr_site_id = str(nr_helper_fields.get('siteId', ""))
|
|
138
|
+
nr_site_entry = next((site for site in processed_data['sites'] if site['id'] == nr_site_id), None)
|
|
139
|
+
if nr_site_entry:
|
|
140
|
+
nr_subnet = nr_helper_fields.get('subnet', "")
|
|
141
|
+
nr_vlan = nr_helper_fields.get('vlanTag', "")
|
|
142
|
+
nr_mdns_reflector = nr_helper_fields.get('mdnsReflector', False)
|
|
143
|
+
nr_dhcp_microsegmentation = nr_helper_fields.get('microsegmentation', False)
|
|
144
|
+
range_name = nr_entity_data.get('name', "")
|
|
145
|
+
if range_name and " \\ " in range_name:
|
|
146
|
+
range_name = range_name.split(" \\ ").pop()
|
|
147
|
+
range_id = nr_entity_data.get('id', "")
|
|
148
|
+
nr_interface_name = str(nr_helper_fields.get('interfaceName', ""))
|
|
195
149
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
unique_interfaces = {}
|
|
208
|
-
for detail in warning_stats['missing_interface_details']:
|
|
209
|
-
key = f"{detail['interface_id']} ({detail['interface_name']})"
|
|
210
|
-
if key not in unique_interfaces:
|
|
211
|
-
unique_interfaces[key] = []
|
|
212
|
-
unique_interfaces[key].append(detail['site_id'])
|
|
150
|
+
# the following fields are missing from the schema, populating blank fields in the interim
|
|
151
|
+
nr_dhcp_type = nr_helper_fields.get('XXXXX', "")
|
|
152
|
+
nr_ip_range = nr_helper_fields.get('XXXXX', "")
|
|
153
|
+
nr_relay_group_id = nr_helper_fields.get('XXXXX', "")
|
|
154
|
+
nr_gateway = nr_helper_fields.get('XXXXX', "")
|
|
155
|
+
nr_range_type = nr_helper_fields.get('XXXXX', "")
|
|
156
|
+
nr_translated_subnet = nr_helper_fields.get('XXXXX', "")
|
|
157
|
+
nr_internet_only = nr_helper_fields.get('XXXXX', False)
|
|
158
|
+
nr_local_ip = nr_helper_fields.get('XXXXX', "")
|
|
159
|
+
|
|
160
|
+
site_native_range = nr_site_entry.get('native_range', {}) if nr_site_entry else {}
|
|
213
161
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
162
|
+
if site_native_range.get("interface_name", "") == nr_interface_name:
|
|
163
|
+
site_native_range['range_name'] = range_name
|
|
164
|
+
site_native_range['range_id'] = range_id
|
|
165
|
+
site_native_range['vlan'] = nr_vlan
|
|
166
|
+
site_native_range['mdns_reflector'] = nr_mdns_reflector
|
|
167
|
+
site_native_range['dhcp_microsegmentation'] = nr_dhcp_microsegmentation
|
|
168
|
+
site_native_range['gateway'] = nr_gateway
|
|
169
|
+
site_native_range['range_type'] = nr_range_type
|
|
170
|
+
site_native_range['translated_subnet'] = nr_translated_subnet
|
|
171
|
+
site_native_range['internet_only'] = nr_internet_only
|
|
172
|
+
site_native_range['local_ip'] = nr_local_ip
|
|
173
|
+
site_native_range['dhcp_settings'] = {
|
|
174
|
+
'dhcp_type': nr_dhcp_type,
|
|
175
|
+
'ip_range': nr_ip_range,
|
|
176
|
+
'relay_group_id': nr_relay_group_id,
|
|
177
|
+
'dhcp_microsegmentation': nr_dhcp_microsegmentation
|
|
178
|
+
}
|
|
179
|
+
else:
|
|
180
|
+
nr_lan_interface_entry = next((lan_nic for lan_nic in nr_site_entry["lan_interfaces"] if lan_nic['name'] == nr_interface_name), None)
|
|
181
|
+
# print(f"checking range: {network_range_site_id} - {network_range_interface_name}")
|
|
182
|
+
if nr_lan_interface_entry:
|
|
183
|
+
cur_range = {}
|
|
184
|
+
cur_range['id'] = range_id
|
|
185
|
+
cur_range['name'] = range_name
|
|
186
|
+
cur_range['subnet'] = nr_subnet
|
|
187
|
+
cur_range['vlan'] = nr_vlan
|
|
188
|
+
cur_range['mdns_reflector'] = nr_mdns_reflector
|
|
189
|
+
## The folliowing fields are missing from the schema, populating blank fields in the interim
|
|
190
|
+
cur_range['gateway'] = nr_helper_fields.get('XXXXX', "")
|
|
191
|
+
cur_range['range_type'] = nr_helper_fields.get('XXXXX', "")
|
|
192
|
+
cur_range['translated_subnet'] = nr_helper_fields.get('XXXXX', "")
|
|
193
|
+
cur_range['internet_only'] = nr_helper_fields.get('XXXXX', "False")
|
|
194
|
+
cur_range['local_ip'] = nr_helper_fields.get('XXXXX', "")
|
|
195
|
+
cur_range['dhcp_settings'] = {
|
|
196
|
+
'dhcp_type': nr_helper_fields.get('XXXXX', ""),
|
|
197
|
+
'ip_range': nr_helper_fields.get('XXXXX', ""),
|
|
198
|
+
'relay_group_id': nr_helper_fields.get('XXXXX', ""),
|
|
199
|
+
'dhcp_microsegmentation': nr_dhcp_microsegmentation
|
|
200
|
+
}
|
|
201
|
+
nr_lan_interface_entry["network_ranges"].append(cur_range)
|
|
202
|
+
else:
|
|
203
|
+
# if hasattr(args, 'verbose') and args.verbose:
|
|
204
|
+
print(f"Skipping range {nr_entity_data.get('id', '')}: site_id {nr_site_id} and {nr_interface_name} not found in ")
|
|
205
|
+
else:
|
|
206
|
+
if hasattr(args, 'verbose') and args.verbose:
|
|
207
|
+
print(f"Skipping range, site_id is unsupported for export {nr_site_id}")
|
|
220
208
|
|
|
221
209
|
# Handle timestamp in filename if requested
|
|
222
210
|
filename_template = "socket_sites_{account_id}.json"
|