Skip to content

Commit fabed1e

Browse files
authored
Releasing version 2.4.16 (#42)
1 parent 67b1062 commit fabed1e

File tree

114 files changed

+4272
-245
lines changed

Some content is hidden

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

114 files changed

+4272
-245
lines changed

CHANGELOG.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ 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.16 - 2018-02-08
11+
---------------------
12+
Added
13+
~~~~~~~~~~
14+
* Support for Domain Name System Service (oci dns)
15+
* An example on using the Domain Name System Service can be found on `GitHub <https://github.com/oracle/oci-cli/blob/master/scripts/dns_example.sh>`_.
16+
* Support for Reserved Public IPs in Virtual Networking Service (oci network public-ip)
17+
* Support for the following features in Block Storage Service
18+
* Automated and policy-based scheduled backups (oci bv volume-backup-policy | volume-backup-policy-assignment)
19+
* Read-only volume attachments (--is-read-only option while attaching volume)
20+
* Incremental backups (--type option while creating a volume backup)
21+
1022
2.4.15 - 2018-01-25
1123
---------------------
1224
Added

LICENSE.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
1+
Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
22

33
This software is dual-licensed to you under the Universal Permissive License (UPL) and Apache License 2.0. See below for license terms. You may choose either license, or both.
44
____________________________
55
The Universal Permissive License (UPL), Version 1.0
6-
Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
6+
Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
77

88
Subject to the condition set forth below, permission is hereby granted to any person obtaining a copy of this software, associated documentation and/or data (collectively the "Software"), free of charge and under any and all copyright rights in the Software, and any and all patent rights owned or freely licensable by each licensor hereunder covering either (i) the unmodified Software as contributed to or provided by such licensor, or (ii) the Larger Works (as defined below), to deal in both
99

@@ -19,7 +19,7 @@ The above copyright notice and either this complete permission notice or at a mi
1919
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2020

2121
The Apache Software License, Version 2.0
22-
Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
22+
Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2323

2424
Licensed under the Apache License, Version 2.0 (the "License"); You may not use this product except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. A copy of the license is also reproduced below. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
2525

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ __ https://github.com/oracle/oci-cli
9393

9494
License
9595
=======
96-
Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
96+
Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
9797

9898
This SDK and sample is dual licensed under the Universal Permissive License 1.0 and the Apache License 2.0.
9999

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.13
15+
oci==1.3.14
1616
packaging==16.8
1717
pluggy==0.4.0
1818
py==1.4.33

scripts/basic_cli_test_script.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/bin/bash
2+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
3+
24
set -e
35

46
# Runs a few commands. If you don't see Success at the end, then something's wrong.

scripts/dns_example.sh

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
#!/bin/bash
2+
# This script provides a basic example of how to use the DNS service in the CLI. The two variables at the beginning of the script must be specified accordingly:
3+
#
4+
# * COMPARTMENT_ID: The first argument is the OCID of the compartment where we'll create a DNS zone
5+
# * DNS_ZONE_NAME: The second is the name of the DNS zone to create (e.g. my-example-zone.com)
6+
#
7+
# Requirements for running this script:
8+
# - OCI CLI v2.4.16 or later (you can check this by running oci --version)
9+
10+
set -e
11+
12+
COMPARTMENT_ID=""
13+
DNS_ZONE_NAME=""
14+
15+
BORDER="=========================================="
16+
17+
function print_header() {
18+
echo $BORDER
19+
echo $1
20+
echo $BORDER
21+
}
22+
23+
echo "Creating DNS zone: $DNS_ZONE_NAME"
24+
oci dns zone create -c $COMPARTMENT_ID --zone-type PRIMARY --name $DNS_ZONE_NAME
25+
26+
ZONE_ID=$(oci dns zone get --zone-name-or-id $DNS_ZONE_NAME --raw-output --query 'data.id')
27+
echo "ZONE ID: $ZONE_ID"
28+
29+
# list all zones
30+
print_header "List all zones"
31+
oci dns zone list -c $C_CLI
32+
33+
# We can also provide filter conditions and sort order to the list_zones operation. Here we filter based
34+
# on an exact name match and filter by the time the zone was created descending
35+
print_header "List all zones with sort and filter"
36+
oci dns zone list -c $C_CLI --name $DNS_ZONE_NAME --sort-by timeCreated --sort-order DESC
37+
38+
# We can update records in the zone. This will overwrite any existing records so if there are items
39+
# we wish to keep (e.g. the NS records in the zone) we need to read those out first and make
40+
# sure they are included in the update.
41+
#
42+
# Downloading the existing collection, editing it, and calling update is not easy from the command line so
43+
# we strongly recommend using the 'patch' functionality shown below to add / update / delete records. If
44+
# you really want to use update, you can see an example in tests/test_dns.py::test_update_zone_records
45+
46+
# In addition to updates, we can use the patch operation to add and remove records from the zone without
47+
# having to send through the complete list of records each time. In this example, we'll add 2 TXT records and
48+
# remove one
49+
print_header "Original Zone Records"
50+
oci dns record zone get -c $C_CLI --zone-name-or-id $DNS_ZONE_NAME
51+
52+
RECORD_OPERATIONS_TEMPLATE=$(cat dns_example/add_add_record_operations_template.json)
53+
RECORD_OPERATIONS=$(sed s/__DNS_ZONE_NAME__/$DNS_ZONE_NAME/g <<< $RECORD_OPERATIONS_TEMPLATE)
54+
echo $RECORD_OPERATIONS > "dns_example/add_add_record_operations.json"
55+
56+
echo "Patching zone records..."
57+
oci dns record zone patch --zone-name-or-id $DNS_ZONE_NAME --items file://dns_example/add_add_record_operations.json > /dev/null 2>&1
58+
59+
print_header "List patched zone records filtered to only TXT records (newly added ones)"
60+
oci dns record zone get -c $C_CLI --zone-name-or-id $DNS_ZONE_NAME --rtype TXT
61+
62+
# the example input template files have __DNS_ZONE_NAME__ in them which needs to be replaced with the real DNS_ZONE_NAME
63+
RECORD_OPERATIONS_TEMPLATE=$(cat dns_example/remove_record_operation_template.json)
64+
RECORD_OPERATIONS=$(sed s/__DNS_ZONE_NAME__/$DNS_ZONE_NAME/g <<< $RECORD_OPERATIONS_TEMPLATE)
65+
echo $RECORD_OPERATIONS > "dns_example/remove_record_operation.json"
66+
67+
echo "Patching zone records to remove one with rdata 'Some test data'..."
68+
oci dns record zone patch --zone-name-or-id $DNS_ZONE_NAME --items file://dns_example/remove_record_operation.json > /dev/null 2>&1
69+
70+
print_header "List patched zone records filtered to only TXT records (now there is only one)"
71+
oci dns record zone get -c $C_CLI --zone-name-or-id $DNS_ZONE_NAME --rtype TXT
72+
73+
# As part of patch operations, we can also specify preconditions (REQUIRE - data must be present, and
74+
# PROHIBIT - data must not be present) which must be met for the operation to succeed
75+
# This first example checks that there is no A record for subdomain testdomain1.$DNS_ZONE_NAME, and then adds one
76+
RECORD_OPERATIONS_TEMPLATE=$(cat dns_example/prohibit_if_present_then_add_record_template.json)
77+
RECORD_OPERATIONS=$(sed s/__DNS_ZONE_NAME__/$DNS_ZONE_NAME/g <<< $RECORD_OPERATIONS_TEMPLATE)
78+
echo $RECORD_OPERATIONS > "dns_example/prohibit_if_present_then_add_record.json"
79+
80+
echo 'Patching zone records with PROHIBIT precondition...'
81+
oci dns record zone patch --zone-name-or-id $DNS_ZONE_NAME --items file://dns_example/prohibit_if_present_then_add_record.json
82+
83+
print_header "List patched zone records filtered to only A records (now there is one)"
84+
oci dns record zone get -c $C_CLI --zone-name-or-id $DNS_ZONE_NAME --rtype A
85+
86+
# we expect this next command to return an error so dont quit the script
87+
set +e
88+
89+
# Run the same patch operation again, and this time we expect it to fail because the record in the PROHIBIT precondition *does* exist
90+
echo 'Repeating same patch with PROHIBIT precondition, which now fails because the record exists...'
91+
oci dns record zone patch --zone-name-or-id $DNS_ZONE_NAME --items file://dns_example/prohibit_if_present_then_add_record.json
92+
set -e
93+
94+
echo "Deleting DNS zone: $DNS_ZONE_NAME"
95+
oci dns zone delete --zone-name-or-id $DNS_ZONE_NAME --force
96+
97+
# clean up temporary files
98+
rm dns_example/add_add_record_operations.json
99+
rm dns_example/remove_record_operation.json
100+
rm dns_example/prohibit_if_present_then_add_record.json
101+
102+
echo "SUCCESS"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[
2+
{
3+
"domain": "__DNS_ZONE_NAME__",
4+
"isProtected": true,
5+
"operation": "ADD",
6+
"rdata": "Patch test data",
7+
"rtype": "TXT",
8+
"ttl": 300
9+
},
10+
{
11+
"domain": "__DNS_ZONE_NAME__",
12+
"isProtected": true,
13+
"operation": "ADD",
14+
"rdata": "Some more test patch data",
15+
"rtype": "TXT",
16+
"ttl": 300
17+
}
18+
]
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[
2+
{
3+
"domain": "__DNS_ZONE_NAME__",
4+
"operation": "PROHIBIT",
5+
"rtype": "A",
6+
"ttl": 300
7+
},
8+
{
9+
"domain": "__DNS_ZONE_NAME__",
10+
"isProtected": true,
11+
"operation": "ADD",
12+
"rdata": "127.0.0.1",
13+
"rtype": "A",
14+
"ttl": 300
15+
}
16+
]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[
2+
{
3+
"domain": "__DNS_ZONE_NAME__",
4+
"operation": "REMOVE",
5+
"rdata": "\"Patch\" \"test\" \"data\"",
6+
"rtype": "TXT",
7+
"ttl": 300
8+
}
9+
]

scripts/install/install.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
22

33
<#
44
.DESCRIPTION

0 commit comments

Comments
 (0)