Skip to content

Commit c4b44dc

Browse files
authored
Releasing version 2.2.21
Releasing version 2.2.21
2 parents 8f8d4a3 + e792ddc commit c4b44dc

37 files changed

+2552
-119
lines changed

CHANGELOG.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ 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+
2.2.21 - 2019-08-06
9+
====================
10+
11+
Added
12+
-----
13+
* Support for IPv6 load balancers in the Load Balancing service
14+
* Support for IPv6 on VCN and FastConnect resources in the Networking service
15+
716
====================
817
2.2.20 - 2019-07-30
918
====================

docs/api/core.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ Core Services
101101
oci.core.models.CreateInstancePoolDetails
102102
oci.core.models.CreateInstancePoolPlacementConfigurationDetails
103103
oci.core.models.CreateInternetGatewayDetails
104+
oci.core.models.CreateIpv6Details
104105
oci.core.models.CreateLocalPeeringGatewayDetails
105106
oci.core.models.CreateNatGatewayDetails
106107
oci.core.models.CreateNetworkSecurityGroupDetails
@@ -189,6 +190,7 @@ Core Services
189190
oci.core.models.InstanceSourceViaImageDetails
190191
oci.core.models.InstanceSummary
191192
oci.core.models.InternetGateway
193+
oci.core.models.Ipv6
192194
oci.core.models.LaunchInstanceAgentConfigDetails
193195
oci.core.models.LaunchInstanceDetails
194196
oci.core.models.LaunchOptions
@@ -239,6 +241,7 @@ Core Services
239241
oci.core.models.UpdateInstancePoolDetails
240242
oci.core.models.UpdateInstancePoolPlacementConfigurationDetails
241243
oci.core.models.UpdateInternetGatewayDetails
244+
oci.core.models.UpdateIpv6Details
242245
oci.core.models.UpdateLocalPeeringGatewayDetails
243246
oci.core.models.UpdateNatGatewayDetails
244247
oci.core.models.UpdateNetworkSecurityGroupDetails
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CreateIpv6Details
2+
=================
3+
4+
.. currentmodule:: oci.core.models
5+
6+
.. autoclass:: CreateIpv6Details
7+
:show-inheritance:
8+
:special-members: __init__
9+
:members:
10+
:undoc-members:
11+
:inherited-members:
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Ipv6
2+
====
3+
4+
.. currentmodule:: oci.core.models
5+
6+
.. autoclass:: Ipv6
7+
:show-inheritance:
8+
:special-members: __init__
9+
:members:
10+
:undoc-members:
11+
:inherited-members:
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
UpdateIpv6Details
2+
=================
3+
4+
.. currentmodule:: oci.core.models
5+
6+
.. autoclass:: UpdateIpv6Details
7+
:show-inheritance:
8+
:special-members: __init__
9+
:members:
10+
:undoc-members:
11+
:inherited-members:

examples/create_ipv6_example.py

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# coding: utf-8
2+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
3+
4+
# This script provides a basic example of how to create an IPv6 VNIC attachment to a provided
5+
# instance using the Python SDK. NOTE: The provided instance must be within an IPv6-enabled VCN.
6+
#
7+
# USAGE:
8+
# `python examples/create_ipv6_example.py --compartment-id 'foo' --instance-id 'bar'`
9+
#
10+
# This script will create an IPv6 VNIC attachment to the provided instance and
11+
# accepts the following arguments:
12+
#
13+
# * The compartment ID in which the instance is located
14+
# * The instance ID on which the IPv6 will be created
15+
# * The display name for the IPv6 to be created
16+
17+
import oci
18+
import argparse
19+
20+
# parse arguments
21+
parser = argparse.ArgumentParser()
22+
parser.add_argument('--compartment-id',
23+
help='compartment ID in which to perform the operation',
24+
required=True
25+
)
26+
parser.add_argument('--instance-id',
27+
help='instance ID on which the IPv6 attachment will be created',
28+
required=True
29+
)
30+
parser.add_argument('--display-name',
31+
help='display name for the IPv6 to be created',
32+
required=False,
33+
default='python-sdk-create-ipv6-example'
34+
)
35+
args = parser.parse_args()
36+
37+
38+
def get_vnic_attachments(compute_client, instance_id, compartment_id):
39+
vnic_attachments = compute_client.list_vnic_attachments(
40+
compartment_id,
41+
instance_id=instance_id
42+
).data
43+
print('found VNIC attachments:\n{}'.format(vnic_attachments))
44+
return vnic_attachments
45+
46+
47+
def create_ipv6(virtual_network_client, vnic_id, display_name):
48+
create_ipv6_response = virtual_network_client.create_ipv6(
49+
oci.core.models.CreateIpv6Details(
50+
display_name=display_name,
51+
vnic_id=vnic_id
52+
)
53+
).data
54+
return create_ipv6_response
55+
56+
57+
# ---------- assign provided arguments
58+
compartment_id = args.compartment_id
59+
instance_id = args.instance_id
60+
display_name = args.display_name
61+
62+
# ---------- read config from file
63+
config = oci.config.from_file()
64+
compute_client = oci.core.ComputeClient(config)
65+
virtual_network_client = oci.core.VirtualNetworkClient(config)
66+
67+
# ---------- get VNIC attachments for provided instance
68+
vnics = get_vnic_attachments(
69+
compute_client,
70+
args.instance_id,
71+
args.compartment_id
72+
)
73+
74+
# ---------- create IPv6 object
75+
create_ipv6(
76+
virtual_network_client,
77+
vnics[0].vnic_id, # use first vnic ID returned from `get_vnic_attachments`
78+
display_name
79+
)
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# coding: utf-8
2+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
3+
4+
# This script provides a basic example of how to create an IPv6 load balancer using the Python SDK.
5+
# NOTE: The provided subnet must be within an IPv6-enabled VCN.
6+
#
7+
# USAGE:
8+
# `python examples/create_ipv6_load_balancer_example.py --compartment-id 'foo' --subnet-id 'bar' --display-name 'bat'`
9+
#
10+
# This script will create an IPv6 load balancer and
11+
# accepts the following arguments:
12+
#
13+
# * The compartment ID in which the load balancer will be created
14+
# * The subnet ID in which the load balancer will be created
15+
# * The shape of the load balancer to be created
16+
# * The display name for the load balancer to be created
17+
18+
import oci
19+
import argparse
20+
21+
# ---------- parse arguments
22+
parser = argparse.ArgumentParser()
23+
parser.add_argument('--compartment-id',
24+
help='compartment ID in which to perform the operation',
25+
required=True
26+
)
27+
parser.add_argument('--subnet-id',
28+
help='subnet ID in which the load balancer will be created',
29+
required=True
30+
)
31+
parser.add_argument('--display-name',
32+
help='display name for the load balancer to be created',
33+
required=False,
34+
default='python-sdk-create-ipv6-lb-example'
35+
)
36+
parser.add_argument('--shape-name',
37+
help='shape name of the load balancer to be created',
38+
required=False,
39+
default='100Mbps'
40+
)
41+
args = parser.parse_args()
42+
43+
# ---------- assign provided arguments
44+
compartment_id = args.compartment_id
45+
subnet_id = args.subnet_id
46+
display_name = args.display_name
47+
shape_name = args.shape_name
48+
49+
# ---------- read config from file
50+
config = oci.config.from_file()
51+
load_balancer_client = oci.core.LoadBalancerClient(config)
52+
load_balancer_client_composite_ops = oci.load_balancer.LoadBalancerClientCompositeOperations(load_balancer_client)
53+
54+
# ---------- create load balancer
55+
load_balancer = load_balancer_client_composite_ops.create_load_balancer_and_wait_for_state(
56+
oci.core.models.CreateLoadBalancerDetails(
57+
compartment_id=compartment_id,
58+
display_name=display_name,
59+
shape_name=shape_name,
60+
ip_mode="IPV6",
61+
subnet_ids=[subnet_id]
62+
),
63+
[oci.load_balancer.models.WorkRequest.LIFECYCLE_STATE_SUCCEEDED]
64+
)
65+
66+
print('Created Load Balancer %s' % (load_balancer.data.id))

examples/showoci/CHANGELOG.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ 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+
19.8.6 - 2019-08-06
9+
====================
10+
* Support Mumbai
11+
712
====================
813
19.7.24 - 2019-07-24
914
====================

examples/showoci/showoci.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
import argparse
6262
import datetime
6363

64-
version = "19.7.24"
64+
version = "19.8.6"
6565

6666
##########################################################################
6767
# execute_extract

examples/showoci/showoci_service.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,13 @@ class ShowOCIService(object):
248248
{'region': 'ap-seoul-1', 'service': C_MONITORING},
249249
{'region': 'ap-seoul-1', 'service': C_COMPUTE_AUTOSCALING},
250250
{'region': 'ap-seoul-1', 'service': C_STREAMS},
251-
{'region': 'ap-seoul-1', 'service': C_NOTIFICATIONS}
251+
{'region': 'ap-seoul-1', 'service': C_NOTIFICATIONS},
252+
{'region': 'ap-mumbai-1', 'service': C_EMAIL},
253+
{'region': 'ap-mumbai-1', 'service': C_EDGE},
254+
{'region': 'ap-mumbai-1', 'service': C_MONITORING},
255+
{'region': 'ap-mumbai-1', 'service': C_COMPUTE_AUTOSCALING},
256+
{'region': 'ap-mumbai-1', 'service': C_STREAMS},
257+
{'region': 'ap-mumbai-1', 'service': C_NOTIFICATIONS}
252258
]
253259

254260
##########################################################################

0 commit comments

Comments
 (0)