Skip to content

Commit 277a656

Browse files
mandyhtHamadaGabrIbrahimharshkumar-devKanvipasrichalealex262
committed
Releasing version 3.15.0
Co-authored-by: Hamada Ibrahim <[email protected]> Co-authored-by: Harsh Kumar <[email protected]> Co-authored-by: Kanvi Pasricha <[email protected]> Co-authored-by: Alex Le <[email protected]> Co-authored-by: Nupur Gupta <[email protected]> Co-authored-by: Karthik Kamath <[email protected]>
1 parent acbb4b9 commit 277a656

File tree

69 files changed

+5861
-121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+5861
-121
lines changed

CHANGELOG.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,44 @@ All notable changes to this project will be documented in this file.
66

77
The format is based on `Keep a Changelog <http://keepachangelog.com/>`__.
88

9+
3.15.0 - 2022-08-16
10+
--------------------
11+
Added
12+
~~~~~
13+
* Support for debug reports and analysis in Service Mesh service
14+
15+
* ``oci service-mesh debug report``
16+
17+
* Support for Logging Analytics as a target for Streaming Source feature for Service Connector Hub in the Logging service
18+
19+
* ``oci logging analytics target``
20+
21+
* Support for streaming Application logs to Logging Service in the Data Flow Service
22+
23+
* ``oci data-flow run create --application-log-config``
24+
* ``oci data-flow application create --application-log-config``
25+
* ``oci data-flow application update --application-log-config``
26+
* ``oci data-flow run submit --application-log-config``
27+
28+
* Support for the below commands in the Cloud Guard service
29+
30+
* ``oci cloud-guard data-source``
31+
* ``oci cloud-guard detector-recipe-detector-rule``
32+
* ``oci cloud-guard problem list-problem-entities``
33+
* ``oci cloud-guard work-request``
34+
* ``oci cloud-guard work-request-error``
35+
* ``oci cloud-guard work-request-log-entry``
36+
37+
Changed
38+
~~~~~
39+
* The parameter --source-detector-recipe-id is now optional in the below command in the Cloud Guard service
40+
41+
* ``oci cloud-guard detector-recipe create``
42+
43+
Fixed
44+
~~~~~
45+
* [BREAKING] The command ``oci logging-search search-result search-logs`` has been changed back to be ``oci logging-search search-logs``
46+
947
3.14.0 - 2022-08-09
1048
--------------------
1149
Added

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Jinja2==3.0.3
1414
jmespath==0.10.0
1515
ndg-httpsclient==0.4.2
1616
mock==2.0.0
17-
oci==2.78.0
17+
oci==2.79.0
1818
packaging==20.2
1919
pluggy==0.13.0
2020
py==1.10.0

services/cloud_guard/src/oci_cli_cloud_guard/generated/cloudguard_cli.py

Lines changed: 1082 additions & 9 deletions
Large diffs are not rendered by default.

services/data_flow/src/oci_cli_data_flow/generated/dataflow_cli.py

Lines changed: 24 additions & 12 deletions
Large diffs are not rendered by default.

services/data_science/src/oci_cli_data_science/generated/datascience_cli.py

Lines changed: 28 additions & 12 deletions
Large diffs are not rendered by default.

services/dts/tests/unit/test_physical_appliance.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ def _create_and_write_cert(cert_file):
174174
f.write(ssl_cert)
175175
return cert.digest("md5")
176176

177+
@unittest.skip("skipped to prevent comment on tickets")
177178
def test_init_auth_valid_cert_fingerprint(self):
178179
# Mock only the fetch_cert() method of the cert_manager
179180
auth_spec = self._get_test_auth_spec(self._get_config_manager(), "1.2.3.4", 443)
@@ -186,6 +187,7 @@ def test_init_auth_valid_cert_fingerprint(self):
186187
self._test_init_auth(auth_spec, validate_cert_manager_calls=False, cert_fingerprint=cert_fingerprint)
187188
self._validate_init_auth(auth_spec)
188189

190+
@unittest.skip("skipped to prevent comment on tickets")
189191
def test_init_auth_invalid_cert_fingerprint(self):
190192
with self.assertRaises(exceptions.RequestException):
191193
# Mock only the fetch_cert() method of the cert_manager
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# coding: utf-8
2+
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
3+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4+
5+
from services.loggingsearch.src.oci_cli_log_search.generated import logsearch_cli
6+
7+
# oci loggingsearch search-result search-logs -> oci loggingsearch search-logs
8+
logsearch_cli.logging_search_root_group.commands.pop(logsearch_cli.search_result_group.name)
9+
logsearch_cli.logging_search_root_group.add_command(logsearch_cli.search_logs)

services/sch/src/oci_cli_service_connector/generated/serviceconnector_cli.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,7 @@ def create_service_connector_functions_target_details(ctx, from_json, wait_for_s
859859
This option is a JSON list with items of type TaskDetails. For documentation on TaskDetails please see our API reference: https://docs.cloud.oracle.com/api/#/en/serviceconnector/20200909/datatypes/TaskDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
860860
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
861861
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
862+
@cli_util.option('--target-log-source-identifier', help=u"""Identifier of the log source that you want to use for processing data received from the service connector source. Applies to `StreamingSource` only. Equivalent to `name` at [LogAnalyticsSource].""")
862863
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
863864
@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
864865
@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request to see if it has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
@@ -867,7 +868,7 @@ def create_service_connector_functions_target_details(ctx, from_json, wait_for_s
867868
@click.pass_context
868869
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'source': {'module': 'sch', 'class': 'SourceDetails'}, 'tasks': {'module': 'sch', 'class': 'list[TaskDetails]'}, 'freeform-tags': {'module': 'sch', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'sch', 'class': 'dict(str, dict(str, object))'}})
869870
@cli_util.wrap_exceptions
870-
def create_service_connector_logging_analytics_target_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, source, target_log_group_id, description, tasks, freeform_tags, defined_tags):
871+
def create_service_connector_logging_analytics_target_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, source, target_log_group_id, description, tasks, freeform_tags, defined_tags, target_log_source_identifier):
871872

872873
kwargs = {}
873874
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -891,6 +892,9 @@ def create_service_connector_logging_analytics_target_details(ctx, from_json, wa
891892
if defined_tags is not None:
892893
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
893894

895+
if target_log_source_identifier is not None:
896+
_details['target']['logSourceIdentifier'] = target_log_source_identifier
897+
894898
_details['target']['kind'] = 'loggingAnalytics'
895899

896900
client = cli_util.build_client('sch', 'service_connector', ctx)
@@ -2166,6 +2170,7 @@ def update_service_connector_functions_target_details(ctx, from_json, force, wai
21662170
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
21672171
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
21682172
@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
2173+
@cli_util.option('--target-log-source-identifier', help=u"""Identifier of the log source that you want to use for processing data received from the service connector source. Applies to `StreamingSource` only. Equivalent to `name` at [LogAnalyticsSource].""")
21692174
@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
21702175
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
21712176
@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
@@ -2175,7 +2180,7 @@ def update_service_connector_functions_target_details(ctx, from_json, force, wai
21752180
@click.pass_context
21762181
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'source': {'module': 'sch', 'class': 'SourceDetails'}, 'tasks': {'module': 'sch', 'class': 'list[TaskDetails]'}, 'freeform-tags': {'module': 'sch', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'sch', 'class': 'dict(str, dict(str, object))'}})
21772182
@cli_util.wrap_exceptions
2178-
def update_service_connector_logging_analytics_target_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, service_connector_id, target_log_group_id, display_name, description, source, tasks, freeform_tags, defined_tags, if_match):
2183+
def update_service_connector_logging_analytics_target_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, service_connector_id, target_log_group_id, display_name, description, source, tasks, freeform_tags, defined_tags, if_match, target_log_source_identifier):
21792184

21802185
if isinstance(service_connector_id, six.string_types) and len(service_connector_id.strip()) == 0:
21812186
raise click.UsageError('Parameter --service-connector-id cannot be whitespace or empty string')
@@ -2211,6 +2216,9 @@ def update_service_connector_logging_analytics_target_details(ctx, from_json, fo
22112216
if defined_tags is not None:
22122217
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
22132218

2219+
if target_log_source_identifier is not None:
2220+
_details['target']['logSourceIdentifier'] = target_log_source_identifier
2221+
22142222
_details['target']['kind'] = 'loggingAnalytics'
22152223

22162224
client = cli_util.build_client('sch', 'service_connector', ctx)
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# coding: utf-8
2+
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
3+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4+
import os.path
5+
import sys
6+
7+
import click
8+
from oci_cli import cli_util
9+
from oci_cli.aliasing import CommandGroupWithAlias
10+
11+
from services.service_mesh.src.oci_cli_service_mesh.generated import servicemesh_cli
12+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.bundle_analyser import BundleAnalyser
13+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.report_orchestrator \
14+
import ReportOrchestrator
15+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.utils.bundle_helper import BundleHelper
16+
17+
18+
@click.command(cli_util.override('service_mesh.debug_group.command_name', 'debug'), cls=CommandGroupWithAlias,
19+
help="""Debug enables customers to troubleshoot service-mesh resources.""")
20+
@cli_util.help_option_group
21+
def debug_group():
22+
pass
23+
24+
25+
# oci service-mesh debug
26+
servicemesh_cli.service_mesh_root_group.add_command(debug_group)
27+
28+
29+
# oci service-mesh debug report
30+
# oci service-mesh debug report --resource-id <ocid>
31+
# oci service-mesh debug report --resource-id <ocid> --k8s-context <path_to_config_file>
32+
@debug_group.command(name=cli_util.override('service_mesh.report.command_name', 'report'),
33+
help=u"""Generates report to troubleshoot Service Mesh resources and setup.""")
34+
@cli_util.option('--resource-id', required=False, help=u"""The [OCID] of the service-mesh resource.""")
35+
@cli_util.option('--kubeconfig', required=False, help=u"""The filepath of the config file containing the kubernetes config of the Kubernetes Cluster. If not specified default config file will be applied.""")
36+
@cli_util.option('--context', required=False, help=u"""Context to be used in the kube config file. If not specified, the current-context is used by default.""")
37+
@cli_util.option('--thread-pool-size', required=False, help=u"""The Size of thread pool to execute the command""")
38+
@cli_util.help_option
39+
@click.pass_context
40+
@cli_util.wrap_exceptions
41+
def generate_mesh(ctx, resource_id, kubeconfig, context, thread_pool_size):
42+
try:
43+
report_orchestrator = ReportOrchestrator(resource_id, kubeconfig, context, thread_pool_size)
44+
result = report_orchestrator.build_report()
45+
if result is not None:
46+
click.echo(result, file=sys.stderr)
47+
else:
48+
click.echo('Report generation successful.', file=sys.stdout)
49+
bundle_file_path = os.path.join(BundleHelper.get_home_directory(), BundleHelper.get_bundle_name())
50+
# click.echo - Bundle file path
51+
click.echo('\nBundle file path: {}'.format(bundle_file_path))
52+
# call Analyser
53+
bundle_analyzer = BundleAnalyser(bundle_file_path=bundle_file_path)
54+
analyze = bundle_analyzer.analyze()
55+
except Exception as e:
56+
click.echo('Report generation unsuccessful. Some problem occurred during report generation. {}'.format(e),
57+
file=sys.stderr)
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# coding: utf-8
2+
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
3+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.aggregators.aggregation_orchestrator import \
5+
AggregationOrchestrator, ReportData
6+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.event import Event, EventType, \
7+
OperationType
8+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.task_orchestrator import TaskOrchestrator
9+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.task_request import TaskRequestType, \
10+
TaskConfiguration, MeshReportTaskRequest, ResourceTaskRequest, PodTaskRequest, TaskRequest, VdbTaskRequest, \
11+
IgdTaskRequest, NamespacesTaskRequest, FileTaskRequest, MeshResourcesTaskRequest, CommonTaskRequest, CsvTaskRequest, \
12+
ObservabilityTaskRequest, ValidateCrdsTaskRequest, WebhooksTaskRequest
13+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.tasks.observability_worker import \
14+
ObservabilityTask
15+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.tasks.webhooks_worker import WebhooksTask
16+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.utils.kubectl_command_helper import \
17+
KubeCommandHelper
18+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.utils.summary import BasicPodSummary, \
19+
MeshData, PodSummary, CustomResourceSummary, MeshResources
20+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.tasks.common_worker import CommonTask
21+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.tasks.csv_worker import CsvTask
22+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.tasks.file_worker import FileTask
23+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.tasks.igd_worker import IgdTask
24+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.tasks.mesh_report_worker import \
25+
MeshReportTask
26+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.tasks.mesh_resources_worker import \
27+
MeshResourcesTask
28+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.tasks.namespaces_worker import \
29+
NamespacesTask
30+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.tasks.pod_worker import PodTask
31+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.tasks.resource_worker import \
32+
ResourceTask
33+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.tasks.task_worker import MeshTask
34+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.tasks.vdb_worker import VdbTask
35+
from services.service_mesh.src.oci_cli_service_mesh.service_mesh_troubleshoot.tasks.validate_crds_worker import ValidateCrdsTask
36+
37+
__all__ = ["AggregationOrchestrator",
38+
"ReportData",
39+
"KubeCommandHelper",
40+
"BasicPodSummary",
41+
"MeshData",
42+
"PodSummary",
43+
"CustomResourceSummary",
44+
"MeshResources",
45+
"CommonTask",
46+
"CsvTask",
47+
"FileTask",
48+
"IgdTask",
49+
"MeshReportTask",
50+
"MeshResourcesTask",
51+
"NamespacesTask",
52+
"PodTask",
53+
"ResourceTask",
54+
"MeshTask",
55+
"VdbTask",
56+
"Event",
57+
"OperationType",
58+
"EventType",
59+
"TaskOrchestrator",
60+
"TaskRequestType",
61+
"TaskConfiguration",
62+
"TaskRequest",
63+
"PodTaskRequest",
64+
"ResourceTaskRequest",
65+
"MeshReportTaskRequest",
66+
"VdbTaskRequest",
67+
"IgdTaskRequest",
68+
"NamespacesTaskRequest",
69+
"FileTaskRequest",
70+
"CsvTaskRequest",
71+
"MeshResourcesTaskRequest",
72+
"CommonTaskRequest",
73+
"ObservabilityTask",
74+
"ObservabilityTaskRequest",
75+
"WebhooksTask",
76+
"WebhooksTaskRequest",
77+
"ValidateCrdsTask",
78+
"ValidateCrdsTaskRequest",
79+
"BundleAnalyser"
80+
]

0 commit comments

Comments
 (0)