catocli 2.0.1__py3-none-any.whl → 2.0.3__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 +41 -6
- catocli/__init__.py +1 -1
- catocli/parsers/custom/__init__.py +7 -5
- catocli/parsers/custom/customLib.py +490 -1
- catocli/parsers/custom/export_rules/__init__.py +5 -1
- catocli/parsers/custom/export_rules/export_rules.py +32 -183
- catocli/parsers/custom/export_sites/__init__.py +20 -0
- catocli/parsers/custom/export_sites/export_sites.py +365 -0
- catocli/parsers/custom/import_rules_to_tf/__init__.py +3 -3
- catocli/parsers/custom/import_rules_to_tf/import_rules_to_tf.py +20 -146
- catocli/parsers/custom/import_sites_to_tf/__init__.py +45 -0
- catocli/parsers/custom/import_sites_to_tf/import_sites_to_tf.py +891 -0
- catocli/parsers/mutation_accountManagement/__init__.py +18 -21
- catocli/parsers/mutation_admin/__init__.py +18 -21
- catocli/parsers/mutation_container/__init__.py +6 -7
- catocli/parsers/mutation_hardware/__init__.py +6 -7
- catocli/parsers/mutation_policy/__init__.py +666 -588
- catocli/parsers/mutation_policy_terminalServer/README.md +7 -0
- catocli/parsers/mutation_policy_terminalServer_addRule/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_addSection/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_createPolicyRevision/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_discardPolicyRevision/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_moveRule/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_moveSection/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_publishPolicyRevision/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_removeRule/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_removeSection/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_updatePolicy/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_updateRule/README.md +18 -0
- catocli/parsers/mutation_policy_terminalServer_updateSection/README.md +18 -0
- catocli/parsers/mutation_sandbox/__init__.py +12 -14
- catocli/parsers/mutation_site/__init__.py +189 -175
- catocli/parsers/mutation_site_addSocketAddOnCard/README.md +17 -0
- catocli/parsers/mutation_site_removeSocketAddOnCard/README.md +17 -0
- catocli/parsers/mutation_site_startSiteUpgrade/README.md +17 -0
- catocli/parsers/mutation_sites/__init__.py +189 -175
- catocli/parsers/mutation_sites_addSocketAddOnCard/README.md +17 -0
- catocli/parsers/mutation_sites_removeSocketAddOnCard/README.md +17 -0
- catocli/parsers/mutation_sites_startSiteUpgrade/README.md +17 -0
- catocli/parsers/mutation_xdr/__init__.py +18 -21
- catocli/parsers/parserApiClient.py +36 -11
- catocli/parsers/query_accountBySubdomain/__init__.py +6 -7
- catocli/parsers/query_accountManagement/__init__.py +6 -7
- catocli/parsers/query_accountMetrics/__init__.py +6 -7
- catocli/parsers/query_accountRoles/__init__.py +6 -7
- catocli/parsers/query_accountSnapshot/__init__.py +6 -7
- catocli/parsers/query_admin/__init__.py +6 -7
- catocli/parsers/query_admins/__init__.py +6 -7
- catocli/parsers/query_appStats/__init__.py +6 -7
- catocli/parsers/query_appStatsTimeSeries/__init__.py +6 -7
- catocli/parsers/query_auditFeed/__init__.py +6 -7
- catocli/parsers/query_catalogs/__init__.py +6 -7
- catocli/parsers/query_container/__init__.py +6 -7
- catocli/parsers/query_devices/README.md +2 -1
- catocli/parsers/query_devices/__init__.py +6 -7
- catocli/parsers/query_entityLookup/__init__.py +6 -7
- catocli/parsers/query_events/__init__.py +6 -7
- catocli/parsers/query_eventsFeed/README.md +1 -1
- catocli/parsers/query_eventsFeed/__init__.py +6 -7
- catocli/parsers/query_eventsTimeSeries/__init__.py +6 -7
- catocli/parsers/query_hardware/__init__.py +6 -7
- catocli/parsers/query_hardwareManagement/__init__.py +6 -7
- catocli/parsers/query_licensing/__init__.py +6 -7
- catocli/parsers/query_policy/README.md +2 -1
- catocli/parsers/query_policy/__init__.py +6 -7
- catocli/parsers/query_sandbox/__init__.py +6 -7
- catocli/parsers/query_site/README.md +2 -1
- catocli/parsers/query_site/__init__.py +6 -7
- catocli/parsers/query_siteLocation/__init__.py +4 -8
- catocli/parsers/query_subDomains/__init__.py +6 -7
- catocli/parsers/query_xdr/__init__.py +12 -14
- catocli/parsers/raw/README.md +4 -0
- catocli/parsers/raw/__init__.py +5 -2
- {catocli-2.0.1.dist-info → catocli-2.0.3.dist-info}/METADATA +1 -1
- {catocli-2.0.1.dist-info → catocli-2.0.3.dist-info}/RECORD +108 -67
- graphql_client/api/call_api.py +12 -6
- models/mutation.policy.remotePortFwd.updateRule.json +6 -6
- models/mutation.policy.terminalServer.addRule.json +2403 -0
- models/mutation.policy.terminalServer.addSection.json +1358 -0
- models/mutation.policy.terminalServer.createPolicyRevision.json +1873 -0
- models/mutation.policy.terminalServer.discardPolicyRevision.json +1807 -0
- models/mutation.policy.terminalServer.moveRule.json +1605 -0
- models/mutation.policy.terminalServer.moveSection.json +1259 -0
- models/mutation.policy.terminalServer.publishPolicyRevision.json +1864 -0
- models/mutation.policy.terminalServer.removeRule.json +1253 -0
- models/mutation.policy.terminalServer.removeSection.json +958 -0
- models/mutation.policy.terminalServer.updatePolicy.json +1883 -0
- models/mutation.policy.terminalServer.updateRule.json +2096 -0
- models/mutation.policy.terminalServer.updateSection.json +1111 -0
- models/mutation.site.addSocketAddOnCard.json +1050 -0
- models/mutation.site.removeSocketAddOnCard.json +786 -0
- models/mutation.site.startSiteUpgrade.json +802 -0
- models/mutation.sites.addSocketAddOnCard.json +1050 -0
- models/mutation.sites.removeSocketAddOnCard.json +786 -0
- models/mutation.sites.startSiteUpgrade.json +802 -0
- models/query.devices.json +311 -2
- models/query.events.json +48 -0
- models/query.eventsFeed.json +12 -0
- models/query.eventsTimeSeries.json +36 -0
- models/query.licensing.json +21815 -10093
- models/query.policy.json +1898 -305
- models/query.site.json +225 -0
- models/query.siteLocation.json +97190 -295396
- schema/catolib.py +63 -30
- {catocli-2.0.1.dist-info → catocli-2.0.3.dist-info}/LICENSE +0 -0
- {catocli-2.0.1.dist-info → catocli-2.0.3.dist-info}/WHEEL +0 -0
- {catocli-2.0.1.dist-info → catocli-2.0.3.dist-info}/entry_points.txt +0 -0
- {catocli-2.0.1.dist-info → catocli-2.0.3.dist-info}/top_level.txt +0 -0
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
#### Operation Arguments for query.eventsFeed ####
|
|
16
16
|
`accountIDs` [ID[]] - (optional) List of Unique Account Identifiers.
|
|
17
17
|
`eventFeedFieldFilterInput` [EventFeedFieldFilterInput[]] - (optional) N/A
|
|
18
|
-
`fieldNames` [EventFieldName[]] - (optional) N/A Default Value: ['access_method', 'account_id', 'action', 'actions_taken', 'ad_name', 'alert_id', 'always_on_configuration', 'analyst_verdict', 'api_name', 'api_type', 'app_activity', 'app_activity_category', 'app_activity_type', 'app_stack', 'application', 'application_id', 'application_name', 'application_risk', 'auth_method', 'authentication_type', 'bgp_cato_asn', 'bgp_cato_ip', 'bgp_error_code', 'bgp_peer_asn', 'bgp_peer_ip', 'bgp_route_cidr', 'bgp_suberror_code', 'bypass_duration_sec', 'bypass_method', 'bypass_reason', 'categories', 'cato_app', 'classification', 'client_cert_expires', 'client_cert_name', 'client_class', 'client_version', 'collaborator_name', 'collaborators', 'confidence_level', 'configured_host_name', 'congestion_algorithm', 'connect_on_boot', 'connection_origin', 'connector_name', 'connector_status', 'connector_type', 'container_name', 'correlation_id', 'criticality', 'custom_categories', 'custom_category', 'custom_category_id', 'custom_category_name', 'dest_country', 'dest_country_code', 'dest_group_id', 'dest_group_name', 'dest_ip', 'dest_is_site_or_vpn', 'dest_pid', 'dest_port', 'dest_process_cmdline', 'dest_process_parent_path', 'dest_process_parent_pid', 'dest_process_path', 'dest_site', 'dest_site_id', 'dest_site_name', 'detection_name', 'detection_stage', 'device_categories', 'device_certificate', 'device_id', 'device_manufacturer', 'device_model', 'device_name', 'device_os_type', 'device_posture_profile', 'device_posture_profiles', 'device_type', 'directory_host_name', 'directory_ip', 'directory_sync_result', 'directory_sync_type', 'disinfect_result', 'dlp_fail_mode', 'dlp_profiles', 'dlp_scan_types', 'dns_protection_category', 'dns_query', 'domain_name', 'egress_pop_name', 'egress_site_name', 'email_subject', 'endpoint_id', 'epp_engine_type', 'epp_profile', 'event_count', 'event_id', 'event_message', 'event_sub_type', 'event_type', 'failure_reason', 'file_hash', 'file_name', 'file_operation', 'file_size', 'file_type', 'final_object_status', 'flows_cardinality', 'full_path_url', 'guest_user', 'host_ip', 'host_mac', 'http_request_method', 'incident_aggregation', 'incident_id', 'indication', 'indicator', 'initial_object_status', 'internalId', 'ip_protocol', 'is_admin', 'is_admin_activity', 'is_compliant', 'is_managed', 'is_sanctioned_app', 'is_sinkhole', 'ISP_name', 'key_name', 'labels', 'link_health_is_congested', 'link_health_jitter', 'link_health_latency', 'link_health_pkt_loss', 'link_type', 'logged_in_user', 'login_type', 'matched_data_types', 'mitre_attack_subtechniques', 'mitre_attack_tactics', 'mitre_attack_techniques', 'network_access', 'network_rule', 'notification_api_error', 'notification_description', 'object_id', 'object_name', 'object_type', 'office_mode', 'os_type', 'os_version', 'out_of_band_access', 'owner', 'pac_file', 'parent_connector_name', 'pop_name', 'precedence', 'processes_count', 'producer', 'prompt_action', 'public_ip', 'qos_priority', 'qos_reported_time', 'quarantine_folder_path', 'quarantine_uuid', 'raw_data', 'recommended_actions', 'reference_url', 'registration_code', 'risk_level', 'rule', 'rule_id', 'rule_name', 'severity', 'sharing_scope', 'sign_in_event_types', 'signature_id', 'socket_interface', 'socket_interface_id', 'socket_new_version', 'socket_old_version', 'socket_reset', 'socket_role', 'socket_serial', 'socket_version', 'split_tunnel_configuration', 'src_country', 'src_country_code', 'src_ip', 'src_is_site_or_vpn', 'src_isp_ip', 'src_or_dest_site_id', 'src_pid', 'src_port', 'src_process_cmdline', 'src_process_parent_path', 'src_process_parent_pid', 'src_process_path', 'src_site', 'src_site_id', 'src_site_name', 'static_host', 'status', 'story_id', 'subnet_name', 'targets_cardinality', 'tcp_acceleration', 'tenant_id', 'tenant_name', 'tenant_restriction_rule_name', 'threat_confidence', 'threat_name', 'threat_reference', 'threat_score', 'threat_type', 'threat_verdict', 'time', 'time_str', 'title', 'tls_certificate_error', 'tls_error_description', 'tls_error_type', 'tls_inspection', 'tls_rule_name', 'tls_version', 'traffic_direction', 'translated_client_ip', 'translated_server_ip', 'trigger', 'trust_type', 'trusted_networks', 'tunnel_ip_protocol', 'tunnel_protocol', 'upgrade_end_time', 'upgrade_initiated_by', 'upgrade_start_time', 'url', 'user_agent', 'user_awareness_method', 'user_id', 'user_name', 'user_reference_id', 'user_risk_level', 'vendor', 'vendor_collaborator_id', 'vendor_device_id', 'vendor_device_name', 'vendor_event_id', 'vendor_user_id', 'visible_device_id', 'vpn_lan_access', 'vpn_user_email', 'windows_domain_name', 'xff']
|
|
18
|
+
`fieldNames` [EventFieldName[]] - (optional) N/A Default Value: ['access_method', 'account_id', 'action', 'actions_taken', 'ad_name', 'alert_id', 'always_on_configuration', 'analyst_verdict', 'api_name', 'api_type', 'app_activity', 'app_activity_category', 'app_activity_type', 'app_stack', 'application', 'application_id', 'application_name', 'application_risk', 'auth_method', 'authentication_type', 'bgp_cato_asn', 'bgp_cato_ip', 'bgp_error_code', 'bgp_peer_asn', 'bgp_peer_ip', 'bgp_route_cidr', 'bgp_suberror_code', 'bypass_duration_sec', 'bypass_method', 'bypass_reason', 'categories', 'cato_app', 'classification', 'client_cert_expires', 'client_cert_name', 'client_class', 'client_version', 'collaborator_name', 'collaborators', 'confidence_level', 'configured_host_name', 'congestion_algorithm', 'connect_on_boot', 'connection_origin', 'connector_name', 'connector_status', 'connector_type', 'container_name', 'correlation_id', 'criticality', 'custom_categories', 'custom_category', 'custom_category_id', 'custom_category_name', 'dest_country', 'dest_country_code', 'dest_group_id', 'dest_group_name', 'dest_ip', 'dest_is_site_or_vpn', 'dest_pid', 'dest_port', 'dest_process_cmdline', 'dest_process_parent_path', 'dest_process_parent_pid', 'dest_process_path', 'dest_site', 'dest_site_id', 'dest_site_name', 'detection_name', 'detection_stage', 'device_categories', 'device_certificate', 'device_id', 'device_manufacturer', 'device_model', 'device_name', 'device_os_type', 'device_posture_profile', 'device_posture_profiles', 'device_type', 'directory_host_name', 'directory_ip', 'directory_sync_result', 'directory_sync_type', 'disinfect_result', 'dlp_fail_mode', 'dlp_profiles', 'dlp_scan_types', 'dns_protection_category', 'dns_query', 'domain_name', 'egress_pop_name', 'egress_site_name', 'email_subject', 'endpoint_id', 'epp_engine_type', 'epp_profile', 'event_count', 'event_id', 'event_message', 'event_sub_type', 'event_type', 'failure_reason', 'file_hash', 'file_name', 'file_operation', 'file_size', 'file_type', 'final_object_status', 'flows_cardinality', 'full_path_url', 'guest_user', 'host_ip', 'host_mac', 'http_request_method', 'incident_aggregation', 'incident_id', 'indication', 'indicator', 'initial_object_status', 'internalId', 'ip_protocol', 'is_admin', 'is_admin_activity', 'is_compliant', 'is_managed', 'is_sanctioned_app', 'is_sinkhole', 'ISP_name', 'key_name', 'labels', 'link_health_is_congested', 'link_health_jitter', 'link_health_latency', 'link_health_pkt_loss', 'link_type', 'logged_in_user', 'login_type', 'matched_data_types', 'mitre_attack_subtechniques', 'mitre_attack_tactics', 'mitre_attack_techniques', 'network_access', 'network_rule', 'notification_api_error', 'notification_description', 'object_id', 'object_name', 'object_type', 'office_mode', 'os_type', 'os_version', 'out_of_band_access', 'owner', 'pac_file', 'parent_connector_name', 'pop_name', 'precedence', 'processes_count', 'producer', 'prompt_action', 'public_ip', 'qos_priority', 'qos_reported_time', 'quarantine_folder_path', 'quarantine_uuid', 'raw_data', 'recommended_actions', 'reference_url', 'referer_url', 'registration_code', 'risk_level', 'rule', 'rule_id', 'rule_name', 'severity', 'sharing_scope', 'sign_in_event_types', 'signature_id', 'socket_interface', 'socket_interface_id', 'socket_new_version', 'socket_old_version', 'socket_reset', 'socket_role', 'socket_serial', 'socket_version', 'split_tunnel_configuration', 'src_country', 'src_country_code', 'src_ip', 'src_is_site_or_vpn', 'src_isp_ip', 'src_or_dest_site_id', 'src_pid', 'src_port', 'src_process_cmdline', 'src_process_parent_path', 'src_process_parent_pid', 'src_process_path', 'src_site', 'src_site_id', 'src_site_name', 'static_host', 'status', 'story_id', 'subnet_name', 'targets_cardinality', 'tcp_acceleration', 'tenant_id', 'tenant_name', 'tenant_restriction_rule_name', 'threat_confidence', 'threat_name', 'threat_reference', 'threat_score', 'threat_type', 'threat_verdict', 'time', 'time_str', 'title', 'tls_certificate_error', 'tls_error_description', 'tls_error_type', 'tls_inspection', 'tls_rule_name', 'tls_version', 'traffic_direction', 'translated_client_ip', 'translated_server_ip', 'trigger', 'trust_type', 'trusted_networks', 'tunnel_ip_protocol', 'tunnel_protocol', 'upgrade_end_time', 'upgrade_initiated_by', 'upgrade_start_time', 'url', 'user_agent', 'user_awareness_method', 'user_id', 'user_name', 'user_reference_id', 'user_risk_level', 'vendor', 'vendor_collaborator_id', 'vendor_device_id', 'vendor_device_name', 'vendor_event_id', 'vendor_user_id', 'visible_device_id', 'vpn_lan_access', 'vpn_user_email', 'windows_domain_name', 'xff']
|
|
19
19
|
`marker` [String] - (optional) Marker to use to get results from
|
|
@@ -6,12 +6,11 @@ def query_eventsFeed_parse(query_subparsers):
|
|
|
6
6
|
help='eventsFeed() query operation',
|
|
7
7
|
usage=get_help("query_eventsFeed"))
|
|
8
8
|
|
|
9
|
-
query_eventsFeed_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_eventsFeed_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_eventsFeed_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_eventsFeed_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_eventsFeed_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_eventsFeed_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_eventsFeed_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_eventsFeed_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_eventsFeed_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_eventsFeed_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_eventsFeed_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_eventsFeed_parser.set_defaults(func=createRequest,operation_name='query.eventsFeed')
|
|
@@ -6,12 +6,11 @@ def query_eventsTimeSeries_parse(query_subparsers):
|
|
|
6
6
|
help='eventsTimeSeries() query operation',
|
|
7
7
|
usage=get_help("query_eventsTimeSeries"))
|
|
8
8
|
|
|
9
|
-
query_eventsTimeSeries_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_eventsTimeSeries_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_eventsTimeSeries_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_eventsTimeSeries_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_eventsTimeSeries_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_eventsTimeSeries_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_eventsTimeSeries_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_eventsTimeSeries_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_eventsTimeSeries_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_eventsTimeSeries_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_eventsTimeSeries_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_eventsTimeSeries_parser.set_defaults(func=createRequest,operation_name='query.eventsTimeSeries')
|
|
@@ -6,12 +6,11 @@ def query_hardware_parse(query_subparsers):
|
|
|
6
6
|
help='hardware() query operation',
|
|
7
7
|
usage=get_help("query_hardware"))
|
|
8
8
|
|
|
9
|
-
query_hardware_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_hardware_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_hardware_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_hardware_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_hardware_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_hardware_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_hardware_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_hardware_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_hardware_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_hardware_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_hardware_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_hardware_parser.set_defaults(func=createRequest,operation_name='query.hardware')
|
|
@@ -6,12 +6,11 @@ def query_hardwareManagement_parse(query_subparsers):
|
|
|
6
6
|
help='hardwareManagement() query operation',
|
|
7
7
|
usage=get_help("query_hardwareManagement"))
|
|
8
8
|
|
|
9
|
-
query_hardwareManagement_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_hardwareManagement_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_hardwareManagement_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_hardwareManagement_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_hardwareManagement_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_hardwareManagement_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_hardwareManagement_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_hardwareManagement_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_hardwareManagement_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_hardwareManagement_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_hardwareManagement_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_hardwareManagement_parser.set_defaults(func=createRequest,operation_name='query.hardwareManagement')
|
|
@@ -6,12 +6,11 @@ def query_licensing_parse(query_subparsers):
|
|
|
6
6
|
help='licensing() query operation',
|
|
7
7
|
usage=get_help("query_licensing"))
|
|
8
8
|
|
|
9
|
-
query_licensing_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_licensing_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_licensing_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_licensing_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_licensing_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_licensing_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_licensing_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_licensing_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_licensing_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_licensing_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_licensing_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_licensing_parser.set_defaults(func=createRequest,operation_name='query.licensing')
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
`catocli query policy "$(cat < policy.json)"`
|
|
12
12
|
|
|
13
|
-
`catocli query policy '{"appTenantRestrictionPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}, "dynamicIpAllocationPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}, "internetFirewallPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}, "remotePortFwdPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}, "socketLanPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}, "wanFirewallPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}, "wanNetworkPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}}'`
|
|
13
|
+
`catocli query policy '{"appTenantRestrictionPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}, "dynamicIpAllocationPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}, "internetFirewallPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}, "remotePortFwdPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}, "socketLanPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}, "terminalServerPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}, "wanFirewallPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}, "wanNetworkPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}}'`
|
|
14
14
|
|
|
15
15
|
#### Operation Arguments for query.policy ####
|
|
16
16
|
`accountId` [ID] - (required) N/A
|
|
@@ -19,5 +19,6 @@
|
|
|
19
19
|
`internetFirewallPolicyInput` [InternetFirewallPolicyInput] - (optional) N/A
|
|
20
20
|
`remotePortFwdPolicyInput` [RemotePortFwdPolicyInput] - (optional) N/A
|
|
21
21
|
`socketLanPolicyInput` [SocketLanPolicyInput] - (optional) N/A
|
|
22
|
+
`terminalServerPolicyInput` [TerminalServerPolicyInput] - (optional) N/A
|
|
22
23
|
`wanFirewallPolicyInput` [WanFirewallPolicyInput] - (optional) N/A
|
|
23
24
|
`wanNetworkPolicyInput` [WanNetworkPolicyInput] - (optional) N/A
|
|
@@ -6,12 +6,11 @@ def query_policy_parse(query_subparsers):
|
|
|
6
6
|
help='policy() query operation',
|
|
7
7
|
usage=get_help("query_policy"))
|
|
8
8
|
|
|
9
|
-
query_policy_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_policy_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_policy_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_policy_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_policy_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_policy_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_policy_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_policy_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_policy_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_policy_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_policy_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_policy_parser.set_defaults(func=createRequest,operation_name='query.policy')
|
|
@@ -6,12 +6,11 @@ def query_sandbox_parse(query_subparsers):
|
|
|
6
6
|
help='sandbox() query operation',
|
|
7
7
|
usage=get_help("query_sandbox"))
|
|
8
8
|
|
|
9
|
-
query_sandbox_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_sandbox_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_sandbox_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_sandbox_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_sandbox_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_sandbox_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_sandbox_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_sandbox_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_sandbox_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_sandbox_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_sandbox_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_sandbox_parser.set_defaults(func=createRequest,operation_name='query.sandbox')
|
|
@@ -10,10 +10,11 @@
|
|
|
10
10
|
|
|
11
11
|
`catocli query site "$(cat < site.json)"`
|
|
12
12
|
|
|
13
|
-
`catocli query site '{"bgpPeerListInput": {"siteRefInput": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "bgpPeerRefInput": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "cloudInterconnectConnectionConnectivityInput": {"id": {"id": "ID"}}, "cloudInterconnectPhysicalConnectionIdInput": {"haRole": {"haRole": "enum(HaRole)"}, "siteRefInput": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "cloudInterconnectPhysicalConnectionInput": {"id": {"id": "ID"}}, "siteBgpStatusInput": {"siteRefInput": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}}'`
|
|
13
|
+
`catocli query site '{"availableVersionListInput": {"platforms": {"platforms": ["String"]}}, "bgpPeerListInput": {"siteRefInput": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "bgpPeerRefInput": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "cloudInterconnectConnectionConnectivityInput": {"id": {"id": "ID"}}, "cloudInterconnectPhysicalConnectionIdInput": {"haRole": {"haRole": "enum(HaRole)"}, "siteRefInput": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "cloudInterconnectPhysicalConnectionInput": {"id": {"id": "ID"}}, "siteBgpStatusInput": {"siteRefInput": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}}'`
|
|
14
14
|
|
|
15
15
|
#### Operation Arguments for query.site ####
|
|
16
16
|
`accountId` [ID] - (required) N/A
|
|
17
|
+
`availableVersionListInput` [AvailableVersionListInput] - (required) N/A
|
|
17
18
|
`bgpPeerListInput` [BgpPeerListInput] - (required) N/A
|
|
18
19
|
`bgpPeerRefInput` [BgpPeerRefInput] - (required) N/A
|
|
19
20
|
`cloudInterconnectConnectionConnectivityInput` [CloudInterconnectConnectionConnectivityInput] - (required) N/A
|
|
@@ -6,12 +6,11 @@ def query_site_parse(query_subparsers):
|
|
|
6
6
|
help='site() query operation',
|
|
7
7
|
usage=get_help("query_site"))
|
|
8
8
|
|
|
9
|
-
query_site_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_site_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_site_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_site_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_site_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_site_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_site_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_site_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_site_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_site_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_site_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_site_parser.set_defaults(func=createRequest,operation_name='query.site')
|
|
@@ -5,13 +5,9 @@ def query_siteLocation_parse(query_subparsers):
|
|
|
5
5
|
query_siteLocation_parser = query_subparsers.add_parser('siteLocation',
|
|
6
6
|
help='siteLocation local cli query',
|
|
7
7
|
usage=get_help("query_siteLocation"))
|
|
8
|
-
|
|
9
|
-
query_siteLocation_parser.add_argument('json', help='Variables in JSON format.')
|
|
8
|
+
query_siteLocation_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
9
|
query_siteLocation_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_siteLocation_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_siteLocation_parser.add_argument('-
|
|
14
|
-
help='Verbose output')
|
|
15
|
-
query_siteLocation_parser.add_argument('-p', const=True, default=False, nargs='?',
|
|
16
|
-
help='Pretty print')
|
|
10
|
+
query_siteLocation_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
11
|
+
query_siteLocation_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
12
|
+
query_siteLocation_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
17
13
|
query_siteLocation_parser.set_defaults(func=querySiteLocation,operation_name='query.siteLocation')
|
|
@@ -6,12 +6,11 @@ def query_subDomains_parse(query_subparsers):
|
|
|
6
6
|
help='subDomains() query operation',
|
|
7
7
|
usage=get_help("query_subDomains"))
|
|
8
8
|
|
|
9
|
-
query_subDomains_parser.add_argument('json', help='Variables in JSON format.')
|
|
9
|
+
query_subDomains_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
10
10
|
query_subDomains_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
11
|
-
query_subDomains_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
12
|
-
|
|
13
|
-
query_subDomains_parser.add_argument('-
|
|
14
|
-
|
|
15
|
-
query_subDomains_parser.add_argument('-
|
|
16
|
-
help='Pretty print')
|
|
11
|
+
query_subDomains_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
12
|
+
query_subDomains_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
13
|
+
query_subDomains_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
14
|
+
query_subDomains_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
15
|
+
query_subDomains_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
17
16
|
query_subDomains_parser.set_defaults(func=createRequest,operation_name='query.subDomains')
|
|
@@ -12,26 +12,24 @@ def query_xdr_parse(query_subparsers):
|
|
|
12
12
|
help='stories() xdr operation',
|
|
13
13
|
usage=get_help("query_xdr_stories"))
|
|
14
14
|
|
|
15
|
-
query_xdr_stories_parser.add_argument('json', help='Variables in JSON format.')
|
|
15
|
+
query_xdr_stories_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
16
16
|
query_xdr_stories_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
17
|
-
query_xdr_stories_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
18
|
-
|
|
19
|
-
query_xdr_stories_parser.add_argument('-
|
|
20
|
-
|
|
21
|
-
query_xdr_stories_parser.add_argument('-
|
|
22
|
-
help='Pretty print')
|
|
17
|
+
query_xdr_stories_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
18
|
+
query_xdr_stories_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
19
|
+
query_xdr_stories_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
20
|
+
query_xdr_stories_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
21
|
+
query_xdr_stories_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
23
22
|
query_xdr_stories_parser.set_defaults(func=createRequest,operation_name='query.xdr.stories')
|
|
24
23
|
|
|
25
24
|
query_xdr_story_parser = query_xdr_subparsers.add_parser('story',
|
|
26
25
|
help='story() xdr operation',
|
|
27
26
|
usage=get_help("query_xdr_story"))
|
|
28
27
|
|
|
29
|
-
query_xdr_story_parser.add_argument('json', help='Variables in JSON format.')
|
|
28
|
+
query_xdr_story_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
|
|
30
29
|
query_xdr_story_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
|
|
31
|
-
query_xdr_story_parser.add_argument('-t', const=True, default=False, nargs='?',
|
|
32
|
-
|
|
33
|
-
query_xdr_story_parser.add_argument('-
|
|
34
|
-
|
|
35
|
-
query_xdr_story_parser.add_argument('-
|
|
36
|
-
help='Pretty print')
|
|
30
|
+
query_xdr_story_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
31
|
+
query_xdr_story_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
32
|
+
query_xdr_story_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
33
|
+
query_xdr_story_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
34
|
+
query_xdr_story_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
37
35
|
query_xdr_story_parser.set_defaults(func=createRequest,operation_name='query.xdr.story')
|
catocli/parsers/raw/README.md
CHANGED
|
@@ -13,3 +13,7 @@
|
|
|
13
13
|
`catocli raw '{ "query": "query operationNameHere($yourArgument:String!) { field1 field2 }", "variables": { "yourArgument": "string", "accountID": "10949" }, "operationName": "operationNameHere" } '`
|
|
14
14
|
|
|
15
15
|
`catocli raw '{ "query": "mutation operationNameHere($yourArgument:String!) { field1 field2 }", "variables": { "yourArgument": "string", "accountID": "10949" }, "operationName": "operationNameHere" } '`
|
|
16
|
+
|
|
17
|
+
#### Override API endpoint
|
|
18
|
+
|
|
19
|
+
`catocli raw --endpoint https://custom-api.example.com/graphql '<json>'`
|
catocli/parsers/raw/__init__.py
CHANGED
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
from ..parserApiClient import createRawRequest, get_help
|
|
3
3
|
|
|
4
4
|
def raw_parse(raw_parser):
|
|
5
|
-
raw_parser.add_argument('json', help='Query, Variables and opertaionName in JSON format.')
|
|
6
|
-
raw_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print
|
|
5
|
+
raw_parser.add_argument('json', nargs='?', default='{}', help='Query, Variables and opertaionName in JSON format (defaults to empty object if not provided).')
|
|
6
|
+
raw_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
|
|
7
7
|
raw_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
|
|
8
8
|
raw_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
|
|
9
|
+
raw_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
|
|
10
|
+
raw_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
|
|
11
|
+
raw_parser.add_argument('--endpoint', dest='endpoint', help='Override the API endpoint URL (e.g., https://api.catonetworks.com/api/v1/graphql2)')
|
|
9
12
|
raw_parser.set_defaults(func=createRawRequest,operation_name='raw')
|