cloudx-proxy 0.3.7__tar.gz → 0.3.9__tar.gz

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.
Files changed (22) hide show
  1. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/CHANGELOG.md +14 -0
  2. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/PKG-INFO +1 -1
  3. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/cloudx_proxy/_version.py +2 -2
  4. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/cloudx_proxy/setup.py +17 -42
  5. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/cloudx_proxy.egg-info/PKG-INFO +1 -1
  6. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/.github/workflows/release.yml +0 -0
  7. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/.gitignore +0 -0
  8. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/.releaserc +0 -0
  9. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/CONTRIBUTING.md +0 -0
  10. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/LICENSE +0 -0
  11. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/README.md +0 -0
  12. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/cloudx_proxy/__init__.py +0 -0
  13. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/cloudx_proxy/cli.py +0 -0
  14. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/cloudx_proxy/core.py +0 -0
  15. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/cloudx_proxy.egg-info/SOURCES.txt +0 -0
  16. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/cloudx_proxy.egg-info/dependency_links.txt +0 -0
  17. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/cloudx_proxy.egg-info/entry_points.txt +0 -0
  18. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/cloudx_proxy.egg-info/requires.txt +0 -0
  19. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/cloudx_proxy.egg-info/top_level.txt +0 -0
  20. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/package.json +0 -0
  21. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/pyproject.toml +0 -0
  22. {cloudx_proxy-0.3.7 → cloudx_proxy-0.3.9}/setup.cfg +0 -0
@@ -1,3 +1,17 @@
1
+ ## [0.3.9](https://github.com/easytocloud/cloudX-proxy/compare/v0.3.8...v0.3.9) (2025-02-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * use ssm for ec2 operations ([e227818](https://github.com/easytocloud/cloudX-proxy/commit/e2278184b443c4051aa355745985543757d980a3))
7
+
8
+ ## [0.3.8](https://github.com/easytocloud/cloudX-proxy/compare/v0.3.7...v0.3.8) (2025-02-11)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * profile use for ec2 operations ([3b0c23f](https://github.com/easytocloud/cloudX-proxy/commit/3b0c23f6e6fd2b782ed3e17a8606133435d8f676))
14
+
1
15
  ## [0.3.7](https://github.com/easytocloud/cloudX-proxy/compare/v0.3.6...v0.3.7) (2025-02-11)
2
16
 
3
17
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: cloudx-proxy
3
- Version: 0.3.7
3
+ Version: 0.3.9
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
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.3.7'
16
- __version_tuple__ = version_tuple = (0, 3, 7)
15
+ __version__ = version = '0.3.9'
16
+ __version_tuple__ = version_tuple = (0, 3, 9)
@@ -371,35 +371,26 @@ Host cloudx-{cloudx_env}-{hostname}
371
371
  ssm = session.client('ssm')
372
372
  ec2 = session.client('ec2')
373
373
 
374
- # First check if instance exists and its power state
375
- try:
376
- response = ec2.describe_instances(InstanceIds=[instance_id])
377
- if not response['Reservations']:
378
- self.print_status("Instance not found", False, 4)
379
- return False, False, False
380
-
381
- instance = response['Reservations'][0]['Instances'][0]
382
- state = instance['State']['Name']
383
-
384
- if state != 'running':
385
- self.print_status(f"Instance is {state}", False, 4)
386
- return True, False, False
387
- except Exception as e:
388
- self.print_status(f"Error checking instance state: {e}", False, 4)
389
- return False, False, False
390
-
391
- # Now check SSM connectivity
374
+ # Check instance status via SSM
392
375
  try:
393
376
  self.print_status("Checking SSM connectivity...", None, 4)
394
377
  response = ssm.describe_instance_information(
395
378
  Filters=[{'Key': 'InstanceIds', 'Values': [instance_id]}]
396
379
  )
397
- if not response['InstanceInformationList']:
398
- self.print_status("Instance is running but not yet accessible via SSM", False, 4)
399
- self.print_status("This is normal if the instance is still configuring", None, 4)
400
- return True, True, False
380
+ instance_info = response['InstanceInformationList']
381
+ if not instance_info:
382
+ self.print_status("Instance not accessible via SSM", False, 4)
383
+ self.print_status("This could mean the instance is stopped or still configuring", None, 4)
384
+ return True, False, False
385
+
386
+ # Check instance status from SSM
387
+ instance = instance_info[0]
388
+ ping_status = instance.get('PingStatus', '')
389
+ if ping_status != 'Online':
390
+ self.print_status(f"Instance SSM status: {ping_status}", False, 4)
391
+ return True, False, False
401
392
 
402
- self.print_status("SSM connection established", True, 4)
393
+ self.print_status("Instance is running and SSM connection established", True, 4)
403
394
 
404
395
  # Check setup status using SSM command
405
396
  self.print_status("Checking setup status...", None, 4)
@@ -471,25 +462,9 @@ Host cloudx-{cloudx_env}-{hostname}
471
462
  if not start_instance:
472
463
  return False
473
464
 
474
- try:
475
- session = boto3.Session(profile_name=self.profile)
476
- ec2 = session.client('ec2')
477
- ec2.start_instances(InstanceIds=[instance_id])
478
- self.print_status("Instance start requested. This may take a few minutes...", None, 2)
479
-
480
- # Wait for instance to start
481
- for _ in range(30): # 5 minute timeout
482
- time.sleep(10)
483
- ssm_accessible, is_running, is_complete = self.check_instance_setup(instance_id)
484
- if is_running:
485
- break
486
-
487
- if not is_running:
488
- self.print_status("Timeout waiting for instance to start", False, 2)
489
- return False
490
- except Exception as e:
491
- self.print_status(f"Error starting instance: {e}", False, 2)
492
- return False
465
+ self.print_status("Cannot directly start the instance. Please start it through the appropriate channels.", False, 2)
466
+ self.print_status("Once started, run this command again to configure SSH access.", None, 2)
467
+ return False
493
468
 
494
469
  if is_complete:
495
470
  self.print_status("Instance setup is complete", True, 2)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: cloudx-proxy
3
- Version: 0.3.7
3
+ Version: 0.3.9
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes