-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored IAM Controller so that roles and policies get their own st…
…ack. This resolves dependency problems.
- Loading branch information
Showing
14 changed files
with
578 additions
and
417 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import click | ||
import sys | ||
from aim.core.exception import StackException | ||
from aim.commands.helpers import pass_aim_context, controller_args, aim_home_option, init_aim_home_option | ||
|
||
@click.command('shell', short_help='Open a shell to an instance.') | ||
@click.argument("netenv_id", required=True, type=click.STRING) | ||
@click.argument("env_id", required=True, type=click.STRING) | ||
@click.argument("region", required=True, type=click.STRING) | ||
@click.argument("instance_ref", required=True, type=click.STRING) | ||
@aim_home_option | ||
@pass_aim_context | ||
def shell_command(aim_ctx, netenv_id, env_id, region, instance_ref, home='.'): | ||
"""Open a shell to an instance""" | ||
|
||
init_aim_home_option(aim_ctx, home) | ||
if not aim_ctx.home: | ||
print('AIM configuration directory needs to be specified with either --home or AIM_HOME environment variable.') | ||
sys.exit() | ||
|
||
aim_ctx.init_project() | ||
config_arg = { | ||
'netenv_id': netenv_id, | ||
'subenv_id': env_id, | ||
'region' : region, | ||
} | ||
aim_ctx.get_controller('NetEnv', config_arg) | ||
full_ref = 'netenv.ref %s.subenv.%s.%s.%s' % (netenv_id, env_id, region, instance_ref) | ||
aim_ctx.get_ref(full_ref) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.