Skip to content

Commit 02c2dbf

Browse files
authored
Merge pull request #733 from oracle/release_2023-12-04
Releasing version 3.37.0
2 parents 79b174b + 52a1162 commit 02c2dbf

File tree

46 files changed

+8737
-6061
lines changed

Some content is hidden

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

46 files changed

+8737
-6061
lines changed

CHANGELOG.rst

+89
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,95 @@ 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.37.0 - 2023-12-05
10+
--------------------
11+
Added
12+
~~~~~
13+
14+
* Database service
15+
16+
* Support for the serial console history.
17+
18+
* ``oci db console-history``
19+
20+
* Support for new optional parameters, autonomous-data-storage-size-in-tbs, cpu-core-count-per-node and total-container-databases in the cloud autonomous and autonomous vm cluster db resources.
21+
22+
* ``oci db autonomous-vm-cluster update --autonomous-data-storage-size-in-tbs, --cpu-core-count-per-node, --total-container-databases``
23+
* ``oci db cloud-autonomous-vm-cluster update --autonomous-data-storage-size-in-tbs, --cpu-core-count-per-node, --total-container-databases``
24+
25+
* Support for new list system versions commands.
26+
27+
* ``oci db system-version list``
28+
29+
*Support for new optional parameter in cloud-vm-cluster and vm-cluster resources.
30+
31+
* ``oci db cloud-vm-cluster create --system-version``
32+
* ``oci db vm-cluster create --system-version``
33+
34+
* Support for multiple clusters in a SDDC in Oracle Cloud VMware Provisioning service.
35+
36+
* ``oci ocvs esxi-host replace-host``
37+
* ``oci ocvs cluster cluster``
38+
* ``oci ocvs sddc retrieve-password``
39+
40+
* Support for upload-discovery-data in Log Analytics service.
41+
42+
* ``oci log-analytics entity upload-discovery-data --upload-discovery-data-details --namespace-name``
43+
* ``oci log-analytics entity upload-discovery-data --file --namespace-name``
44+
45+
* ADM service.
46+
47+
* Support for new list actions.
48+
49+
* ``oci adm remediation-recipe list``
50+
* ``oci adm remediation-run list``
51+
* ``oci adm remediation-run list-application-dependency-recommendations``
52+
* ``oci adm remediation-run-stage list-stages``
53+
54+
* Support for new optional parameters --usage-data.
55+
56+
* ``oci adm vulnerability-audit create --usage-data``
57+
* ``oci adm vulnerability-audit create-vulnerability-audit-external-resource-vulnerability-audit-source --usage-data``
58+
* ``oci adm vulnerability-audit create-vulnerability-audit-oci-resource-vulnerability-audit-source --usage-data``
59+
* ``oci adm vulnerability-audit create-vulnerability-audit-unknown-source-vulnerability-audit-source --usage-data``
60+
61+
* Support for new AWR Hub Snapshot ingest commands in Operations Insights service.
62+
63+
* ``oci opsi awr-hub-sources``
64+
* ``oci opsi operations-insights-warehouses``
65+
* ``oci opsi awr-hub-objects``
66+
67+
* Support for managing available certificates of target servers in Goldengate service.
68+
69+
* ``oci goldengate certificate``
70+
71+
72+
Changed
73+
~~~~~~~
74+
75+
* [BREAKING] Multiple parameters changes in OCVS service. Few params deleted in sddc resource.
76+
77+
* ``oci ocvs esxi-host create --cluster-id``
78+
* ``oci ocvs esxi-host list --cluster-id``
79+
* ``oci ocvs esxi-host update --next-commitment``
80+
* ``oci ocvs sddc``
81+
82+
* Description of export details in the Logging Analytics service
83+
84+
* ``oci log-analytics query export``
85+
86+
* Description change in Compute Cloud at Customer service
87+
88+
Removed
89+
~~~~~
90+
91+
* [BREAKING] The following commands have been removed in ADM service.
92+
93+
* ``oci adm application-dependency-recommendation-collection list-application-dependency-recommendations``
94+
* ``oci adm remediation-recipe-collection list-remediation-recipes``
95+
* ``oci adm remediation-run-collection list-remediation-runs``
96+
* ``oci adm remediation-run-stage-collection list-stages``
97+
998
3.36.2 - 2023-11-14
1099
--------------------
11100
Added

requirements.txt

+2-2
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.116.0
17+
oci==2.117.0
1818
packaging==20.2
1919
pluggy==0.13.0
2020
py==1.11.0
@@ -45,4 +45,4 @@ prompt-toolkit==3.0.29
4545
setuptools>65.5.1; python_version > '3.6'
4646
setuptools==59.6.0; python_version == '3.6'
4747
# this is required because of python 3.6 requests dependency version bound
48-
urllib3<=1.26.15
48+
urllib3<=1.26.15

scripts/examples/project_o/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ This will get a fresh list of all compartments in the tenancy, which is a great
198198
- Get a list of groups with user members for each group:<br>
199199
`o -o display-name/member.name id list groups --attributes name,members -end <domain-name>.`
200200

201+
#### New in version 1.11 (2023-11-22)
202+
- Improved handling of very long results (especially `o os list objects --all`)
203+
- Minor bugfixes
204+
201205
## How **``o``** works
202206
- **``o``** compares your input with thousands of ``oci`` commands, and uses an fuzzy matching to find the command you want.
203207

scripts/examples/project_o/o

+34-19
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ if (sys.platform != "win32"):
2121
import fcntl
2222
import errno
2323
import datetime
24-
VERSION = "1.10"
25-
UPDATED = "2023-08-08"
24+
VERSION = "1.11"
25+
UPDATED = "2023-11-22"
2626

2727
# ==============================================================================
2828
# Global variables
@@ -394,8 +394,10 @@ def ocids_file(action, new_ocids={}):
394394
for k, v in ocid.items():
395395
if 'score' in v:
396396
del v['score']
397-
if 'parents' in v:
398-
del v['parents']
397+
# Reduce ocids file size: stop saving tags and fields not used by o
398+
for rm in ('parents', 'defined-tags', 'freeform-tags', 'system-tags', 'lifecycle-state', 'time-created'):
399+
if rm in v:
400+
del v[rm]
399401

400402
# convert dict to list
401403
ocids = [ocid[k] for k in ocid.keys()]
@@ -457,6 +459,11 @@ def get_new_ocids_from_returned_items(items):
457459
if 'identifier' in i and 'id' not in i:
458460
i['id'] = i['identifier']
459461

462+
if 'oci os multipart list' in oci_command_line:
463+
for i in items:
464+
if 'upload-id' in i and 'id' not in i:
465+
i['id'] = i['upload-id']
466+
460467
collected = {}
461468
try:
462469
for item in [i for i in items if 'id' in i]:
@@ -473,8 +480,6 @@ def get_new_ocids_from_returned_items(items):
473480
if 'retention-rule' in oci_command_line:
474481
type = 'retentionrule'
475482

476-
# Still need to validate with many OCID types:
477-
# cpe, cross-connect, fast-connect, ip-sec, virtual-circuit
478483
if type == 'availabilitydomain':
479484
alias = item['name'][-1:]
480485
elif 'object-name' in item:
@@ -504,6 +509,9 @@ def get_new_ocids_from_returned_items(items):
504509
alias = item['db-name']
505510
elif 'credential' in type:
506511
alias = item['description']
512+
elif 'oci os multipart list' in oci_command_line:
513+
type = 'upload'
514+
alias = item['object']
507515
else:
508516
# Unable to determine data type, don't add to collection
509517
# print("type:", type, json.dumps(item, indent=4))
@@ -981,6 +989,9 @@ def value_parameter(option, value):
981989
if param_type == 'datetime':
982990
return datetime_parameter(value)
983991

992+
if option.endswith('-region') and get_region(value)[1]:
993+
return(get_region(value)[1])
994+
984995
# Special help with log-search --search-query "search comp1 comp2 | ..."
985996
# Substitute "ocid1.compartment..." for one or more values.
986997
if option == '--search-query':
@@ -1193,7 +1204,9 @@ def get_field_from_item(field, item):
11931204
value = str(item[field])
11941205
else:
11951206
f = field.split('.')
1196-
if not item[f[0]]:
1207+
if f[0] not in item:
1208+
value = ''
1209+
elif not item[f[0]]:
11971210
value = jdump_item(item[f[0]])
11981211
elif f[-1] in item[f[0]]:
11991212
value = jdump_item(item[f[0]][f[1]])
@@ -1220,7 +1233,7 @@ def show_item(item, fields, sep, reg=False):
12201233
value = ''
12211234
value = get_field_from_item(field, item)
12221235

1223-
if field not in ('id', 'identifier') and value in ocid and not ocids_in_output:
1236+
if field not in ('id', 'identifier', 'upload-id') and value in ocid and not ocids_in_output:
12241237
value = ocid[value]['alias']
12251238
out.append(column[field]['format'].format(value[column[field]['offset']:]))
12261239
continue
@@ -2092,9 +2105,11 @@ for a in CLI_params:
20922105
options_out.append(option_parameter(a))
20932106
last_option = options_out[-1]
20942107
# don't match the same parameter more than once
2095-
remaining_options = re.sub(last_option + ' '
2096-
+ r'(\[[A-Za-z0-9-_|\]]* )',
2097-
'', remaining_options)
2108+
# exception: certain params can be specified multiple times
2109+
if options_out[-1] not in ('--fields', '--exclude', '--include'):
2110+
remaining_options = re.sub(last_option + ' '
2111+
+ r'(\[[A-Za-z0-9-_|\]]* )',
2112+
'', remaining_options)
20982113
else:
20992114
options_out.append(value_parameter(last_option, a))
21002115

@@ -2152,7 +2167,7 @@ if (sys.platform != "win32"):
21522167
fcntl.fcntl(cli.stderr, fcntl.F_SETFL, flags | os.O_NONBLOCK)
21532168

21542169
# Read output from cli - show non-JSON on stdout
2155-
JSONstdout = ''
2170+
outlines = []
21562171
errlines = []
21572172
while True:
21582173
if (sys.platform != "win32"):
@@ -2164,8 +2179,8 @@ while True:
21642179
if stdout == '' and returncode is not None:
21652180
break
21662181
if stdout:
2167-
if JSONstdout or stdout[0] in '{[':
2168-
JSONstdout += stdout
2182+
if outlines or stdout[0] in '{[':
2183+
outlines.append(stdout)
21692184
else:
21702185
print(stdout, end='', flush=True)
21712186
else:
@@ -2176,11 +2191,11 @@ stderr = ''.join(errlines)
21762191

21772192
# Interpret output as JSON
21782193
try:
2179-
jsonOut = json.loads(JSONstdout)
2194+
jsonOut = json.loads(''.join(outlines))
21802195
except ValueError:
21812196
# json.loads failed, show us what you got
2182-
if JSONstdout != '':
2183-
print(JSONstdout)
2197+
if outlines:
2198+
print(''.join(outlines))
21842199
if stderr:
21852200
error_out(stderr)
21862201
exit(1)
@@ -2190,13 +2205,13 @@ if os.path.isfile(tmpfile):
21902205
try:
21912206
os.umask(0o077)
21922207
with open(tmpfile, 'w+') as f:
2193-
f.write(JSONstdout)
2208+
f.write(''.join(outlines))
21942209
except IOError:
21952210
pass
21962211

21972212
results = output(jsonOut)
21982213
if results == 1:
2199-
print(JSONstdout)
2214+
print(''.join(outlines))
22002215

22012216
# report stderr from oci cli, if any, AFTER results
22022217
if stderr:

0 commit comments

Comments
 (0)