cortexapps-cli 1.22.0__tar.gz → 1.24.0__tar.gz

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.
Files changed (152) hide show
  1. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/PKG-INFO +1 -1
  2. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/catalog.py +187 -145
  3. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/aws.py +2 -2
  4. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/azure_devops.py +2 -2
  5. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/azure_resources.py +2 -2
  6. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/circleci.py +2 -2
  7. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/coralogix.py +2 -2
  8. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/datadog.py +2 -2
  9. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/gitlab.py +2 -2
  10. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/incidentio.py +2 -2
  11. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/launchdarkly.py +2 -2
  12. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/pagerduty.py +2 -2
  13. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/prometheus.py +2 -2
  14. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/sonarqube.py +2 -2
  15. cortexapps_cli-1.24.0/cortexapps_cli/commands/solutions.py +682 -0
  16. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/cortex_client.py +29 -8
  17. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/.github/workflows/cortex-service-version.yaml +57 -0
  18. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/README.md +95 -0
  19. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/api-gateway-3.0.1.yaml +17 -0
  20. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/api-gateway-3.1.0.yaml +17 -0
  21. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/api-gateway-3.1.1.yaml +17 -0
  22. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/api-gateway.yaml +12 -0
  23. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/auth-2.1.0.yaml +17 -0
  24. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/auth-2.1.1.yaml +17 -0
  25. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/auth-2.2.0.yaml +17 -0
  26. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/auth.yaml +12 -0
  27. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/aws-dev-us-west-2.yaml +15 -0
  28. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/billing-1.1.0.yaml +10 -0
  29. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/billing-1.2.0.yaml +10 -0
  30. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/billing.yaml +11 -0
  31. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/cart-1.0.2.yaml +10 -0
  32. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/cart.yaml +10 -0
  33. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/checkout-2.2.0.yaml +10 -0
  34. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/checkout-2.3.0.yaml +10 -0
  35. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/checkout-2.4.0.yaml +10 -0
  36. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/checkout.yaml +12 -0
  37. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/gcp-prod-us-east-1.yaml +15 -0
  38. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/gcp-prod-us-west-1.yaml +15 -0
  39. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/gcp-staging-us-east-1.yaml +15 -0
  40. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/notifications-1.0.0.yaml +11 -0
  41. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/notifications-1.0.1.yaml +11 -0
  42. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/notifications-1.1.0.yaml +11 -0
  43. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/notifications.yaml +12 -0
  44. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/order-service-2.0.1.yaml +10 -0
  45. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/order-service-2.1.0.yaml +10 -0
  46. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/order-service.yaml +11 -0
  47. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/payments-1.6.1.yaml +20 -0
  48. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/payments-1.7.0.yaml +17 -0
  49. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/payments-1.7.1.yaml +17 -0
  50. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/payments.yaml +13 -0
  51. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/release-2026-06-20.yaml +20 -0
  52. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/release-2026-07-01.yaml +20 -0
  53. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/release-2026-07-09.yaml +20 -0
  54. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/release-2026-07-10.yaml +20 -0
  55. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/search-4.0.0.yaml +10 -0
  56. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/search-4.1.0.yaml +10 -0
  57. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/search.yaml +11 -0
  58. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/user-service-1.2.0.yaml +10 -0
  59. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/user-service-1.3.0.yaml +10 -0
  60. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/catalog/user-service.yaml +11 -0
  61. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/entity-relationship-types/environments.json +26 -0
  62. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/entity-relationship-types/versions.json +20 -0
  63. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/entity-types/environment.json +1 -0
  64. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/entity-types/release.json +1 -0
  65. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/entity-types/service-version.json +1 -0
  66. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/workflows/create-environment.yaml +71 -0
  67. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/workflows/create-release.yaml +88 -0
  68. cortexapps_cli-1.24.0/cortexapps_cli/solutions/environments/workflows/trigger-github-release.yaml +26 -0
  69. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/pyproject.toml +1 -1
  70. cortexapps_cli-1.22.0/cortexapps_cli/commands/solutions.py +0 -190
  71. cortexapps_cli-1.22.0/cortexapps_cli/solutions/github-starter/README.md +0 -50
  72. cortexapps_cli-1.22.0/cortexapps_cli/solutions/github-starter/scorecards/github-readiness.yaml +0 -15
  73. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/LICENSE +0 -0
  74. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/README.rst +0 -0
  75. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/__init__.py +0 -0
  76. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/cli.py +0 -0
  77. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/command_options.py +0 -0
  78. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/api_keys.py +0 -0
  79. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/audit_logs.py +0 -0
  80. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/backup.py +0 -0
  81. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/backup_commands/cortex_export.py +0 -0
  82. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/custom_data.py +0 -0
  83. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/custom_events.py +0 -0
  84. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/custom_metrics.py +0 -0
  85. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/dependencies.py +0 -0
  86. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/deploys.py +0 -0
  87. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/discovery_audit.py +0 -0
  88. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/docs.py +0 -0
  89. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/entity_relationship_types.py +0 -0
  90. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/entity_relationships.py +0 -0
  91. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/entity_types.py +0 -0
  92. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/gitops_logs.py +0 -0
  93. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/groups.py +0 -0
  94. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/initiatives.py +0 -0
  95. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations.py +0 -0
  96. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/apiiro.py +0 -0
  97. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/argocd.py +0 -0
  98. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/azure_active_directory.py +0 -0
  99. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/bamboohr.py +0 -0
  100. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/bitbucket.py +0 -0
  101. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/bugsnag.py +0 -0
  102. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/buildkite.py +0 -0
  103. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/checkmarx_sast.py +0 -0
  104. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/clickup.py +0 -0
  105. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/codecov.py +0 -0
  106. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/dynatrace.py +0 -0
  107. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/firehydrant.py +0 -0
  108. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/github.py +0 -0
  109. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/instana.py +0 -0
  110. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/jenkins.py +0 -0
  111. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/jira.py +0 -0
  112. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/mend_sast.py +0 -0
  113. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/mend_sca.py +0 -0
  114. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/newrelic.py +0 -0
  115. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/okta.py +0 -0
  116. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/opsgenie.py +0 -0
  117. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/rollbar.py +0 -0
  118. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/rootly.py +0 -0
  119. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/semgrep.py +0 -0
  120. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/sentry.py +0 -0
  121. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/servicenow.py +0 -0
  122. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/servicenow_cloud_observability.py +0 -0
  123. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/snyk.py +0 -0
  124. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/splunk_observability_cloud.py +0 -0
  125. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/splunk_on_call.py +0 -0
  126. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/sumologic.py +0 -0
  127. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/veracode.py +0 -0
  128. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/wiz.py +0 -0
  129. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/workday.py +0 -0
  130. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/integrations_commands/xmatters.py +0 -0
  131. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/ip_allowlist.py +0 -0
  132. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/on_call.py +0 -0
  133. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/packages.py +0 -0
  134. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/packages_commands/go.py +0 -0
  135. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/packages_commands/java.py +0 -0
  136. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/packages_commands/node.py +0 -0
  137. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/packages_commands/nuget.py +0 -0
  138. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/packages_commands/python.py +0 -0
  139. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/plugins.py +0 -0
  140. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/queries.py +0 -0
  141. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/rest.py +0 -0
  142. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/scim.py +0 -0
  143. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/scorecards.py +0 -0
  144. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/scorecards_commands/exemptions.py +0 -0
  145. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/secrets.py +0 -0
  146. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/teams.py +0 -0
  147. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/users.py +0 -0
  148. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/users_commands/roles.py +0 -0
  149. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/commands/workflows.py +0 -0
  150. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/models/team.py +0 -0
  151. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/solutions/__init__.py +0 -0
  152. {cortexapps_cli-1.22.0 → cortexapps_cli-1.24.0}/cortexapps_cli/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cortexapps-cli
3
- Version: 1.22.0
3
+ Version: 1.24.0
4
4
  Summary: Command Line Interface for cortexapps
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -65,149 +65,50 @@ class CatalogCommandOptions:
65
65
  typer.Option("--types", "-t", help="Filter the response to specific types of entities. By default, this includes services, resources, and domains. Corresponds to the x-cortex-type field in the Entity Descriptor.", show_default=False)
66
66
  ]
67
67
 
68
- @app.command(name="list")
69
- def catalog_list(
70
- ctx: typer.Context,
71
- include_archived: CatalogCommandOptions.include_archived = False,
72
- hierarchy_depth: CatalogCommandOptions.hierarchy_depth = 'full',
73
- groups: CatalogCommandOptions.groups = None,
74
- owners: CatalogCommandOptions.owners = None,
75
- include_hierarchy_fields: CatalogCommandOptions.include_hierarchy_fields = None,
76
- include_nested_fields: CatalogCommandOptions.include_nested_fields = None,
77
- include_owners: CatalogCommandOptions.include_owners = False,
78
- include_links: CatalogCommandOptions.include_links = False,
79
- include_metadata: CatalogCommandOptions.include_metadata = False,
80
- git_repositories: CatalogCommandOptions.git_repositories = None,
81
- types: CatalogCommandOptions.types = None,
82
- page: ListCommandOptions.page = None,
83
- page_size: ListCommandOptions.page_size = 250,
84
- table_output: ListCommandOptions.table_output = False,
85
- csv_output: ListCommandOptions.csv_output = False,
86
- columns: ListCommandOptions.columns = [],
87
- no_headers: ListCommandOptions.no_headers = False,
88
- filters: ListCommandOptions.filters = [],
89
- sort: ListCommandOptions.sort = [],
90
- _print: CommandOptions._print = True,
91
- ):
92
- """
93
- List entities in the catalog
94
- """
95
- client = ctx.obj["client"]
96
-
97
- if (table_output or csv_output) and not ctx.params.get('columns'):
98
- ctx.params['columns'] = [
99
- "ID=id",
100
- "Tag=tag",
101
- "Name=name",
102
- "Type=type",
103
- "Git Repository=git.repository",
104
- ]
105
-
106
- params = {
107
- "includeArchived": include_archived,
108
- "hierarchyDepth": hierarchy_depth,
109
- "groups": groups,
110
- "owners": owners,
111
- "includeHierarchyFields": include_hierarchy_fields,
112
- "includeNestedFields": include_nested_fields,
113
- "includeOwners": include_owners,
114
- "includeLinks": include_links,
115
- "includeMetadata": include_metadata,
116
- "page": page,
117
- "pageSize": page_size,
118
- "gitRepositories": git_repositories,
119
- "types": types,
120
- }
121
-
122
- # remove any params that are None
123
- params = {k: v for k, v in params.items() if v is not None}
124
-
125
- # for keys that can have multiple values, remove whitespace around comma and split on comma
126
- for key in ['groups', 'owners', 'gitRepositories', 'types']:
127
- if key in params:
128
- params[key] = [x.strip() for x in params[key].split(',')]
129
-
130
- if page is None:
131
- # if page is not specified, we want to fetch all pages
132
- r = client.fetch("api/v1/catalog", params=params)
133
- else:
134
- # if page is specified, we want to fetch only that page
135
- r = client.get("api/v1/catalog", params=params)
136
-
137
- if _print:
138
- data = r
139
- print_output_with_context(ctx, data)
140
- else:
141
- return(r)
142
-
143
68
  @app.command()
144
- def details(
69
+ def archive(
145
70
  ctx: typer.Context,
146
- hierarchy_depth: CatalogCommandOptions.hierarchy_depth = 'full',
147
- include_hierarchy_fields: CatalogCommandOptions.include_hierarchy_fields = None,
148
71
  tag: str = typer.Option(..., "--tag", "-t", help="The tag (x-cortex-tag) or unique, auto-generated identifier for the entity."),
149
- table_output: ListCommandOptions.table_output = False,
150
- csv_output: ListCommandOptions.csv_output = False,
151
- no_headers: ListCommandOptions.no_headers = False,
152
- columns: ListCommandOptions.columns = [],
153
- filters: ListCommandOptions.filters = [],
154
72
  ):
155
73
  """
156
- Get details for a specific entity in the catalog
74
+ Archive an entity
157
75
  """
158
76
  client = ctx.obj["client"]
159
77
 
160
- if table_output and csv_output:
161
- raise typer.BadParameter("Only one of --table and --csv can be specified")
162
-
163
- if (table_output or csv_output) and not ctx.params.get('columns'):
164
- ctx.params['columns'] = [
165
- "ID=id",
166
- "Tag=tag",
167
- "Name=name",
168
- "Type=type",
169
- "Git Repository=git.repository",
170
- ]
171
-
172
- output_format = "table" if table_output else "csv" if csv_output else "json"
173
-
174
- params = {
175
- "hierarchyDepth": hierarchy_depth,
176
- "includeHierarchyFields": include_hierarchy_fields
177
- }
178
-
179
- # remove any params that are None
180
- params = {k: v for k, v in params.items() if v is not None}
181
-
182
- r = client.get("api/v1/catalog/" + tag, params=params)
183
-
184
- data = r if output_format == 'json' else [r]
185
- print_output_with_context(ctx, data)
78
+ r = client.put("api/v1/catalog/" + tag + "/archive")
186
79
 
187
80
  @app.command()
188
- def archive(
81
+ def aws(
189
82
  ctx: typer.Context,
190
83
  tag: str = typer.Option(..., "--tag", "-t", help="The tag (x-cortex-tag) or unique, auto-generated identifier for the entity."),
191
84
  ):
192
85
  """
193
- Archive an entity
86
+ Get AWS resource details for an entity
194
87
  """
195
88
  client = ctx.obj["client"]
196
89
 
197
- r = client.put("api/v1/catalog/" + tag + "/archive")
90
+ r = client.get("api/v1/catalog/" + tag + "/aws")
91
+ print_output_with_context(ctx, r)
198
92
 
199
93
  @app.command()
200
- def unarchive(
94
+ def create(
201
95
  ctx: typer.Context,
202
- tag: str = typer.Option(..., "--tag", "-t", help="The tag (x-cortex-tag) or unique, auto-generated identifier for the entity."),
96
+ file_input: Annotated[typer.FileText, typer.Option("--file", "-f", help=" File containing YAML content of entity; can be passed as stdin with -, example: -f-")] = None,
97
+ dry_run: CatalogCommandOptions.dry_run = False,
98
+ _print: CommandOptions._print = True,
203
99
  ):
204
100
  """
205
- Unarchive an entity
101
+ Create entity
206
102
  """
207
103
  client = ctx.obj["client"]
208
104
 
209
- r = client.put("api/v1/catalog/" + tag + "/unarchive")
210
- print_output_with_context(ctx, r)
105
+ params = {
106
+ "dryRun": dry_run
107
+ }
108
+
109
+ r = client.post("api/v1/open-api", data=file_input.read(), params=params, content_type="application/openapi;charset=UTF-8")
110
+ if _print:
111
+ print_output_with_context(ctx, r)
211
112
 
212
113
  @app.command()
213
114
  def delete(
@@ -239,7 +140,6 @@ def delete_by_type(
239
140
 
240
141
  client.delete("api/v1/catalog", params=params)
241
142
 
242
-
243
143
  @app.command()
244
144
  def descriptor(
245
145
  ctx: typer.Context,
@@ -270,48 +170,166 @@ def descriptor(
270
170
  print_output_with_context(ctx, r)
271
171
 
272
172
  @app.command()
273
- def create(
173
+ def details(
274
174
  ctx: typer.Context,
275
- file_input: Annotated[typer.FileText, typer.Option("--file", "-f", help=" File containing YAML content of entity; can be passed as stdin with -, example: -f-")] = None,
276
- dry_run: CatalogCommandOptions.dry_run = False,
277
- _print: CommandOptions._print = True,
175
+ hierarchy_depth: CatalogCommandOptions.hierarchy_depth = 'full',
176
+ include_hierarchy_fields: CatalogCommandOptions.include_hierarchy_fields = None,
177
+ tag: str = typer.Option(..., "--tag", "-t", help="The tag (x-cortex-tag) or unique, auto-generated identifier for the entity."),
178
+ table_output: ListCommandOptions.table_output = False,
179
+ csv_output: ListCommandOptions.csv_output = False,
180
+ no_headers: ListCommandOptions.no_headers = False,
181
+ columns: ListCommandOptions.columns = [],
182
+ filters: ListCommandOptions.filters = [],
278
183
  ):
279
184
  """
280
- Create entity
185
+ Get details for a specific entity in the catalog
281
186
  """
282
187
  client = ctx.obj["client"]
283
188
 
189
+ if table_output and csv_output:
190
+ raise typer.BadParameter("Only one of --table and --csv can be specified")
191
+
192
+ if (table_output or csv_output) and not ctx.params.get('columns'):
193
+ ctx.params['columns'] = [
194
+ "ID=id",
195
+ "Tag=tag",
196
+ "Name=name",
197
+ "Type=type",
198
+ "Git Repository=git.repository",
199
+ ]
200
+
201
+ output_format = "table" if table_output else "csv" if csv_output else "json"
202
+
284
203
  params = {
285
- "dryRun": dry_run
204
+ "hierarchyDepth": hierarchy_depth,
205
+ "includeHierarchyFields": include_hierarchy_fields
286
206
  }
287
207
 
288
- r = client.post("api/v1/open-api", data=file_input.read(), params=params, content_type="application/openapi;charset=UTF-8")
289
- if _print:
290
- print_output_with_context(ctx, r)
208
+ # remove any params that are None
209
+ params = {k: v for k, v in params.items() if v is not None}
210
+
211
+ r = client.get("api/v1/catalog/" + tag, params=params)
212
+
213
+ data = r if output_format == 'json' else [r]
214
+ print_output_with_context(ctx, data)
291
215
 
292
216
  @app.command()
293
- def patch(
217
+ def gitops_log(
294
218
  ctx: typer.Context,
295
- file_input: Annotated[typer.FileText, typer.Option(..., "--file", "-f", help=" File containing YAML content of entity; can be passed as stdin with -, example: -f-")] = None,
296
- delete_marker_value = typer.Option("__delete__", "--delete-marker-value", "-dmv", help="Delete keys with this value from the merged yaml, defaults to __delete__, if any values match this, they will not be included in merged YAML. For example my_value: __delete__ will remove my_value from the merged YAML."),
297
- dry_run: CatalogCommandOptions.dry_run = False,
298
- append_arrays: CatalogCommandOptions.append_arrays = False,
299
- fail_if_not_exist: CatalogCommandOptions.fail_if_not_exist = False,
219
+ tag: str = typer.Option(..., "--tag", "-t", help="The tag (x-cortex-tag) or unique, auto-generated identifier for the entity."),
300
220
  ):
301
221
  """
302
- Creates or updates an entity. If the YAML refers to an entity that already exists (as referenced by the x-cortex-tag), this API will merge the specified changes into the existing entity
222
+ Retrieve most recent GitOps log for entity
223
+ """
224
+ client = ctx.obj["client"]
225
+
226
+ r = client.get("api/v1/catalog/" + tag + "/gitops-logs")
227
+ print_output_with_context(ctx, r)
228
+
229
+ @app.command()
230
+ def k8s(
231
+ ctx: typer.Context,
232
+ tag: str = typer.Option(..., "--tag", "-t", help="The tag (x-cortex-tag) or unique, auto-generated identifier for the entity."),
233
+ table_output: ListCommandOptions.table_output = False,
234
+ csv_output: ListCommandOptions.csv_output = False,
235
+ no_headers: ListCommandOptions.no_headers = False,
236
+ columns: ListCommandOptions.columns = [],
237
+ filters: ListCommandOptions.filters = [],
238
+ ):
239
+ """
240
+ Get Kubernetes resource details for an entity
241
+ """
242
+ client = ctx.obj["client"]
243
+
244
+ if table_output and csv_output:
245
+ raise typer.BadParameter("Only one of --table and --csv can be specified")
246
+
247
+ if (table_output or csv_output) and not ctx.params.get('columns'):
248
+ ctx.params['columns'] = [
249
+ "Namespace=namespace",
250
+ "Name=name",
251
+ "Cluster=cluster",
252
+ "Type=type",
253
+ "Last Updated=lastUpdated",
254
+ ]
255
+
256
+ r = client.get("api/v1/catalog/" + tag + "/k8s")
257
+ print_output_with_context(ctx, r)
258
+
259
+ @app.command(name="list")
260
+ def catalog_list(
261
+ ctx: typer.Context,
262
+ include_archived: CatalogCommandOptions.include_archived = False,
263
+ hierarchy_depth: CatalogCommandOptions.hierarchy_depth = 'full',
264
+ groups: CatalogCommandOptions.groups = None,
265
+ owners: CatalogCommandOptions.owners = None,
266
+ include_hierarchy_fields: CatalogCommandOptions.include_hierarchy_fields = None,
267
+ include_nested_fields: CatalogCommandOptions.include_nested_fields = None,
268
+ include_owners: CatalogCommandOptions.include_owners = False,
269
+ include_links: CatalogCommandOptions.include_links = False,
270
+ include_metadata: CatalogCommandOptions.include_metadata = False,
271
+ git_repositories: CatalogCommandOptions.git_repositories = None,
272
+ types: CatalogCommandOptions.types = None,
273
+ page: ListCommandOptions.page = None,
274
+ page_size: ListCommandOptions.page_size = 250,
275
+ table_output: ListCommandOptions.table_output = False,
276
+ csv_output: ListCommandOptions.csv_output = False,
277
+ columns: ListCommandOptions.columns = [],
278
+ no_headers: ListCommandOptions.no_headers = False,
279
+ filters: ListCommandOptions.filters = [],
280
+ sort: ListCommandOptions.sort = [],
281
+ _print: CommandOptions._print = True,
282
+ ):
283
+ """
284
+ List entities in the catalog
303
285
  """
304
286
  client = ctx.obj["client"]
305
287
 
288
+ if (table_output or csv_output) and not ctx.params.get('columns'):
289
+ ctx.params['columns'] = [
290
+ "ID=id",
291
+ "Tag=tag",
292
+ "Name=name",
293
+ "Type=type",
294
+ "Git Repository=git.repository",
295
+ ]
296
+
306
297
  params = {
307
- "dryRun":dry_run,
308
- "appendArrays": append_arrays,
309
- "deleteMarkerValue": delete_marker_value,
310
- "failIfEntityDoesNotExist": fail_if_not_exist
298
+ "includeArchived": include_archived,
299
+ "hierarchyDepth": hierarchy_depth,
300
+ "groups": groups,
301
+ "owners": owners,
302
+ "includeHierarchyFields": include_hierarchy_fields,
303
+ "includeNestedFields": include_nested_fields,
304
+ "includeOwners": include_owners,
305
+ "includeLinks": include_links,
306
+ "includeMetadata": include_metadata,
307
+ "page": page,
308
+ "pageSize": page_size,
309
+ "gitRepositories": git_repositories,
310
+ "types": types,
311
311
  }
312
312
 
313
- r = client.patch("api/v1/open-api", data=file_input.read(), params=params, content_type="application/openapi;charset=UTF-8")
314
- print_output_with_context(ctx, r)
313
+ # remove any params that are None
314
+ params = {k: v for k, v in params.items() if v is not None}
315
+
316
+ # for keys that can have multiple values, remove whitespace around comma and split on comma
317
+ for key in ['groups', 'owners', 'gitRepositories', 'types']:
318
+ if key in params:
319
+ params[key] = [x.strip() for x in params[key].split(',')]
320
+
321
+ if page is None:
322
+ # if page is not specified, we want to fetch all pages
323
+ r = client.fetch("api/v1/catalog", params=params)
324
+ else:
325
+ # if page is specified, we want to fetch only that page
326
+ r = client.get("api/v1/catalog", params=params)
327
+
328
+ if _print:
329
+ data = r
330
+ print_output_with_context(ctx, data)
331
+ else:
332
+ return(r)
315
333
 
316
334
  @app.command()
317
335
  def list_descriptors(
@@ -339,16 +357,27 @@ def list_descriptors(
339
357
  return(r)
340
358
 
341
359
  @app.command()
342
- def gitops_log(
360
+ def patch(
343
361
  ctx: typer.Context,
344
- tag: str = typer.Option(..., "--tag", "-t", help="The tag (x-cortex-tag) or unique, auto-generated identifier for the entity."),
362
+ file_input: Annotated[typer.FileText, typer.Option(..., "--file", "-f", help=" File containing YAML content of entity; can be passed as stdin with -, example: -f-")] = None,
363
+ delete_marker_value = typer.Option("__delete__", "--delete-marker-value", "-dmv", help="Delete keys with this value from the merged yaml, defaults to __delete__, if any values match this, they will not be included in merged YAML. For example my_value: __delete__ will remove my_value from the merged YAML."),
364
+ dry_run: CatalogCommandOptions.dry_run = False,
365
+ append_arrays: CatalogCommandOptions.append_arrays = False,
366
+ fail_if_not_exist: CatalogCommandOptions.fail_if_not_exist = False,
345
367
  ):
346
368
  """
347
- Retrieve most recent GitOps log for entity
369
+ Creates or updates an entity. If the YAML refers to an entity that already exists (as referenced by the x-cortex-tag), this API will merge the specified changes into the existing entity
348
370
  """
349
371
  client = ctx.obj["client"]
350
372
 
351
- r = client.get("api/v1/catalog/" + tag + "/gitops-logs")
373
+ params = {
374
+ "dryRun":dry_run,
375
+ "appendArrays": append_arrays,
376
+ "deleteMarkerValue": delete_marker_value,
377
+ "failIfEntityDoesNotExist": fail_if_not_exist
378
+ }
379
+
380
+ r = client.patch("api/v1/open-api", data=file_input.read(), params=params, content_type="application/openapi;charset=UTF-8")
352
381
  print_output_with_context(ctx, r)
353
382
 
354
383
  @app.command()
@@ -363,3 +392,16 @@ def scorecard_scores(
363
392
 
364
393
  r = client.get("api/v1/catalog/" + tag + "/scorecards")
365
394
  print_output_with_context(ctx, r)
395
+
396
+ @app.command()
397
+ def unarchive(
398
+ ctx: typer.Context,
399
+ tag: str = typer.Option(..., "--tag", "-t", help="The tag (x-cortex-tag) or unique, auto-generated identifier for the entity."),
400
+ ):
401
+ """
402
+ Unarchive an entity
403
+ """
404
+ client = ctx.obj["client"]
405
+
406
+ r = client.put("api/v1/catalog/" + tag + "/unarchive")
407
+ print_output_with_context(ctx, r)
@@ -146,7 +146,7 @@ def validate(
146
146
 
147
147
  client = ctx.obj["client"]
148
148
 
149
- r = client.post("api/v1/aws/configurations/validate" + accountId)
149
+ r = client.post("api/v1/aws/configurations/validate/" + accountId)
150
150
  print_json(data=r)
151
151
 
152
152
  @app.command()
@@ -159,7 +159,7 @@ def validate_all(
159
159
 
160
160
  client = ctx.obj["client"]
161
161
 
162
- r = client.post("api/v1/aws/configurations")
162
+ r = client.post("api/v1/aws/configurations/all/validate")
163
163
  print_json(data=r)
164
164
 
165
165
  @app.command()
@@ -157,7 +157,7 @@ def validate(
157
157
 
158
158
  client = ctx.obj["client"]
159
159
 
160
- r = client.post("api/v1/azure-devops/configurations/validate" + alias)
160
+ r = client.post("api/v1/azure-devops/configuration/validate/" + alias)
161
161
  print_json(data=r)
162
162
 
163
163
  @app.command()
@@ -170,5 +170,5 @@ def validate_all(
170
170
 
171
171
  client = ctx.obj["client"]
172
172
 
173
- r = client.post("api/v1/azure-devops/configurations")
173
+ r = client.post("api/v1/azure-devops/configuration/validate")
174
174
  print_json(data=r)
@@ -183,7 +183,7 @@ def validate(
183
183
 
184
184
  client = ctx.obj["client"]
185
185
 
186
- r = client.post("api/v1/azure-resources/configurations/validate" + alias)
186
+ r = client.post("api/v1/azure-resources/configuration/validate/" + alias)
187
187
  print_json(data=r)
188
188
 
189
189
  @app.command()
@@ -196,7 +196,7 @@ def validate_all(
196
196
 
197
197
  client = ctx.obj["client"]
198
198
 
199
- r = client.post("api/v1/azure-resources/configurations")
199
+ r = client.post("api/v1/azure-resources/configuration/validate")
200
200
  print_json(data=r)
201
201
 
202
202
  @app.command()
@@ -153,7 +153,7 @@ def validate(
153
153
 
154
154
  client = ctx.obj["client"]
155
155
 
156
- r = client.post("api/v1/circleci/configurations/validate" + alias)
156
+ r = client.post("api/v1/circleci/configuration/validate/" + alias)
157
157
  print_json(data=r)
158
158
 
159
159
  @app.command()
@@ -166,5 +166,5 @@ def validate_all(
166
166
 
167
167
  client = ctx.obj["client"]
168
168
 
169
- r = client.post("api/v1/circleci/configurations")
169
+ r = client.post("api/v1/circleci/configuration/validate")
170
170
  print_json(data=r)
@@ -162,7 +162,7 @@ def validate(
162
162
 
163
163
  client = ctx.obj["client"]
164
164
 
165
- r = client.post("api/v1/coralogix/configurations/validate" + alias)
165
+ r = client.post("api/v1/coralogix/configuration/validate/" + alias)
166
166
  print_json(data=r)
167
167
 
168
168
  @app.command()
@@ -175,5 +175,5 @@ def validate_all(
175
175
 
176
176
  client = ctx.obj["client"]
177
177
 
178
- r = client.post("api/v1/coralogix/configurations")
178
+ r = client.post("api/v1/coralogix/configuration/validate")
179
179
  print_json(data=r)
@@ -161,7 +161,7 @@ def validate(
161
161
 
162
162
  client = ctx.obj["client"]
163
163
 
164
- r = client.post("api/v1/datadog/configurations/validate" + alias)
164
+ r = client.post("api/v1/datadog/configuration/validate/" + alias)
165
165
  print_json(data=r)
166
166
 
167
167
  @app.command()
@@ -174,5 +174,5 @@ def validate_all(
174
174
 
175
175
  client = ctx.obj["client"]
176
176
 
177
- r = client.post("api/v1/datadog/configurations")
177
+ r = client.post("api/v1/datadog/configuration/validate")
178
178
  print_json(data=r)
@@ -153,7 +153,7 @@ def validate(
153
153
 
154
154
  client = ctx.obj["client"]
155
155
 
156
- r = client.post("api/v1/gitlab/configurations/validate" + alias)
156
+ r = client.post("api/v1/gitlab/configuration/validate/" + alias)
157
157
  print_json(data=r)
158
158
 
159
159
  @app.command()
@@ -166,5 +166,5 @@ def validate_all(
166
166
 
167
167
  client = ctx.obj["client"]
168
168
 
169
- r = client.post("api/v1/gitlab/configurations")
169
+ r = client.post("api/v1/gitlab/configuration/validate")
170
170
  print_json(data=r)
@@ -153,7 +153,7 @@ def validate(
153
153
 
154
154
  client = ctx.obj["client"]
155
155
 
156
- r = client.post("api/v1/incidentio/configurations/validate" + alias)
156
+ r = client.post("api/v1/incidentio/configuration/validate/" + alias)
157
157
  print_json(data=r)
158
158
 
159
159
  @app.command()
@@ -166,5 +166,5 @@ def validate_all(
166
166
 
167
167
  client = ctx.obj["client"]
168
168
 
169
- r = client.post("api/v1/incidentio/configurations")
169
+ r = client.post("api/v1/incidentio/configuration/validate")
170
170
  print_json(data=r)
@@ -153,7 +153,7 @@ def validate(
153
153
 
154
154
  client = ctx.obj["client"]
155
155
 
156
- r = client.post("api/v1/launchdarkly/configurations/validate" + alias)
156
+ r = client.post("api/v1/launchdarkly/configuration/validate/" + alias)
157
157
  print_json(data=r)
158
158
 
159
159
  @app.command()
@@ -166,5 +166,5 @@ def validate_all(
166
166
 
167
167
  client = ctx.obj["client"]
168
168
 
169
- r = client.post("api/v1/launchdarkly/configurations")
169
+ r = client.post("api/v1/launchdarkly/configuration/validate")
170
170
  print_json(data=r)
@@ -153,7 +153,7 @@ def validate(
153
153
 
154
154
  client = ctx.obj["client"]
155
155
 
156
- r = client.post("api/v1/pagerduty/configurations/validate" + alias)
156
+ r = client.post("api/v1/pagerduty/configuration/validate/" + alias)
157
157
  print_json(data=r)
158
158
 
159
159
  @app.command()
@@ -166,5 +166,5 @@ def validate_all(
166
166
 
167
167
  client = ctx.obj["client"]
168
168
 
169
- r = client.post("api/v1/pagerduty/configurations")
169
+ r = client.post("api/v1/pagerduty/configuration/validate")
170
170
  print_json(data=r)
@@ -159,7 +159,7 @@ def validate(
159
159
 
160
160
  client = ctx.obj["client"]
161
161
 
162
- r = client.post("api/v1/prometheus/configurations/validate" + alias)
162
+ r = client.post("api/v1/prometheus/configuration/validate/" + alias)
163
163
  print_json(data=r)
164
164
 
165
165
  @app.command()
@@ -172,5 +172,5 @@ def validate_all(
172
172
 
173
173
  client = ctx.obj["client"]
174
174
 
175
- r = client.post("api/v1/prometheus/configurations")
175
+ r = client.post("api/v1/prometheus/configuration/validate")
176
176
  print_json(data=r)
@@ -153,7 +153,7 @@ def validate(
153
153
 
154
154
  client = ctx.obj["client"]
155
155
 
156
- r = client.post("api/v1/sonarqube/configurations/validate" + alias)
156
+ r = client.post("api/v1/sonarqube/configuration/validate/" + alias)
157
157
  print_json(data=r)
158
158
 
159
159
  @app.command()
@@ -166,5 +166,5 @@ def validate_all(
166
166
 
167
167
  client = ctx.obj["client"]
168
168
 
169
- r = client.post("api/v1/sonarqube/configurations")
169
+ r = client.post("api/v1/sonarqube/configuration/validate")
170
170
  print_json(data=r)