Skip to content

Commit 5e95677

Browse files
authored
Merge pull request #51 from oracle/release_2018-03-08
Releasing version 2.4.18
2 parents 815b576 + b13deb5 commit 5e95677

26 files changed

+1230
-82
lines changed

CHANGELOG.rst

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,55 @@ 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.18 - 2018-03-08
11+
---------------------
12+
Added
13+
~~~~~~~~~~
14+
* Support for the Email Service. (``oci email``)
15+
16+
* A sample test using the email feature can be found on `Github <https://github.com/oracle/oci-cli/blob/master/tests/test_email.py>`_
17+
18+
* Support for the following features in the Core Services:
19+
20+
* paravirtualized volume attachments (--type option for ``oci compute volume-attachment attach``)
21+
* variable size boot volumes (--boot-volume-size-in-gbs option for ``oci compute instance launch``)
22+
23+
* Support for auto-pagination for the Domain Name System Service. (--all, --page-size options for ``oci dns record domain get``, ``oci dns record rrset get``, ``oci dns record zone get``)
24+
* Support for no-overwrite flag for the object put operation for the Object Service (--no-overwrite for ``oci os object put``).
25+
26+
Fixed
27+
~~~~~~~~~~
28+
* Updated config / key file permissions logic on Windows to depend on well known SIDs instead of account / group name to
29+
fix localization issues. This affects ``oci setup config``, ``oci setup repair-file-permissions``, and the general
30+
config / key file permissions check performed by other commands.
31+
1032
2.4.17 - 2018-02-22
1133
---------------------
1234
Added
1335
~~~~~~~~~~
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
36+
* Support for the File Storage Service. (``oci fs``)
37+
* 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``)
38+
* Tagging support for *Bucket* resources in the Object Storage Service
39+
1740
* Create a bucket with tags: ``oci os bucket create --defined-tags --freeform-tags``
1841
* Update a bucket with tags: ``oci os bucket update --defined-tags --freeform-tags``
1942
* 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``)
43+
44+
* Support for specifying a restore period for archived objects in the *RestoreObjects* operation of the Object Storage service. (``oci os object restore --hours``)
45+
* Support for filtering by *backupId* in *ListDbSystems* operation in the Database Service (``oci db system list --backup-id``)
46+
* 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``)
2347

2448
2.4.16 - 2018-02-08
2549
---------------------
2650
Added
2751
~~~~~~~~~~
2852
* Support for Domain Name System Service (oci dns)
53+
2954
* 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>`_.
55+
3056
* Support for Reserved Public IPs in Virtual Networking Service (oci network public-ip)
3157
* Support for the following features in Block Storage Service
58+
3259
* Automated and policy-based scheduled backups (oci bv volume-backup-policy | volume-backup-policy-assignment)
3360
* Read-only volume attachments (--is-read-only option while attaching volume)
3461
* Incremental backups (--type option while creating a volume backup)

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

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def open_relative(*path):
3030

3131

3232
requires = [
33-
'oci==1.3.15',
33+
'oci==1.3.16',
3434
'arrow==0.10.0',
3535
'certifi',
3636
'click==6.7',

src/oci_cli/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from .generated import compute_cli # noqa: F401
1212
from .generated import database_cli # noqa: F401
1313
from .generated import dns_cli # noqa: F401
14+
from .generated import email_cli # noqa: F401
1415
from .generated import filestorage_cli # noqa: F401
1516
from .generated import identity_cli # noqa: F401
1617
from .generated import loadbalancer_cli # noqa: F401
@@ -24,6 +25,7 @@
2425
from . import dns_cli_extended # noqa: F401
2526
from . import identity_cli_extended # noqa: F401
2627
from . import objectstorage_cli_extended # noqa: F401
28+
from . import email_cli_extended # noqa: F401
2729
from . import filestorage_cli_extended # noqa: F401
2830
from . import file_filters # noqa: F401
2931
from . import final_command_processor # noqa: F401

src/oci_cli/bin/OciTabExpansion.ps1

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

33
$ociTopLevelCommands = @(
4-
'audit', 'bv', 'compute', 'db', 'dns', 'fs', 'iam', 'lb', 'network', 'os', 'setup'
4+
'audit', 'bv', 'compute', 'db', 'dns', 'email', 'fs', 'iam', 'lb', 'network', 'os', 'setup'
55
)
66

77
$ociSubcommands = @{
@@ -46,6 +46,9 @@ $ociSubcommands = @{
4646
'dns record rrset' = 'delete get patch update'
4747
'dns record zone' = 'get patch update'
4848
'dns zone' = 'create delete get list update'
49+
'email' = 'sender suppression'
50+
'email sender' = 'create delete get list'
51+
'email suppression' = 'create delete get list'
4952
'fs' = 'export export-set file-system mount-target snapshot'
5053
'fs export' = 'create delete get list'
5154
'fs export-set' = 'get list update'
@@ -155,7 +158,7 @@ $ociCommandsToLongParams = @{
155158
'compute instance detach-vnic' = 'compartment-id force from-json help max-wait-seconds vnic-id wait-for-state wait-interval-seconds'
156159
'compute instance get' = 'from-json help instance-id'
157160
'compute instance get-windows-initial-creds' = 'from-json help instance-id'
158-
'compute instance launch' = 'assign-public-ip availability-domain compartment-id defined-tags display-name extended-metadata freeform-tags from-json help hostname-label image-id ipxe-script-file max-wait-seconds metadata private-ip shape skip-source-dest-check source-boot-volume-id source-details ssh-authorized-keys-file subnet-id user-data-file vnic-display-name wait-for-state wait-interval-seconds'
161+
'compute instance launch' = 'assign-public-ip availability-domain boot-volume-size-in-gbs compartment-id defined-tags display-name extended-metadata freeform-tags from-json help hostname-label image-id ipxe-script-file max-wait-seconds metadata private-ip shape skip-source-dest-check source-boot-volume-id source-details ssh-authorized-keys-file subnet-id user-data-file vnic-display-name wait-for-state wait-interval-seconds'
159162
'compute instance list' = 'all availability-domain compartment-id display-name from-json help lifecycle-state limit page page-size sort-by sort-order'
160163
'compute instance list-vnics' = 'all from-json help instance-id limit page page-size'
161164
'compute instance terminate' = 'force from-json help if-match instance-id max-wait-seconds preserve-boot-volume wait-for-state wait-interval-seconds'
@@ -213,21 +216,29 @@ $ociCommandsToLongParams = @{
213216
'db system-shape list' = 'all availability-domain compartment-id from-json help limit page page-size'
214217
'db version list' = 'all compartment-id db-system-shape from-json help limit page page-size'
215218
'dns record domain delete' = 'compartment-id domain force from-json help if-match if-unmodified-since zone-name-or-id'
216-
'dns record domain get' = 'compartment-id domain from-json help if-modified-since if-none-match limit page rtype sort-by sort-order zone-name-or-id zone-version'
219+
'dns record domain get' = 'all compartment-id domain from-json help if-modified-since if-none-match limit page page-size rtype sort-by sort-order zone-name-or-id zone-version'
217220
'dns record domain patch' = 'compartment-id domain from-json help if-match if-unmodified-since items zone-name-or-id'
218221
'dns record domain update' = 'compartment-id domain force from-json help if-match if-unmodified-since items zone-name-or-id'
219222
'dns record rrset delete' = 'compartment-id domain force from-json help if-match if-unmodified-since rtype zone-name-or-id'
220-
'dns record rrset get' = 'compartment-id domain from-json help if-modified-since if-none-match limit page rtype zone-name-or-id zone-version'
223+
'dns record rrset get' = 'all compartment-id domain from-json help if-modified-since if-none-match limit page page-size rtype zone-name-or-id zone-version'
221224
'dns record rrset patch' = 'compartment-id domain from-json help if-match if-unmodified-since items rtype zone-name-or-id'
222225
'dns record rrset update' = 'compartment-id domain force from-json help if-match if-unmodified-since items rtype zone-name-or-id'
223-
'dns record zone get' = 'compartment-id domain domain-contains from-json help if-modified-since if-none-match limit page rtype sort-by sort-order zone-name-or-id zone-version'
226+
'dns record zone get' = 'all compartment-id domain domain-contains from-json help if-modified-since if-none-match limit page page-size rtype sort-by sort-order zone-name-or-id zone-version'
224227
'dns record zone patch' = 'compartment-id from-json help if-match if-unmodified-since items zone-name-or-id'
225228
'dns record zone update' = 'compartment-id force from-json help if-match if-unmodified-since items zone-name-or-id'
226229
'dns zone create' = 'compartment-id external-masters from-json help max-wait-seconds name wait-for-state wait-interval-seconds zone-type'
227230
'dns zone delete' = 'compartment-id force from-json help if-match if-unmodified-since max-wait-seconds wait-for-state wait-interval-seconds zone-name-or-id'
228231
'dns zone get' = 'compartment-id from-json help if-modified-since if-none-match zone-name-or-id'
229232
'dns zone list' = 'all compartment-id from-json help lifecycle-state limit name name-contains page page-size sort-by sort-order time-created-greater-than-or-equal-to time-created-less-than zone-type'
230233
'dns zone update' = 'compartment-id external-masters force from-json help if-match if-unmodified-since max-wait-seconds wait-for-state wait-interval-seconds zone-name-or-id'
234+
'email sender create' = 'compartment-id email-address from-json help max-wait-seconds wait-for-state wait-interval-seconds'
235+
'email sender delete' = 'force from-json help max-wait-seconds sender-id wait-for-state wait-interval-seconds'
236+
'email sender get' = 'from-json help sender-id'
237+
'email sender list' = 'all compartment-id email-address from-json help lifecycle-state limit page page-size sort-by sort-order'
238+
'email suppression create' = 'compartment-id email-address from-json help'
239+
'email suppression delete' = 'force from-json help suppression-id'
240+
'email suppression get' = 'from-json help suppression-id'
241+
'email suppression list' = 'all compartment-id email-address from-json help limit page page-size sort-by sort-order time-created-greater-than-or-equal-to time-created-less-than'
231242
'fs export create' = 'export-set-id file-system-id from-json help max-wait-seconds path wait-for-state wait-interval-seconds'
232243
'fs export delete' = 'export-id force from-json help if-match max-wait-seconds wait-for-state wait-interval-seconds'
233244
'fs export get' = 'export-id from-json help'
@@ -430,7 +441,7 @@ $ociCommandsToLongParams = @{
430441
'os object get' = 'bucket-name file from-json help if-match if-none-match multipart-download-threshold name namespace parallel-download-count part-size range'
431442
'os object head' = 'bucket-name from-json help if-match if-none-match name namespace'
432443
'os object list' = 'all bucket-name delimiter end fields from-json help limit namespace page-size prefix start'
433-
'os object put' = 'bucket-name content-encoding content-language content-md5 content-type disable-parallel-uploads file force from-json help if-match metadata name namespace no-multipart parallel-upload-count part-size'
444+
'os object put' = 'bucket-name content-encoding content-language content-md5 content-type disable-parallel-uploads file force from-json help if-match metadata name namespace no-multipart no-overwrite parallel-upload-count part-size'
434445
'os object rename' = 'bucket bucket-name from-json help name namespace namespace-name new-if-match new-if-none-match new-name new-obj-if-match-e-tag new-obj-if-none-match-e-tag source-name src-if-match src-obj-if-match-e-tag'
435446
'os object restore' = 'bucket from-json help hours name namespace'
436447
'os object restore-status' = 'bucket-name from-json help name namespace'
@@ -568,6 +579,14 @@ $ociCommandsToShortParams = @{
568579
'dns zone get' = '? c h'
569580
'dns zone list' = '? c h'
570581
'dns zone update' = '? c h'
582+
'email sender create' = '? c h'
583+
'email sender delete' = '? h'
584+
'email sender get' = '? h'
585+
'email sender list' = '? c h'
586+
'email suppression create' = '? c h'
587+
'email suppression delete' = '? h'
588+
'email suppression get' = '? h'
589+
'email suppression list' = '? c h'
571590
'fs export create' = '? h'
572591
'fs export delete' = '? h'
573592
'fs export get' = '? h'

src/oci_cli/cli.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from .generated import compute_cli # noqa: F401
1010
from .generated import database_cli # noqa: F401
1111
from .generated import dns_cli # noqa: F401
12+
from .generated import email_cli # noqa: F401
1213
from .generated import filestorage_cli # noqa: F401
1314
from .generated import identity_cli # noqa: F401
1415
from .generated import loadbalancer_cli # noqa: F401
@@ -19,6 +20,7 @@
1920
from . import core_cli_extended # noqa: F401
2021
from . import database_cli_extended # noqa: F401
2122
from . import dns_cli_extended # noqa: F401
23+
from . import email_cli_extended # noqa: F401
2224
from . import filestorage_cli_extended # noqa: F401
2325
from . import identity_cli_extended # noqa: F401
2426
from . import lb_cli_extended # noqa: F401

src/oci_cli/cli_clients.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from oci.core import VirtualNetworkClient
99
from oci.database import DatabaseClient
1010
from oci.dns import DnsClient
11+
from oci.email import EmailClient
1112
from oci.file_storage import FileStorageClient
1213
from oci.identity import IdentityClient
1314
from oci.load_balancer import LoadBalancerClient
@@ -19,6 +20,7 @@
1920
"compute": ComputeClient,
2021
"database": DatabaseClient,
2122
"dns": DnsClient,
23+
"email": EmailClient,
2224
"file_storage": FileStorageClient,
2325
"identity": IdentityClient,
2426
"load_balancer": LoadBalancerClient,
@@ -31,6 +33,7 @@
3133
"core": oci.core.models.core_type_mapping,
3234
"database": oci.database.models.database_type_mapping,
3335
"dns": oci.dns.models.dns_type_mapping,
36+
"email": oci.email.models.email_type_mapping,
3437
"file_storage": oci.file_storage.models.file_storage_type_mapping,
3538
"identity": oci.identity.models.identity_type_mapping,
3639
"load_balancer": oci.load_balancer.models.load_balancer_type_mapping,

src/oci_cli/cli_setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,17 +447,18 @@ def apply_user_only_access_permissions(path):
447447
# - thus if the user elects to place a new file (config or key) in an existing directory, we will not change the
448448
# permissions of that directory but will explicitly set the permissions on that file
449449
username = os.environ['USERNAME']
450+
admin_grp = '*S-1-5-32-544'
451+
system_usr = '*S-1-5-18'
450452
try:
451453
if os.path.isfile(path):
452454
subprocess.check_output('icacls "{path}" /reset'.format(path=path), stderr=subprocess.STDOUT)
453-
subprocess.check_output('icacls "{path}" /inheritance:r /grant:r {username}:F /grant Administrators:F /grant System:F'.format(path=path, username=username), stderr=subprocess.STDOUT)
455+
subprocess.check_output('icacls "{path}" /inheritance:r /grant:r {username}:F /grant {admin_grp}:F /grant {system_usr}:F'.format(path=path, username=username, admin_grp=admin_grp, system_usr=system_usr), stderr=subprocess.STDOUT)
454456
else:
455457
if os.listdir(path):
456458
# safety check to make sure we aren't changing permissions of existing files
457459
raise RuntimeError("Failed attempting to set permissions on existing folder that is not empty.")
458-
459460
subprocess.check_output('icacls "{path}" /reset'.format(path=path), stderr=subprocess.STDOUT)
460-
subprocess.check_output('icacls "{path}" /inheritance:r /grant:r {username}:(OI)(CI)F /grant:r Administrators:(OI)(CI)F /grant:r System:(OI)(CI)F'.format(path=path, username=username), stderr=subprocess.STDOUT)
461+
subprocess.check_output('icacls "{path}" /inheritance:r /grant:r {username}:(OI)(CI)F /grant:r {admin_grp}:(OI)(CI)F /grant:r {system_usr}:(OI)(CI)F'.format(path=path, username=username, admin_grp=admin_grp, system_usr=system_usr), stderr=subprocess.STDOUT)
461462

462463
except subprocess.CalledProcessError as exc_info:
463464
print("Error occurred while attempting to set permissions for {path}: {exception}".format(path=path, exception=str(exc_info)))

0 commit comments

Comments
 (0)