Skip to content

Commit cf4faf3

Browse files
mandyhtHamadaGabrIbrahimharshkumar-devKanvipasrichalealex262
committed
Releasing version 3.18.1
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]> Co-authored-by: Mandy Tsai <[email protected]>
1 parent a92e87c commit cf4faf3

File tree

9 files changed

+188
-28
lines changed

9 files changed

+188
-28
lines changed

CHANGELOG.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,39 @@ 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.18.1 - 2022-10-04
10+
--------------------
11+
Added
12+
~~~~~~~~
13+
14+
* Bastion support for target host identification and enabled SOCKS support for dynamic port forwarding sessions
15+
16+
* ``oci bastion``
17+
18+
* Operations Insights service
19+
20+
* Support for creating Enterprise Manager-based Windows host targets for ``--platform-type``
21+
22+
* ``oci opsi host-insights list --platform-type``
23+
24+
* Support for creating Management Agent Cloud Service-based Windows and Solaris hosts targets for ``--platform-type``
25+
26+
* ``oci opsi host-insights list --platform-type``
27+
28+
* Support for Host Top Process allowing users to locate top processes running at a particular point in time
29+
30+
* ``oci opsi host-insights summarize-top-processes-usage --compartment-id --id --resource-metric --timestamp --analysis-time-interval``
31+
32+
* Support for Host Top Process allowing users to filter by a single process in order to trend this process over time
33+
34+
* ``oci opsi host-insights summarize-top-processes-usage --compartment-id --id --resource-metric --timestamp --analysis-time-interval``
35+
36+
* Cloud-Bridge Service
37+
38+
* Support for check to require ``--vcenter-endpoint`` and ``--discovery-credentials`` parameters if asset source is VMWARE for ``--type``
39+
40+
* ``oci cloud-bridge discovery asset-source create --type VMWARE``
41+
942
3.18.0 - 2022-09-27
1043
--------------------
1144

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.84.0
17+
oci==2.85.0
1818
packaging==20.2
1919
pluggy==0.13.0
2020
py==1.10.0

services/bastion/src/oci_cli_bastion/generated/bastion_cli.py

Lines changed: 85 additions & 11 deletions
Large diffs are not rendered by default.

services/cloud_bridge/src/oci_cli_discovery/discovery_cli_extended.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ def create_asset_source(ctx, from_json, wait_for_state, max_wait_seconds, wait_i
8787
if system_tags is not None:
8888
_details['systemTags'] = cli_util.parse_json_parameter("system_tags", system_tags)
8989

90+
if type.lower() == 'vmware':
91+
if discovery_credentials is None or vcenter_endpoint is None:
92+
raise click.UsageError('If parameter --type is VMWARE, then parameters --discovery-credentials and --vcenter-endpoint must be provided')
93+
9094
client = cli_util.build_client('cloud_bridge', 'discovery', ctx)
9195
result = client.create_asset_source(
9296
create_asset_source_details=_details,

services/opsi/src/oci_cli_operations_insights/generated/operationsinsights_cli.py

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

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def open_relative(*path):
2929
readme = f.read()
3030

3131
requires = [
32-
'oci==2.84.0',
32+
'oci==2.85.0',
3333
'arrow>=1.0.0',
3434
'certifi',
3535
'click==7.1.2',

src/oci_cli/cli_util.py

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,22 @@
102102

103103
OCI_CLI_IN_INTERACTIVE_MODE = "OCI_CLI_IN_INTERACTIVE_MODE"
104104

105+
OCI_CLI_CLOUD_SHELL = "OCI_CLI_CLOUD_SHELL"
106+
107+
OCI_CLI_CONTAINER_IMAGE = "IMAGE_VERSION"
108+
109+
ADDITIONAL_USER_AGENT = "additional_user_agent"
110+
111+
ORACLE_PYTHON_VER = "Oracle-PythonCLI/{}"
112+
113+
OCI_CLI_INTERACTIVE_USER_AGENT = " Oracle-Interactive "
114+
115+
OCI_CLI_INTERACTIVE_CLOUDSHELL_USER_AGENT = " Oracle-Interactive-CloudShell "
116+
117+
OCI_CLI_CONTAINER_IMAGE_USER_AGENT = " Oracle-Container-Image "
118+
119+
OCI_CLI_INTERACTIVE_CONTAINER_IMAGE_USER_AGENT = " Oracle-Interactive-Container-Image "
120+
105121
logger = logging.getLogger("{}".format(__name__))
106122
logger.addHandler(logging.NullHandler())
107123
logger.setLevel(logging.DEBUG)
@@ -366,9 +382,19 @@ def create_config_and_signer_based_on_click_context(ctx):
366382
sys.exit(0)
367383
else:
368384
sys.exit(1)
369-
client_config["additional_user_agent"] = 'Oracle-PythonCLI/{}'.format(__version__)
385+
client_config[ADDITIONAL_USER_AGENT] = ORACLE_PYTHON_VER.format(__version__)
370386
if OCI_CLI_IN_INTERACTIVE_MODE in os.environ:
371-
client_config["additional_user_agent"] += " Oracle-Interactive "
387+
client_config[ADDITIONAL_USER_AGENT] += OCI_CLI_INTERACTIVE_USER_AGENT
388+
389+
if OCI_CLI_CLOUD_SHELL in os.environ:
390+
client_config[ADDITIONAL_USER_AGENT] += OCI_CLI_INTERACTIVE_CLOUDSHELL_USER_AGENT
391+
392+
if OCI_CLI_CONTAINER_IMAGE in os.environ:
393+
client_config[ADDITIONAL_USER_AGENT] += OCI_CLI_INTERACTIVE_CONTAINER_IMAGE_USER_AGENT
394+
395+
if OCI_CLI_CONTAINER_IMAGE in os.environ:
396+
client_config[ADDITIONAL_USER_AGENT] += OCI_CLI_CONTAINER_IMAGE_USER_AGENT
397+
372398
if ctx.obj['debug']:
373399
client_config["log_requests"] = True
374400

@@ -467,7 +493,7 @@ def build_raw_requests_session(ctx):
467493
session = requests.Session()
468494
session.auth = signer
469495
session.headers['opc-request-id'] = ctx.obj['request_id']
470-
session.headers['user-agent'] = oci.base_client.build_user_agent(extra=client_config['additional_user_agent'])
496+
session.headers['user-agent'] = oci.base_client.build_user_agent(extra=client_config[ADDITIONAL_USER_AGENT])
471497
set_request_session_properties_from_context(session, ctx)
472498

473499
return session
@@ -594,9 +620,18 @@ def build_config(command_args):
594620
if command_args['debug']:
595621
logger.debug("%s: Environment Variable", cli_constants.OCI_CONFIG_ENV_VARS[env])
596622

597-
client_config["additional_user_agent"] = 'Oracle-PythonCLI/{}'.format(__version__)
623+
client_config[ADDITIONAL_USER_AGENT] = ORACLE_PYTHON_VER.format(__version__)
598624
if OCI_CLI_IN_INTERACTIVE_MODE in os.environ:
599-
client_config["additional_user_agent"] += " Oracle-Interactive "
625+
client_config[ADDITIONAL_USER_AGENT] += OCI_CLI_INTERACTIVE_USER_AGENT
626+
627+
if OCI_CLI_CLOUD_SHELL in os.environ:
628+
client_config[ADDITIONAL_USER_AGENT] += OCI_CLI_INTERACTIVE_CLOUDSHELL_USER_AGENT
629+
630+
if OCI_CLI_CONTAINER_IMAGE in os.environ:
631+
client_config[ADDITIONAL_USER_AGENT] += OCI_CLI_INTERACTIVE_CONTAINER_IMAGE_USER_AGENT
632+
633+
if OCI_CLI_CONTAINER_IMAGE in os.environ:
634+
client_config[ADDITIONAL_USER_AGENT] += OCI_CLI_CONTAINER_IMAGE_USER_AGENT
600635

601636
if command_args['region']:
602637
client_config["region"] = command_args['region']

src/oci_cli/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
33
# 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.
44

5-
__version__ = '3.18.0'
5+
__version__ = '3.18.1'

tests/interactive/test_auto_prompt.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# 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.
44

55
import unittest
6+
from click.testing import CliRunner
67
from interactive.oci_shell_completer import OciShellCompleter
78
from oci_cli.cli_root import cli
89
from . import utils
@@ -12,6 +13,19 @@
1213

1314
class TestAutoPrompt(unittest.TestCase):
1415

16+
def test_cli_interactive_import(self):
17+
# This funciton tests importing interactive mode
18+
from interactive.cli_interactive import start_interactive_shell
19+
_ = start_interactive_shell
20+
21+
def test_cli_interactive_call(self):
22+
# This funciton tests calling interactive mode
23+
try:
24+
runner = CliRunner()
25+
result = runner.invoke(cli, ['-i'])
26+
except Exception:
27+
self.fail('Failed to run cli with interactive parameters')
28+
1529
def test_root_command_suggestion(self):
1630
# This function is to test the commands suggestions on the root level
1731
ctx = utils.set_up_context(cli)

0 commit comments

Comments
 (0)