-
Notifications
You must be signed in to change notification settings - Fork 6
Conversation
|
||
content = ''.join(tracebacks) | ||
|
||
with NamedTemporaryFile(prefix="senza-traceback-", delete=False) as error_file: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
senza?
Please add tests. |
'''Request SSH access to a single host''' | ||
|
||
if interactive: | ||
ec2 = boto3.resource('ec2') | ||
reservations = ec2.instances.filter( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to add paging support here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or maybe not (?) --- I usually use the low-level "clients"
@hjacobs thanks for all the suggestions, I find them reasonable and will be done next. I had tests in mind but wanted to make sure about the implementation first. |
@hjacobs tests pass in my local computer (tried with Python 3.4.x and 3.5.x) but seems stuck in Travis CI. Would you mind taking a look to that as well as the rest of the code? On the other hand, seems that resources handle pagination for you:
|
@@ -280,8 +280,8 @@ def request_access(obj, host, reason, reason_cont, user, password, even_url, odd | |||
|
|||
|
|||
def request_access_interactive(): | |||
region_name = click.prompt('AWS region', default=os.getenv('PIU_REGION') or | |||
subprocess.getoutput('aws configure get region')) | |||
region_name = os.getenv('PIU_REGION') or click.prompt('AWS region', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohoh, please check how Senza does it: AWS_DEFAULT_REGION
and ~/.aws/config
is honored
@hjacobs done, is this better? |
@tuxlife any opinion on this? |
@outime Why did you need a interactive mode? |
@tuxlife it's much more comfortable to use Più this way since you don't have to look up for the private IP of the instance with Senza, copy it, then execute Più, etc. Here you get a list of instances for the specified region and choose the one you want easily without caring about IP addresses. I use it with the On the other hand, I've met some Zalando folks who are using a custom wrapper with similar functionality. I also use one. It feels natural to have this feature built-in to have similar workflow. |
👍 |
1 similar comment
👍 |
Will submit PR for docs when the newer package is published :) |
Could any of the maintainers update the PyPI package whenever you have some time? I've also written some docs: zalando-stups/documentation#89 |
@outime this just does not work on Travis nor our CD:
|
@hjacobs I was on holidays so I couldn't check this. Now I see it's fixed (thanks @mikkeloscar) so hopefully the package can now be updated. |
No description provided.