Skip to content

Commit

Permalink
Releasing version 2.4.6 (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
mross22 authored Aug 11, 2017
1 parent 974e6d8 commit 4f13b7b
Show file tree
Hide file tree
Showing 22 changed files with 1,818 additions and 279 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,28 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a
Changelog <http://keepachangelog.com/>`__.

2.4.6 - 2017-08-10
------------------

Added
~~~~~
- Subcommands to 'bmcs compute image import / export' to allow specifying
source / destination in multiple formats.
- Secondary IP operations ('bmcs network private-ip', 'bmcs network vnic
assign/unassign-private-ip').
- '-h' alias for global '--help' option (https://github.com/oracle/bmcs-cli/issues/6)

Fixed
~~~~~
- 'bmcs os object put' accepts input from stdin (https://github.com/oracle/bmcs-cli/issues/7)
- 'bmcs compute image export' successfully exports image (https://github.com/oracle/bmcs-cli/issues/4)

Changed
~~~~~~~
- Upgraded cryptography dependency to 1.8.2 (https://github.com/oracle/bmcs-cli/issues/5)
- Deprecated --image-source-details param of 'bmcs compute image create' in
favor of subcommands (see Added section).

2.4.5 - 2017-07-20
------------------

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ certifi==2017.1.23
cffi==1.9.1
click==6.7
configparser==3.5.0
cryptography==1.8.1
cryptography==1.8.2
httpsig-cffi==15.0.0
idna==2.5
ndg-httpsclient==0.4.2
oraclebmc==1.3.5
oraclebmc==1.3.6
packaging==16.8
pluggy==0.4.0
py==1.4.32
Expand Down
5 changes: 5 additions & 0 deletions scripts/basic_cli_test_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ touch $EMPTY_FILE
bmcs $ARGS os object put -ns $NS -bn $BUCKET --name object3 --file $EMPTY_FILE
bmcs $ARGS os object get -ns $NS -bn $BUCKET --name object3 --file -

# Put a file from stdin and get it back
bmcs $ARGS os object put -ns $NS -bn $BUCKET --name object4 --file - <<< "This is some object content"
bmcs $ARGS os object get -ns $NS -bn $BUCKET --name object4 --file - | grep "This is some object content"

# Try a few variations on metadata format.
bmcs $ARGS os object put -ns $NS -bn $BUCKET --name object2 --file $FILE --metadata '{"foo1":"a b c '"'d'"'","foo2": "bar2"}' --force
bmcs $ARGS os object head -ns $NS -bn $BUCKET --name object2 | grep "a b c 'd'"
Expand Down Expand Up @@ -60,6 +64,7 @@ bmcs $ARGS os bucket list -ns $NS --compartment-id $C
bmcs $ARGS os object delete -ns $NS -bn $BUCKET --name object1 --force
bmcs $ARGS os object delete -ns $NS -bn $BUCKET --name object2 --force
bmcs $ARGS os object delete -ns $NS -bn $BUCKET --name object3 --force
bmcs $ARGS os object delete -ns $NS -bn $BUCKET --name object4 --force
bmcs $ARGS os bucket delete -ns $NS --name $BUCKET --force

echo "Success!"
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ def open_relative(*path):


requires = [
'oraclebmc==1.3.5',
'oraclebmc==1.3.6',
'certifi',
'click==6.7',
'configparser==3.5.0',
'cryptography==1.8.1',
'cryptography==1.8.2',
'httpsig_cffi==15.0.0',
'python-dateutil==2.5.3',
'pytz==2016.7',
Expand Down
2 changes: 1 addition & 1 deletion src/oraclebmc_cli/cli_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
@click.option('--endpoint', help='The value to use as the service endpoint, including any required API version path. For example: "https://iaas.us-phoenix-1.oracle.com/20160918". This will override the default service endpoint / API version path. Note: The --region parameter is the recommended way of targeting different regions.')
@click.option('--cert-bundle', help='The full path to a CA certificate bundle to be used for SSL verification. This will override the default CA certificate bundle.')
@click.option('-d', '--debug', is_flag=True, help='Show additional debug information.')
@click.option('-?', '--help', is_flag=True, help='Show this message and exit.')
@click.option('-?', '-h', '--help', is_flag=True, help='Show this message and exit.')
@click.pass_context
def cli(ctx, config_file, profile, request_id, region, endpoint, cert_bundle, debug, help):
# Show help in any case if there are no subcommands, or if the help option
Expand Down
9 changes: 5 additions & 4 deletions src/oraclebmc_cli/cli_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def generate_key_pair(key_name, output_dir, passphrase, passphrase_file, overwri
def generate_bmcs_config():
click.echo(click.wrap_text(text=generate_bmcs_config_instructions, preserve_paragraphs=True))

config_location = click.prompt('Enter a location for your config', default=os.path.join(default_directory, 'config'), value_proc=validate_config_filename)
config_location = click.prompt('Enter a location for your config', default=os.path.join(default_directory, 'config'), value_proc=process_config_filename)
if os.path.exists(config_location):
if not click.confirm('File: {} already exists. Do you want to overwrite?'.format(config_location)):
click.echo(config_generation_canceled_message)
Expand Down Expand Up @@ -308,11 +308,12 @@ def validate_region(region):
return region


def validate_config_filename(filename):
if os.path.isdir(filename):
def process_config_filename(filename):
filename_expanded = os.path.expanduser(filename)
if os.path.isdir(filename_expanded):
raise click.BadParameter("Config location must be a filename not a directory")

return filename
return filename_expanded


def validate_ocid(ocid, pattern):
Expand Down
4 changes: 2 additions & 2 deletions src/oraclebmc_cli/cli_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,11 @@ def help_callback(ctx, param, value):


'''Help option to use for commands.'''
help_option = click.option('-?', '--help', is_flag=True, help='Show this message and exit.', expose_value=False, is_eager=True, callback=help_callback)
help_option = click.option('-?', '-h', '--help', is_flag=True, help='Show this message and exit.', expose_value=False, is_eager=True, callback=help_callback)


'''Help option to use for groups (except for bmcs).'''
help_option_group = click.help_option('-?', '--help', help='Show this message and exit.')
help_option_group = click.help_option('-?', '-h', '--help', help='Show this message and exit.')


def confirmation_callback(ctx, param, value):
Expand Down
Loading

0 comments on commit 4f13b7b

Please sign in to comment.