Skip to content

Commit c40aeef

Browse files
committed
Merge branch 'develop'
2 parents 18fc612 + cc9596f commit c40aeef

18 files changed

+656
-661
lines changed

.appveyor.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ environment:
1818
- TOXENV: py35
1919
- TOXENV: py36
2020
- TOXENV: flake8
21+
- TOXENV: bandit
2122
- TOXENV: readme
2223
cache: .tox
2324
build_script:
2425
- cmd: pip install -e .
2526
test_script:
2627
- cmd: tox
27-
deploy_script:
28+
deploy: off
29+
on_success:
2830
- cmd: >-
2931
echo Test Success
3032

.codeclimate.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.pylintrc

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,7 @@ confidence=INFERENCE_FAILURE
5959
# --enable=similarities". If you want to run only the classes checker, but have
6060
# no Warning level messages displayed, use"--disable=all --enable=classes
6161
# --disable=W"
62-
disable=
63-
64-
#intern-builtin,nonzero-method,parameter-unpacking,backtick,raw_input-builtin,dict-view-method,filter-builtin-not-iterating,long-builtin,unichr-builtin,input-builtin,unicode-builtin,file-builtin
65-
66-
#map-builtin-not-iterating,delslice-method,apply-builtin,cmp-method,setslice-method,coerce-method,long-suffix,raising-string,import-star-module-level,buffer-builtin,reload-builtin,unpacking-in-except,print-statement,hex-method,old-octal-literal,metaclass-assignment,dict-iter-method,range-builtin-not-iterating,using-cmp-argument,indexing-exception,no-absolute-import,coerce-builtin,getslice-method,suppressed-message,execfile-builtin,round-builtin,useless-suppression,reduce-builtin,old-raise-syntax,zip-builtin-not-iterating,cmp-builtin,xrange-builtin,standarderror-builtin,old-division,oct-method,next-method-called,old-ne-operator,basestring-builtin
62+
disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,redefined-builtin,redefined-variable-type,R0204,W0603,W0123,W0612,E0401
6763

6864

6965
[REPORTS]
@@ -189,7 +185,7 @@ max-nested-blocks=5
189185
[FORMAT]
190186

191187
# Maximum number of characters on a single line.
192-
max-line-length=100
188+
max-line-length=79
193189

194190
# Regexp for a line that is allowed to be longer than the limit.
195191
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
@@ -202,7 +198,7 @@ single-line-if-stmt=no
202198
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
203199
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
204200
# `empty-line` allows space-only lines.
205-
no-space-check=trailing-comma,dict-separator
201+
# no-space-check=trailing-comma,dict-separator
206202

207203
# Maximum number of lines in a module
208204
max-module-lines=1000
@@ -289,7 +285,7 @@ generated-members=
289285
[VARIABLES]
290286

291287
# Tells whether we should check for unused import in __init__ files.
292-
init-import=no
288+
init-import=yes
293289

294290
# A regular expression matching the name of dummy variables (i.e. expectedly
295291
# not used).
@@ -348,7 +344,7 @@ max-parents=7
348344
max-attributes=10
349345

350346
# Minimum number of public methods for a class (see R0903).
351-
min-public-methods=1
347+
min-public-methods=0
352348

353349
# Maximum number of public methods for a class (see R0904).
354350
max-public-methods=20

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ matrix:
3333
env: TOXENV=py36
3434
- python: 3.5
3535
env: TOXENV=flake8
36+
- python: 2.7
37+
env: TOXENV=bandit
3638
- python: 2.7
3739
env: TOXENV=readme
3840
- os: osx
@@ -51,4 +53,3 @@ after_success:
5153
- coverage combine
5254
- coverage xml
5355
- python-codacy-coverage -r coverage.xml
54-
- codeclimate-test-reporter

README.rst

Lines changed: 66 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
11
AWS Shortcuts for Command-Line Instance Control
22
===============================================
33

4-
List, start, stop and ssh to AWS instances using Name or Instance-ID
5-
---------------------------------------------------------------------------------
4+
List, start, stop and ssh to AWS instances using Name, ID and Wilcards
5+
----------------------------------------------------------------------
66

77

8-
|TRAVIS| |Code Climate| |GitHub issues| |PyPi release| |lang| |license|
9-
8+
|TRAVIS| |AppVeyor| |Codacy Grade| |Codacy Cov| |PyPi release| |Py ver| |license sm|
109

1110
--------------
1211

13-
AWS Shortcuts (awss) allows listing, starting, stopping and connecting to instances by Name or ID. Future versions will also allow referencing instances with any ``Tag`` : ``Value`` combination.
14-
15-
Note: This utility requires Python 2.7 or newer. There is a similar utility written in Bash called `aws-quick-cli <https://github.com/robertpeteuil/aws-quick-cli>`_.
12+
AWS Shortcuts (awss) allows listing, starting, stopping and connecting to instances by name, instance-id, and supports wilcards. The ``awss list`` command displays every tag & value for each instances along with their status and core info. In the near future you will also be able to use any combination of ``Tag`` : ``Value`` combinations when specifying instances.
1613

1714

1815
Overview
1916
--------
2017

2118
``awss`` has the following sub-commands: ``list``, ``start``, ``stop``, and ``ssh``.
2219

23-
- SSH to an Instance: ``awss ssh NAME`` or ``aws ssh -i ID``
20+
- SSH to an Instance: ``awss ssh NAME`` or ``awss ssh -i ID``
2421

2522
- Additional paramters described in `Details`_.
2623

@@ -31,61 +28,75 @@ Overview
3128
- Start Instance: ``awss start NAME`` or ``awss start -i ID``
3229
- Stop Instance: ``awss stop NAME`` or ``awss stop -i ID``
3330

31+
Example output of ``awss list``
32+
-------------------------------
33+
34+
.. image:: https://cloud.githubusercontent.com/assets/1554603/25595372/6c3bd5e2-2e79-11e7-9ebc-4730f93c2cb6.png
35+
3436
Details
3537
-------
3638

3739
- SSH to Instance: ``awss ssh NAME`` or ``awss ssh -i ID``
3840

39-
- automatically calculates login-name based on the image-type of the instance
41+
- typing ``awss ssh`` without a name or ID will display all running instances
42+
43+
- this allows the user to select from the list if they can't remember the name.
44+
- this can be combined with wilcards, for example ``awss ssh U*`` to display
45+
a list of instances starting with "U" to select from.
46+
47+
- the login-name is automatically calculated based on the image-type of the instance
4048
- override the calculated login-name ``-u USERNAME``
4149
- connect without PEM keys (if properly configured) ``-p``
4250
- command specific help ``awss ssh -h``
4351

4452
- List Instances: ``awss list``
4553

46-
- list all instances (default)
54+
- list all instances (default), or use wilcards ``awss list D*``
4755
- list running instances ``-r`` or ``--running``
4856
- list stopped instances ``-s`` or ``--stopped``
4957
- list instances with specified name ``awss list NAME``
5058
- list instance with specified instance-id ``awss list -i ID``
51-
- state, NAME, and instance-id may be combined in queries
59+
- instance-state and NAME may be combined in queries.
5260

5361
- ex: list instances with NAME currently running: ``awss list NAME -r``
5462

5563
- command specific help ``awss list -h``
5664

5765
- Start Instance: ``awss start NAME`` or ``awss start -i ID``
5866

67+
- typing ``awss start`` without a name or ID will display all stopped instances
68+
69+
- this allows the user to select from the list if they can't remember the name.
70+
- this can be combined with wilcards, for example ``awss start U*`` to display
71+
a list of instances starting with "U" to select from.
72+
5973
- start instance by name or instance-id
6074
- command specific help ``awss start -h``
6175

6276
- Stop Instance: ``awss stop NAME`` or ``awss stop -i ID``
6377

64-
- start instance by name or instance-id
65-
- command specific help ``awss stop -h``
66-
67-
Target Instance Verification
68-
----------------------------
78+
- typing ``awss stop`` without a name or ID will display all running instances
6979

70-
The ``start``, ``stop``, and ``ssh`` commands verify that their action will apply to only one instance
80+
- this allows the user to select from the list if they can't remember the name.
81+
- this can be combined with wilcards, for example ``awss stop U*`` to display
82+
a list of instances starting with "U" to select from.
7183

72-
- This check is performed by looking for other instances that match:
84+
- start instance by name or instance-id
85+
- command specific help ``awss stop -h``
7386

74-
- the instance-specification given (name or ID)
75-
- the running-state appropriate for the command
87+
Target Instance Determination
88+
-----------------------------
7689

77-
- If multiple instances match these conditions, they are listed and the user selects the intended target.
90+
The ``start``, ``stop``, and ``ssh`` commands check if multiple instances match the parameters.
91+
If so, the the matching instances are listed, and the user selects the intended target.
7892

79-
The **running-state** appropriate for each command is as follows:
93+
Example screenshot of selecting instance from list:
8094

81-
- The ``ssh`` command looks for **running** instances (it cannot connect to stopped instanced)
82-
- The ``stop`` command looks for **running** instances (it cannot stop instances that are already stopped)
83-
- The ``start`` command looks for **stopped** instances (it cannot start instances that are already started)
84-
- The ``list`` command looks at all instances, unless optional parameters have been specified to narrow its search to **running**, **stopped** or specific instances.
95+
.. image:: https://cloud.githubusercontent.com/assets/1554603/25595396/84b4ef64-2e79-11e7-922f-d645b007af57.png
8596

8697

87-
Supported Versions & Platforms
88-
------------------------------
98+
Platforms & Python Versions Tested
99+
----------------------------------
89100

90101
Python 2.7, 3.3, 3.4, 3.5, 3.6
91102

@@ -105,17 +116,38 @@ This utility can be installed with ``pip``:
105116
pip install awss
106117
107118
108-
.. |Code Climate| image:: https://codeclimate.com/github/robertpeteuil/aws-shortcuts/badges/gpa.svg?style=flat-square
109-
:target: https://codeclimate.com/github/robertpeteuil/aws-shortcuts
119+
120+
121+
.. |PyPi release| image:: https://img.shields.io/pypi/v/awss.svg
122+
:target: https://pypi.python.org/pypi/awss
123+
124+
.. |Travis| image:: https://travis-ci.org/robertpeteuil/aws-shortcuts.svg?branch=master
125+
:target: https://travis-ci.org/robertpeteuil/aws-shortcuts
126+
127+
.. |AppVeyor| image:: https://ci.appveyor.com/api/projects/status/1meclb632h49sik7/branch/master?svg=true
128+
:target: https://ci.appveyor.com/project/robertpeteuil/aws-shortcuts/branch/master
129+
130+
.. |Codacy Grade| image:: https://api.codacy.com/project/badge/Grade/477279a80d31407a99fb3c3551e066cb
131+
:target: https://www.codacy.com/app/robertpeteuil/aws-shortcuts?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=robertpeteuil/aws-shortcuts&amp;utm_campaign=Badge_Grade
132+
133+
.. |Codacy Cov| image:: https://api.codacy.com/project/badge/Coverage/477279a80d31407a99fb3c3551e066cb
134+
:target: https://www.codacy.com/app/robertpeteuil/aws-shortcuts?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=robertpeteuil/aws-shortcuts&amp;utm_campaign=Badge_Coverage
135+
136+
.. |Py ver| image:: https://img.shields.io/pypi/pyversions/awss.svg
137+
:target: https://pypi.python.org/pypi/bandit/
138+
:alt: Python Versions
139+
140+
.. |license sm| image:: https://img.shields.io/badge/license-MIT-1c64bf.svg?style=flat-square
141+
:target: https://github.com/robertpeteuil/aws-shortcuts
142+
143+
110144
.. |GitHub issues| image:: https://img.shields.io/github/issues/robertpeteuil/aws-shortcuts.svg
111145
:target: https://github.com/robertpeteuil/aws-shortcuts
112146
.. |GitHub release| image:: https://img.shields.io/github/release/robertpeteuil/aws-shortcuts.svg?colorB=1c64bf
113147
:target: https://github.com/robertpeteuil/aws-shortcuts
148+
.. |Code Climate| image:: https://codeclimate.com/github/robertpeteuil/aws-shortcuts/badges/gpa.svg?style=flat-square
149+
:target: https://codeclimate.com/github/robertpeteuil/aws-shortcuts
114150
.. |lang| image:: https://img.shields.io/badge/language-python-3572A5.svg?style=flat-square
115151
:target: https://github.com/robertpeteuil/aws-shortcuts
116152
.. |license| image:: https://img.shields.io/github/license/robertpeteuil/aws-shortcuts.svg?colorB=1c64bf
117153
:target: https://github.com/robertpeteuil/aws-shortcuts
118-
.. |PyPi release| image:: https://img.shields.io/pypi/v/awss.svg
119-
:target: https://pypi.python.org/pypi/awss
120-
.. |Travis| image:: https://travis-ci.org/robertpeteuil/aws-shortcuts.svg?branch=master
121-
:target: https://travis-ci.org/robertpeteuil/aws-shortcuts

0 commit comments

Comments
 (0)