Skip to content

Commit e80d431

Browse files
authored
Merge pull request #220 from oracle/release_2020-02-11
Releasing version 2.10.4
2 parents 8d01579 + 1b8d9f6 commit e80d431

31 files changed

+971
-144
lines changed

CHANGELOG.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@ Change Log
33
All notable changes to this project will be documented in this file.
44

55
The format is based on `Keep a Changelog <http://keepachangelog.com/>`_.
6+
====================
7+
2.10.4 - 2020-02-11
8+
====================
9+
10+
Added
11+
-----
12+
* Support for listing supported database versions for Autonomous Database Serverless, and selecting a version at provisioning time in the Database service
13+
* Support for TCP proxy protocol versions on listener connection configurations in the Load Balancer service
14+
* Support for calling the Notifications service in alternate realms
15+
* Support for calling Oracle Cloud Infrastructure services in the eu-amsterdam-1 and me-jeddah-1 regions
16+
617
====================
718
2.10.3 - 2020-02-04
819
====================

docs/api/database.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Database
3838
oci.database.models.AutonomousDatabaseSummary
3939
oci.database.models.AutonomousDatabaseWallet
4040
oci.database.models.AutonomousDbPreviewVersionSummary
41+
oci.database.models.AutonomousDbVersionSummary
4142
oci.database.models.AutonomousExadataInfrastructure
4243
oci.database.models.AutonomousExadataInfrastructureMaintenanceWindow
4344
oci.database.models.AutonomousExadataInfrastructureShapeSummary
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
AutonomousDbVersionSummary
2+
==========================
3+
4+
.. currentmodule:: oci.database.models
5+
6+
.. autoclass:: AutonomousDbVersionSummary
7+
:show-inheritance:
8+
:special-members: __init__
9+
:members:
10+
:undoc-members:
11+
:inherited-members:

examples/showoci/CHANGELOG.rst

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

55
The format is based on `Keep a Changelog <http://keepachangelog.com/>`_.
66

7+
=====================
8+
20.02.11 - 2020-02-11
9+
=====================
10+
* Add support for Function Applications (-fun)
11+
* Add support for API gateways (-api)
12+
* Fix limits to use pagination to produce all rows
13+
14+
=====================
15+
20.01.30 - 2020-01-30
16+
=====================
17+
* Add DRG Redundant status
18+
719
=====================
820
20.01.29 - 2020-01-29
921
=====================

examples/showoci/README.md

Lines changed: 51 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ Output can be printer friendly, CSV files or JSON file.
3636
- oci.analytics.AnalyticsClient
3737
- oci.oda.OdaClient
3838
- oci.oce.OceInstanceClient
39+
- oci.apigateway.GatewaysClient
40+
- oci.functions.FunctionsManagementClient
3941

4042
** DISCLAIMER – This is not an official Oracle application
4143

@@ -176,57 +178,57 @@ Execute
176178
```
177179
$ ./showoci.py
178180
179-
usage: showoci.py [-h] [-a] [-ani] [-an] [-b] [-n] [-i] [-ic] [-c] [-cn] [-o]
180-
[-l] [-d] [-f] [-e] [-m] [-s] [-rm] [-so] [-paas] [-edge]
181-
[-lq] [-mc] [-nr] [-ip] [-t PROFILE] [-p PROXY] [-rg REGION]
182-
[-cp COMPART] [-cpr COMPART_RECURSIVE] [-cpath COMPARTPATH]
183-
[-tenantid TENANTID] [-cf CONFIG] [-csv CSV] [-jf JOUTFILE]
184-
[-js] [-sjf SJOUTFILE] [-cachef SERVICEFILE] [-caches]
185-
[--version]
181+
usage: showoci.py [-h] [-a] [-ani] [-an] [-api] [-b] [-c] [-cn] [-d] [-e]
182+
[-edge] [-f] [-fun] [-i] [-ic] [-l] [-lq] [-m] [-n] [-o]
183+
[-paas] [-rm] [-s] [-so] [-mc] [-nr] [-ip] [-t PROFILE]
184+
[-p PROXY] [-rg REGION] [-cp COMPART] [-cpr COMPART_RECUR]
185+
[-cpath COMPARTPATH] [-tenantid TENANTID] [-cf CONFIG]
186+
[-csv CSV] [-jf JOUTFILE] [-js] [-sjf SJOUTFILE]
187+
[-cachef SERVICEFILE] [-caches] [--version]
186188
187189
optional arguments:
188-
-h, --help show this help message and exit
189-
-a Print All Resources
190-
-ani Print All Resources but identity
191-
-an Print Announcements
192-
-b Print Budgets
193-
-n Print Network
194-
-i Print Identity
195-
-ic Print Identity Compartments only
196-
-c Print Compute
197-
-cn Print Containers
198-
-o Print Object Storage
199-
-l Print Load Balancer
200-
-d Print Database
201-
-f Print File Storage
202-
-e Print EMail
203-
-m Print Monitoring and Notifications
204-
-s Print Streams
205-
-rm Print Resource management
206-
-so Print Summary Only
207-
-paas Print Oracle Paas Native - OIC OAC ODA
208-
-edge Print Edge Services (Healthcheck)
209-
-lq Print Limits and Quotas
210-
-mc exclude ManagedCompartmentForPaaS
211-
-nr Not include root compartment
212-
-ip Use Instance Principals for Authentication
213-
-t PROFILE Config file section to use (tenancy profile)
214-
-p PROXY Set Proxy (i.e. www-proxy-server.com:80)
215-
-rg REGION Filter by Region
216-
-cp COMPART Filter by Compartment Name or OCID
217-
-cpr COMPART_RECURSIVE
218-
Filter by Compartment Name or OCID include sub
219-
compartments
220-
-cpath COMPARTPATH Filter by Compartment path ,(i.e. -cpath "Adi / Sub"
221-
-tenantid TENANTID Override confile file tenancy_id
222-
-cf CONFIG Config File
223-
-csv CSV Output to CSV files, Input as file header
224-
-jf JOUTFILE Output to file (JSON format)
225-
-js Output to screen (JSON format)
226-
-sjf SJOUTFILE Output to screen (nice format) and JSON File
227-
-cachef SERVICEFILE Output Cache to file (JSON format)
228-
-caches Output Cache to screen (JSON format)
229-
--version show program's version number and exit
190+
-h, --help show this help message and exit
191+
-a Print All Resources
192+
-ani Print All Resources but identity
193+
-an Print Announcements
194+
-api Print API Gateways
195+
-b Print Budgets
196+
-c Print Compute
197+
-cn Print Containers
198+
-d Print Database
199+
-e Print EMail
200+
-edge Print Edge Services (Healthcheck)
201+
-f Print File Storage
202+
-fun Print Functions
203+
-i Print Identity
204+
-ic Print Identity Compartments only
205+
-l Print Load Balancer
206+
-lq Print Limits and Quotas
207+
-m Print Monitoring and Notifications
208+
-n Print Network
209+
-o Print Object Storage
210+
-paas Print Oracle Paas Native - OIC OAC ODA
211+
-rm Print Resource management
212+
-s Print Streams
213+
-so Print Summary Only
214+
-mc exclude ManagedCompartmentForPaaS
215+
-nr Not include root compartment
216+
-ip Use Instance Principals for Authentication
217+
-t PROFILE Config file section to use (tenancy profile)
218+
-p PROXY Set Proxy (i.e. www-proxy-server.com:80)
219+
-rg REGION Filter by Region
220+
-cp COMPART Filter by Compartment Name or OCID
221+
-cpr COMPART_RECUR Filter by Comp Name or OCID Recursive
222+
-cpath COMPARTPATH Filter by Compartment path ,(i.e. -cpath "Adi / Sub"
223+
-tenantid TENANTID Override confile file tenancy_id
224+
-cf CONFIG Config File
225+
-csv CSV Output to CSV files, Input as file header
226+
-jf JOUTFILE Output to file (JSON format)
227+
-js Output to screen (JSON format)
228+
-sjf SJOUTFILE Output to screen (nice format) and JSON File
229+
-cachef SERVICEFILE Output Cache to file (JSON format)
230+
-caches Output Cache to screen (JSON format)
231+
--version show program's version number and exit
230232
231233
```
232234

examples/showoci/showoci.py

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,20 @@
4747
# - oci.healthchecks.HealthChecksClient
4848
# - oci.announcements_service.AnnouncementClient
4949
# - oci.limits.LimitsClient
50+
# - oci.integration.IntegrationInstanceClient
51+
# - oci.analytics.AnalyticsClient
52+
# - oci.oda.OdaClient
53+
# - oci.oce.OceInstanceClient
54+
# - oci.apigateway.GatewaysClient
55+
# - oci.functions.FunctionsManagementClient
5056
#
5157
# Modules Not Yet Covered:
5258
# - oci.waas.WaasClient
5359
# - oci.dns.DnsClient
60+
# - oci.data_catalog.DataCatalogClient
61+
# - oci.data_flow.DataFlowClient
62+
# - oci.data_science.DataScienceClient
63+
# - oci.events.EventsClient
5464
#
5565
##########################################################################
5666
from __future__ import print_function
@@ -62,7 +72,7 @@
6272
import argparse
6373
import datetime
6474

65-
version = "20.1.29"
75+
version = "20.2.11"
6676

6777
##########################################################################
6878
# execute_extract
@@ -219,32 +229,35 @@ def set_parser_arguments():
219229
parser.add_argument('-a', action='store_true', default=False, dest='all', help='Print All Resources')
220230
parser.add_argument('-ani', action='store_true', default=False, dest='allnoiam', help='Print All Resources but identity')
221231
parser.add_argument('-an', action='store_true', default=False, dest='announcement', help='Print Announcements')
232+
parser.add_argument('-api', action='store_true', default=False, dest='api', help='Print API Gateways')
222233
parser.add_argument('-b', action='store_true', default=False, dest='budgets', help='Print Budgets')
223-
parser.add_argument('-n', action='store_true', default=False, dest='network', help='Print Network')
224-
parser.add_argument('-i', action='store_true', default=False, dest='identity', help='Print Identity')
225-
parser.add_argument('-ic', action='store_true', default=False, dest='identity_compartments', help='Print Identity Compartments only')
226234
parser.add_argument('-c', action='store_true', default=False, dest='compute', help='Print Compute')
227235
parser.add_argument('-cn', action='store_true', default=False, dest='container', help='Print Containers')
228-
parser.add_argument('-o', action='store_true', default=False, dest='object', help='Print Object Storage')
229-
parser.add_argument('-l', action='store_true', default=False, dest='load', help='Print Load Balancer')
230236
parser.add_argument('-d', action='store_true', default=False, dest='database', help='Print Database')
231-
parser.add_argument('-f', action='store_true', default=False, dest='file', help='Print File Storage')
232237
parser.add_argument('-e', action='store_true', default=False, dest='email', help='Print EMail')
238+
parser.add_argument('-edge', action='store_true', default=False, dest='edge', help='Print Edge Services (Healthcheck)')
239+
parser.add_argument('-f', action='store_true', default=False, dest='file', help='Print File Storage')
240+
parser.add_argument('-fun', action='store_true', default=False, dest='function', help='Print Functions')
241+
parser.add_argument('-i', action='store_true', default=False, dest='identity', help='Print Identity')
242+
parser.add_argument('-ic', action='store_true', default=False, dest='identity_compartments', help='Print Identity Compartments only')
243+
parser.add_argument('-l', action='store_true', default=False, dest='load', help='Print Load Balancer')
244+
parser.add_argument('-lq', action='store_true', default=False, dest='limits', help='Print Limits and Quotas')
233245
parser.add_argument('-m', action='store_true', default=False, dest='monitoring', help='Print Monitoring and Notifications')
234-
parser.add_argument('-s', action='store_true', default=False, dest='streams', help='Print Streams')
246+
parser.add_argument('-n', action='store_true', default=False, dest='network', help='Print Network')
247+
parser.add_argument('-o', action='store_true', default=False, dest='object', help='Print Object Storage')
248+
parser.add_argument('-paas', action='store_true', default=False, dest='paas_native', help='Print Oracle Paas Native - OIC OAC ODA')
235249
parser.add_argument('-rm', action='store_true', default=False, dest='orm', help='Print Resource management')
250+
parser.add_argument('-s', action='store_true', default=False, dest='streams', help='Print Streams')
251+
236252
parser.add_argument('-so', action='store_true', default=False, dest='sumonly', help='Print Summary Only')
237-
parser.add_argument('-paas', action='store_true', default=False, dest='paas_native', help='Print Oracle Paas Native - OIC OAC ODA')
238-
parser.add_argument('-edge', action='store_true', default=False, dest='edge', help='Print Edge Services (Healthcheck)')
239-
parser.add_argument('-lq', action='store_true', default=False, dest='limits', help='Print Limits and Quotas')
240253
parser.add_argument('-mc', action='store_true', default=False, dest='mgdcompart', help='exclude ManagedCompartmentForPaaS')
241254
parser.add_argument('-nr', action='store_true', default=False, dest='noroot', help='Not include root compartment')
242255
parser.add_argument('-ip', action='store_true', default=False, dest='instance_principals', help='Use Instance Principals for Authentication')
243256
parser.add_argument('-t', default="", dest='profile', help='Config file section to use (tenancy profile)')
244257
parser.add_argument('-p', default="", dest='proxy', help='Set Proxy (i.e. www-proxy-server.com:80) ')
245258
parser.add_argument('-rg', default="", dest='region', help='Filter by Region')
246259
parser.add_argument('-cp', default="", dest='compart', help='Filter by Compartment Name or OCID')
247-
parser.add_argument('-cpr', default="", dest='compart_recursive', help='Filter by Compartment Name or OCID include sub compartments')
260+
parser.add_argument('-cpr', default="", dest='compart_recur', help='Filter by Comp Name or OCID Recursive')
248261
parser.add_argument('-cpath', default="", dest='compartpath', help='Filter by Compartment path ,(i.e. -cpath "Adi / Sub"')
249262
parser.add_argument('-tenantid', default="", dest='tenantid', help='Override confile file tenancy_id')
250263
parser.add_argument('-cf', type=argparse.FileType('r'), dest='config', help="Config File")
@@ -265,7 +278,8 @@ def set_parser_arguments():
265278
if not (result.all or result.allnoiam or result.network or result.identity or result.identity_compartments or
266279
result.compute or result.object or
267280
result.load or result.database or result.file or result.email or result.orm or result.container or
268-
result.streams or result.budgets or result.monitoring or result.edge or result.announcement or result.limits or result.paas_native):
281+
result.streams or result.budgets or result.monitoring or result.edge or result.announcement or result.limits or result.paas_native or
282+
result.api or result.function):
269283

270284
parser.print_help()
271285

@@ -328,6 +342,12 @@ def set_service_extract_flags(cmd):
328342
if cmd.all or cmd.allnoiam or cmd.budgets:
329343
prm.read_budgets = True
330344

345+
if cmd.all or cmd.allnoiam or cmd.function:
346+
prm.read_function = True
347+
348+
if cmd.all or cmd.allnoiam or cmd.api:
349+
prm.read_api = True
350+
331351
if cmd.all or cmd.allnoiam or cmd.limits:
332352
prm.read_limits = True
333353

@@ -359,8 +379,8 @@ def set_service_extract_flags(cmd):
359379
if cmd.compart:
360380
prm.filter_by_compartment = str(cmd.compart)
361381

362-
if cmd.compart_recursive:
363-
prm.filter_by_compartment_recursive = str(cmd.compart_recursive)
382+
if cmd.compart_recur:
383+
prm.filter_by_compartment_recursive = str(cmd.compart_recur)
364384

365385
if cmd.compartpath:
366386
prm.filter_by_compartment_path = str(cmd.compartpath)

examples/showoci/showoci_data.py

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,20 @@ def __get_oci_region_data(self, region_name):
313313
data['paas_services'] = value
314314
has_data = True
315315

316+
if self.service.flags.read_function:
317+
value = self.__get_functions_main(region_name, compartment)
318+
if value is not None:
319+
if len(value) > 0:
320+
data['functions'] = value
321+
has_data = True
322+
323+
if self.service.flags.read_api:
324+
value = self.__get_apigateway_main(region_name, compartment)
325+
if value is not None:
326+
if len(value) > 0:
327+
data['apigateways'] = value
328+
has_data = True
329+
316330
# add the data to main Variable
317331
if has_data:
318332
ret_var.append(data)
@@ -831,7 +845,7 @@ def __get_core_network_drg_name(self, drg_id):
831845
# get DRG name
832846
drg = self.service.search_unique_item(self.service.C_NETWORK, self.service.C_NETWORK_DRG, 'id', drg_id)
833847
if drg:
834-
return "DRG - " + drg['name']
848+
return "DRG - " + drg['name'] + " (" + drg['redundancy'] + ")"
835849
return ""
836850

837851
except Exception as e:
@@ -2362,6 +2376,62 @@ def __get_streams_main(self, region_name, compartment):
23622376
self.__print_error("__get_streams_main", e)
23632377
pass
23642378

2379+
##########################################################################
2380+
# functions
2381+
##########################################################################
2382+
def __get_functions_main(self, region_name, compartment):
2383+
try:
2384+
functions = self.service.search_multi_items(self.service.C_FUNCTION, self.service.C_FUNCTION_APPLICATIONS, 'region_name', region_name, 'compartment_id', compartment['id'])
2385+
2386+
data = []
2387+
if functions:
2388+
for fn in functions:
2389+
val = {'id': fn['id'],
2390+
'display_name': fn['display_name'],
2391+
'subnets': [],
2392+
'subnet_ids': fn['subnet_ids'],
2393+
'time_created': fn['time_created'],
2394+
'defined_tags': fn['defined_tags'],
2395+
'freeform_tags': fn['freeform_tags'],
2396+
'compartment_name': fn['compartment_name'],
2397+
'compartment_id': fn['compartment_id'],
2398+
'region_name': fn['region_name']
2399+
}
2400+
2401+
# subnets
2402+
for sub in fn['subnet_ids']:
2403+
val['subnets'].append(self.__get_core_network_subnet_name(sub))
2404+
2405+
data.append(val)
2406+
return data
2407+
2408+
except Exception as e:
2409+
self.__print_error("__get_functions_main", e)
2410+
pass
2411+
2412+
##########################################################################
2413+
# __get_apigateway_main
2414+
##########################################################################
2415+
def __get_apigateway_main(self, region_name, compartment):
2416+
try:
2417+
apigs = self.service.search_multi_items(self.service.C_API, self.service.C_API_GATEWAYS, 'region_name', region_name, 'compartment_id', compartment['id'])
2418+
2419+
data = []
2420+
if apigs:
2421+
for ap in apigs:
2422+
val = ap
2423+
2424+
# subnet
2425+
if ap['subnet_id']:
2426+
val['subnet_name'] = self.__get_core_network_subnet_name(ap['subnet_id'])
2427+
2428+
data.append(val)
2429+
return data
2430+
2431+
except Exception as e:
2432+
self.__print_error("__get_apigateway_main", e)
2433+
pass
2434+
23652435
##########################################################################
23662436
# monitoring
23672437
##########################################################################

0 commit comments

Comments
 (0)