cloudx-proxy 0.4.6__py3-none-any.whl → 0.4.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
cloudx_proxy/_version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.4.6'
21
- __version_tuple__ = version_tuple = (0, 4, 6)
20
+ __version__ = version = '0.4.7'
21
+ __version_tuple__ = version_tuple = (0, 4, 7)
cloudx_proxy/cli.py CHANGED
@@ -56,9 +56,10 @@ def connect(instance_id: str, port: int, profile: str, region: str, ssh_key: str
56
56
  @click.option('--aws-env', help='AWS environment directory (default: ~/.aws, use name of directory in ~/.aws/aws-envs/)')
57
57
  @click.option('--1password', 'use_1password', is_flag=True, help='Use 1Password SSH agent for SSH authentication')
58
58
  @click.option('--instance', help='EC2 instance ID to set up connection for')
59
+ @click.option('--hostname', help='Hostname to use for SSH configuration')
59
60
  @click.option('--yes', 'non_interactive', is_flag=True, help='Non-interactive mode, use default values for all prompts')
60
61
  def setup(profile: str, ssh_key: str, ssh_config: str, aws_env: str, use_1password: bool,
61
- instance: str, non_interactive: bool):
62
+ instance: str, hostname: str, non_interactive: bool):
62
63
  """Set up AWS profile, SSH keys, and configuration for CloudX.
63
64
 
64
65
  This command will:
@@ -72,7 +73,7 @@ def setup(profile: str, ssh_key: str, ssh_config: str, aws_env: str, use_1passwo
72
73
  cloudx-proxy setup --profile myprofile --ssh-key mykey
73
74
  cloudx-proxy setup --ssh-config ~/.ssh/cloudx/config
74
75
  cloudx-proxy setup --1password
75
- cloudx-proxy setup --instance i-0123456789abcdef0 --yes
76
+ cloudx-proxy setup --instance i-0123456789abcdef0 --hostname myserver --yes
76
77
  """
77
78
  try:
78
79
  setup = CloudXSetup(
@@ -101,9 +102,14 @@ def setup(profile: str, ssh_key: str, ssh_config: str, aws_env: str, use_1passwo
101
102
  # Use the --instance parameter if provided, otherwise prompt
102
103
  instance_id = instance or setup.prompt("Enter EC2 instance ID (e.g., i-0123456789abcdef0)")
103
104
 
104
- # Generate a default hostname based on instance ID if we're in non-interactive mode
105
- hostname_default = f"instance-{instance_id[-7:]}" if non_interactive else None
106
- hostname = setup.prompt("Enter hostname for the instance", hostname_default)
105
+ # Use --hostname if provided, otherwise generate default based on instance ID in non-interactive mode
106
+ if hostname:
107
+ # If hostname is explicitly provided, use it directly
108
+ setup.print_status(f"Using provided hostname: {hostname}", True, 2)
109
+ else:
110
+ # Generate default hostname based on instance ID for non-interactive mode
111
+ hostname_default = f"instance-{instance_id[-7:]}" if non_interactive else None
112
+ hostname = setup.prompt("Enter hostname for the instance", hostname_default)
107
113
 
108
114
  # Set up SSH config
109
115
  if not setup.setup_ssh_config(cloudx_env, instance_id, hostname):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: cloudx-proxy
3
- Version: 0.4.6
3
+ Version: 0.4.7
4
4
  Summary: SSH proxy command to connect VSCode with Cloud9/CloudX instance using AWS Systems Manager
5
5
  Author-email: easytocloud <info@easytocloud.com>
6
6
  License: MIT License
@@ -0,0 +1,12 @@
1
+ cloudx_proxy/_1password.py,sha256=uxyCfVvO1eQrOfYRojst_LN2DV4fIwxM5moaQTn3wQY,5853
2
+ cloudx_proxy/__init__.py,sha256=ZZ2O_m9OFJm18AxMSuYJt4UjSuSqyJlYRaZMoets498,61
3
+ cloudx_proxy/_version.py,sha256=B4iv8Iqi5hTu0rpRb0vOS8s24aMK57fNpRACmz-g-2Q,511
4
+ cloudx_proxy/cli.py,sha256=EP1UxY4eotFEIBIU8ullIVc3QulbovxVdG4rLVePRWQ,5306
5
+ cloudx_proxy/core.py,sha256=RF3bX5MQiokRKjYEPnfWdKywGdtoVUvV2xZqm9uOl1g,8135
6
+ cloudx_proxy/setup.py,sha256=QrInbZdghpAYn064h02KmpA9r-nEbVm-LyTcXLxSmXY,39823
7
+ cloudx_proxy-0.4.7.dist-info/LICENSE,sha256=i7P2OR4zsJYsMWcCUDe_B9ZfGi9bU0K5I2nKfDrW_N8,1068
8
+ cloudx_proxy-0.4.7.dist-info/METADATA,sha256=YWtCSIL8xVeA83p6vmVSpbqKg0BZoH1JeAdDYVDg73k,18522
9
+ cloudx_proxy-0.4.7.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
10
+ cloudx_proxy-0.4.7.dist-info/entry_points.txt,sha256=HGt743N2lVlKd7O1qWq3C0aEHyS5PjPnxzDHh7hwtSg,54
11
+ cloudx_proxy-0.4.7.dist-info/top_level.txt,sha256=2wtEote1db21j-VvkCJFfT-dLlauuG5indjggYh3xDg,13
12
+ cloudx_proxy-0.4.7.dist-info/RECORD,,
@@ -1,12 +0,0 @@
1
- cloudx_proxy/_1password.py,sha256=uxyCfVvO1eQrOfYRojst_LN2DV4fIwxM5moaQTn3wQY,5853
2
- cloudx_proxy/__init__.py,sha256=ZZ2O_m9OFJm18AxMSuYJt4UjSuSqyJlYRaZMoets498,61
3
- cloudx_proxy/_version.py,sha256=KTwoycq1UXsZO5AtXG8jzeyeaE1ORqxkwO9Pn0qrlwg,511
4
- cloudx_proxy/cli.py,sha256=VqYdcTn_PC-mhcCpNEa_PcpHjV7vxIDzhfxu-WKlDdU,4904
5
- cloudx_proxy/core.py,sha256=RF3bX5MQiokRKjYEPnfWdKywGdtoVUvV2xZqm9uOl1g,8135
6
- cloudx_proxy/setup.py,sha256=QrInbZdghpAYn064h02KmpA9r-nEbVm-LyTcXLxSmXY,39823
7
- cloudx_proxy-0.4.6.dist-info/LICENSE,sha256=i7P2OR4zsJYsMWcCUDe_B9ZfGi9bU0K5I2nKfDrW_N8,1068
8
- cloudx_proxy-0.4.6.dist-info/METADATA,sha256=LV5xMR7w2qrmcID563IlI83R7X2SOxzcRo_qKLbBa9k,18522
9
- cloudx_proxy-0.4.6.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
10
- cloudx_proxy-0.4.6.dist-info/entry_points.txt,sha256=HGt743N2lVlKd7O1qWq3C0aEHyS5PjPnxzDHh7hwtSg,54
11
- cloudx_proxy-0.4.6.dist-info/top_level.txt,sha256=2wtEote1db21j-VvkCJFfT-dLlauuG5indjggYh3xDg,13
12
- cloudx_proxy-0.4.6.dist-info/RECORD,,