Skip to content

Commit 815b576

Browse files
authored
Merge pull request #45 from oracle/release_20180222
Releasing version 2.4.17
2 parents 8094780 + 8a10182 commit 815b576

37 files changed

+4255
-515
lines changed

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.idea
2+
*.iml
3+
*.egg-info
4+
.tox/
5+
.python-version
6+
*.pyc
7+
*.swp
8+
build/
9+
dist/
10+
env/
11+
*.egg-info/
12+
*.zip
13+
.DS_STORE
14+
data/
15+
docs/warnings.txt
16+
docs/process_sources_warnings.txt
17+
docs/_build/
18+
src/oci_cli/help_text_producer/data_files/man
19+
src/oci_cli/help_text_producer/data_files/text
20+
scripts/temp/
21+
target/
22+
tests/resources/content_output.txt
23+
tests/output/console_history_output.txt
24+
tests/temp
25+
.cache/
26+
.project
27+
.wercker/

CHANGELOG.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@ All notable changes to this project will be documented in this file.
77
The format is based on `Keep a
88
Changelog <http://keepachangelog.com/>`__.
99

10+
2.4.17 - 2018-02-22
11+
---------------------
12+
Added
13+
~~~~~~~~~~
14+
* Added support for the File Storage Service. (``oci fs``)
15+
* Added support for Path Route Sets in the Load Balancer Service. An example can be found on `Github <https://github.com/oracle/oci-cli/blob/master/scripts/create_load_balancer.sh>`_ (``oci lb path-route-set``)
16+
* Added tagging support for *Bucket* resources in the Object Storage Service
17+
* Create a bucket with tags: ``oci os bucket create --defined-tags --freeform-tags``
18+
* Update a bucket with tags: ``oci os bucket update --defined-tags --freeform-tags``
19+
* List buckets and display defined and freeform tags in the results: ``oci os bucket list --fields tags``
20+
* Added support for specifying a restore period for archived objects in the *RestoreObjects* operation of the Object Storage service. (``oci os object restore --hours``)
21+
* Added support for filtering by *backupId* in *ListDbSystems* operation in the Database Service (``oci db system list --backup-id``)
22+
* Added support for getting plink (the `PuTTY <https://www.putty.org/>`_ command line interface) compatible instance console connection string for Windows users (``oci compute instance-console-connection get-plink-connection-string``)
23+
1024
2.4.16 - 2018-02-08
1125
---------------------
1226
Added

CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Contributing to the Oracle Cloud Infrastructure CLI
22
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33

4-
*Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.*
4+
*Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.*
55

66
Pull requests can be made under
77
`The Oracle Contributor Agreement <https://www.oracle.com/technetwork/community/oca-486395.html>`_ (OCA).

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Jinja2==2.9.6
1212
jmespath==0.9.3
1313
ndg-httpsclient==0.4.2
1414
mock==2.0.0
15-
oci==1.3.14
15+
oci==1.3.15
1616
packaging==16.8
1717
pluggy==0.4.0
1818
py==1.4.33

scripts/create_load_balancer.sh

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# - Creating a load balancer by providing all options at create time (e.g. certificates, listeners, backend sets)
55
# - We also show two sub-variants: providing each option as an individual parameter (e.g. --certificiates, --listeners) and how to provide a consolidated
6-
# set of options using --from-json
6+
# set of options using --from-json
77
# - Creating a load balancer by providing the minimum options at create time and then adding related resources (e.g. certificates, listeners, backend sets)
88
# post-creation
99
#
@@ -43,14 +43,18 @@ echo "Load Balancer Shape: $LB_SHAPE"
4343
# This also provides each complex type as an individual option (e.g. --certificates, --listeners). It is also possible to provide these in a consolidated format, which is demonstrated
4444
# by the function create_lb_with_all_options_using_from_json
4545
function create_lb_with_all_options_as_individual_options() {
46-
# certificates_with_comments.json contains a description of the parameter. Since valid JSON cannot contain comments, we use jsonlint (which was installed
46+
# certificates_with_comments.json contains a description of the parameter. Since valid JSON cannot contain comments, we use jsonlint (which was installed
4747
# via our demjson dependency) to remove the comments and allow the CLI to use it.
4848
#
4949
# You should replace the values in certificates_with_comments.json with those appropriate for your use case (e.g. your own PEM-formatted strings)
5050
jsonlint -Sf scripts/create_load_balancer_example/certificates_with_comments.json > scripts/create_load_balancer_example/certificates.json
5151

5252
jsonlint -Sf scripts/create_load_balancer_example/backend_sets_with_comments.json > scripts/create_load_balancer_example/backend_sets.json
5353
jsonlint -Sf scripts/create_load_balancer_example/listeners_with_comments.json > scripts/create_load_balancer_example/listeners.json
54+
# Path Route Sets are not mandatory parameter to load balancer. They enhance
55+
# load balancer feature set by providing traffic routing flexibility.
56+
# More info about the feature can be found in scripts/create_load_balancer_example/path_route_sets_with_comments.json
57+
jsonlint -Sf scripts/create_load_balancer_example/path_route_sets_with_comments.json > scripts/create_load_balancer_example/path_route_sets.json
5458

5559
# Subnets are passed as a JSON array where each entry is a subnet OCID. For example:
5660
#
@@ -60,14 +64,14 @@ function create_lb_with_all_options_as_individual_options() {
6064
echo "[\"${FIRST_SUBNET_ID}\", \"${SECOND_SUBNET_ID}\"]" > scripts/create_load_balancer_example/subnets.json
6165

6266
# Note here in our create we use --certificates, --listeners etc. to pass in each complex type
63-
#
67+
#
6468
# There is some implicit sequencing in that:
6569
# - The backend set information (--backend-sets) may need the name of the certificate bundle specified in --certificates
6670
# - The listener information (--listeners) needs the name of one of the backend sets in --backend-sets
6771
# - The listener information (--listeners) may need the name of the certificate bundle specified in --certificates
6872
#
6973
# So you need to take that into account when preparing your files for input
70-
CREATED_LB=$(oci lb load-balancer create -c $COMPARTMENT_ID --display-name exampleLb --shape-name $LB_SHAPE --subnet-ids file://scripts/create_load_balancer_example/subnets.json --certificates file://scripts/create_load_balancer_example/certificates.json --backend-sets file://scripts/create_load_balancer_example/backend_sets.json --listeners file://scripts/create_load_balancer_example/listeners.json)
74+
CREATED_LB=$(oci lb load-balancer create -c $COMPARTMENT_ID --display-name exampleLb --shape-name $LB_SHAPE --subnet-ids file://scripts/create_load_balancer_example/subnets.json --certificates file://scripts/create_load_balancer_example/certificates.json --backend-sets file://scripts/create_load_balancer_example/backend_sets.json --listeners file://scripts/create_load_balancer_example/listeners.json --path-route-sets file://scripts/create_load_balancer_example/path_route_sets.json)
7175
WORK_REQUEST_ID=$(jq -r '."opc-work-request-id"' <<< "$CREATED_LB")
7276
echo "Create Load Balancer Work Request ID: $WORK_REQUEST_ID"
7377

@@ -96,7 +100,7 @@ function create_lb_with_all_options_as_individual_options() {
96100
sleep 120
97101
}
98102

99-
# We've seen in the create_lb_with_all_options_as_individual_options function that we can create a load balancer and provide complex parameters, such as --backend-sets,
103+
# We've seen in the create_lb_with_all_options_as_individual_options function that we can create a load balancer and provide complex parameters, such as --backend-sets,
100104
# as separate options. However, rather than specifying complex parameters individually, we can supply them in a consolidated format - in this case by passing it in
101105
# as a single file to the --from-json option.
102106
#
@@ -189,7 +193,19 @@ function create_lb_with_minimum_then_add_related_resources() {
189193
oci lb backend create --load-balancer-id $LB_ID --backend-set-name backendSetName --ip-address 10.10.10.4 --port 80 --weight 3
190194
oci lb backend create --load-balancer-id $LB_ID --backend-set-name backendSetName --ip-address 10.10.10.5 --port 80 --weight 3
191195

192-
# Now that we have our certificates and backend set, we can add a listener. We need to specify a backend set which exists (e.g. the one we made)
196+
# We can create Path Route Sets now since we have our backend set created.
197+
# Path Route Sets require backend sets to be mentioned as part of path route
198+
# rules. A path route set includes all path route strings and matching rules
199+
# that define the data routing for a particular listener. Path Route rules
200+
# enable routing of traffic to correct backend set eliminating the need to
201+
# create multiple listeners or load balancers to achieve the same.
202+
oci lb path-route-set create --load-balancer-id $LB_ID \
203+
--name PathRouteSetName \
204+
--path-routes '[{"backendSetName":"backendSetName", "path":"/video", "pathMatchType":{"matchType":"EXACT_MATCH"}}]' \
205+
--wait-for-state SUCCEEDED \
206+
--max-wait-seconds 300
207+
208+
# Now that we have our certificates, backend set and path route set, we can add a listener. We need to specify a backend set which exists (e.g. the one we made)
193209
#
194210
# The valid values for --protocol can be found via "oci lb protocol list"
195211
#
@@ -201,7 +217,8 @@ function create_lb_with_minimum_then_add_related_resources() {
201217
--protocol HTTP \
202218
--ssl-certificate-name my_cert_bundle \
203219
--ssl-verify-depth 3 \
204-
--ssl-verify-peer-certificate false
220+
--ssl-verify-peer-certificate false \
221+
--path-route-set-name PathRouteSetName
205222

206223
# Print out information about the load balancer
207224
oci lb load-balancer get --load-balancer-id $LB_ID
@@ -220,4 +237,4 @@ oci network subnet delete --subnet-id $FIRST_SUBNET_ID --force --wait-for-state
220237
oci network subnet delete --subnet-id $SECOND_SUBNET_ID --force --wait-for-state TERMINATED
221238

222239
# Delete the VCN
223-
oci network vcn delete --vcn-id $VCN_ID --force --wait-for-state TERMINATED
240+
oci network vcn delete --vcn-id $VCN_ID --force --wait-for-state TERMINATED

scripts/create_load_balancer_example/create_load_balancer_all_complex_params_with_comments.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,20 @@
5555
"defaultBackendSetName": "backendSetName",
5656
"port": 8080,
5757
"protocol": "HTTP"
58+
"pathRouteSetName": "PathRouteSetName"
59+
}
60+
},
61+
"pathRouteSets": {
62+
"PathRouteSetName": {
63+
"pathRoutes": [
64+
{
65+
"backendSetName": "backendSetName",
66+
"path": "/video",
67+
"pathMatchType": {
68+
"matchType": "EXACT_MATCH"
69+
}
70+
}
71+
]
5872
}
5973
}
60-
}
74+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
/*
3+
* Each entry in this dictionary represents a path route set which can be used
4+
* by a load balancer. A path route set includes all path route strings and
5+
* matching rules that define the data routing for a particular listener.
6+
*/
7+
"PathRouteSetName": {
8+
/* A path route is a string that the Load Balancing service matches against
9+
* an incoming URI to determine the appropriate destination backend set. A
10+
* path route rule consists of a path route string and a pattern match type.
11+
*/
12+
/* For more information about each attribute and the feature, refer this link:
13+
* https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm#path
14+
*/
15+
"pathRoutes": [
16+
{
17+
// The backend set to which the traffic should be routed
18+
"backendSetName": "backendSetName",
19+
// The path string to be used for matching with the incoming HTTP/HTTPS URI
20+
// The unique part of the URI e.g. /video, /data, etc.
21+
"path": "/video",
22+
// Rule match type. Pick one option from below link:
23+
// https://docs.us-phoenix-1.oraclecloud.com/api/#/en/loadbalancer/20170115/requests/PathMatchType
24+
"pathMatchType": {
25+
"matchType": "EXACT_MATCH"
26+
}
27+
}
28+
]
29+
}
30+
// Uncomment the below (and change information as needed) to add another path
31+
// route set when creating the load balancer. You could copy it as many times
32+
// as necessary to add all the path route stes you need
33+
/*
34+
, "PathRouteSetName2": {
35+
// A path route set can have more than one path routes. A maximum of 20 are allowed.
36+
"pathRoutes": [
37+
{
38+
"backendSetName": "mySecondBackendSetName",
39+
"path": "/cgi",
40+
"pathMatchType": {
41+
"matchType": "FORCE_LONGEST_PREFIX_MATCH"
42+
}
43+
},
44+
{
45+
"backendSetName": "myThirdBackendSetName",
46+
"path": "/data",
47+
"pathMatchType": {
48+
"matchType": "SUFFIX_MATCH"
49+
}
50+
}
51+
]
52+
}
53+
*/
54+
}

0 commit comments

Comments
 (0)