cloudx-proxy 0.3.8__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.8 → cloudx_proxy-0.3.9}/CHANGELOG.md +7 -0
  2. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/PKG-INFO +1 -1
  3. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/cloudx_proxy/_version.py +2 -2
  4. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/cloudx_proxy/setup.py +17 -43
  5. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/cloudx_proxy.egg-info/PKG-INFO +1 -1
  6. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/.github/workflows/release.yml +0 -0
  7. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/.gitignore +0 -0
  8. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/.releaserc +0 -0
  9. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/CONTRIBUTING.md +0 -0
  10. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/LICENSE +0 -0
  11. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/README.md +0 -0
  12. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/cloudx_proxy/__init__.py +0 -0
  13. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/cloudx_proxy/cli.py +0 -0
  14. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/cloudx_proxy/core.py +0 -0
  15. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/cloudx_proxy.egg-info/SOURCES.txt +0 -0
  16. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/cloudx_proxy.egg-info/dependency_links.txt +0 -0
  17. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/cloudx_proxy.egg-info/entry_points.txt +0 -0
  18. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/cloudx_proxy.egg-info/requires.txt +0 -0
  19. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/cloudx_proxy.egg-info/top_level.txt +0 -0
  20. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/package.json +0 -0
  21. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/pyproject.toml +0 -0
  22. {cloudx_proxy-0.3.8 → cloudx_proxy-0.3.9}/setup.cfg +0 -0
@@ -1,3 +1,10 @@
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
+
1
8
  ## [0.3.8](https://github.com/easytocloud/cloudX-proxy/compare/v0.3.7...v0.3.8) (2025-02-11)
2
9
 
3
10
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: cloudx-proxy
3
- Version: 0.3.8
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.8'
16
- __version_tuple__ = version_tuple = (0, 3, 8)
15
+ __version__ = version = '0.3.9'
16
+ __version_tuple__ = version_tuple = (0, 3, 9)
@@ -371,36 +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
- # Use the provided profile for EC2 operations
377
- response = session.client('ec2').describe_instances(InstanceIds=[instance_id])
378
- if not response['Reservations']:
379
- self.print_status("Instance not found", False, 4)
380
- return False, False, False
381
-
382
- instance = response['Reservations'][0]['Instances'][0]
383
- state = instance['State']['Name']
384
-
385
- if state != 'running':
386
- self.print_status(f"Instance is {state}", False, 4)
387
- return True, False, False
388
- except Exception as e:
389
- self.print_status(f"Error checking instance state: {e}", False, 4)
390
- return False, False, False
391
-
392
- # Now check SSM connectivity
374
+ # Check instance status via SSM
393
375
  try:
394
376
  self.print_status("Checking SSM connectivity...", None, 4)
395
377
  response = ssm.describe_instance_information(
396
378
  Filters=[{'Key': 'InstanceIds', 'Values': [instance_id]}]
397
379
  )
398
- if not response['InstanceInformationList']:
399
- self.print_status("Instance is running but not yet accessible via SSM", False, 4)
400
- self.print_status("This is normal if the instance is still configuring", None, 4)
401
- 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
402
392
 
403
- self.print_status("SSM connection established", True, 4)
393
+ self.print_status("Instance is running and SSM connection established", True, 4)
404
394
 
405
395
  # Check setup status using SSM command
406
396
  self.print_status("Checking setup status...", None, 4)
@@ -472,25 +462,9 @@ Host cloudx-{cloudx_env}-{hostname}
472
462
  if not start_instance:
473
463
  return False
474
464
 
475
- try:
476
- # Use the provided profile for EC2 operations
477
- session = boto3.Session(profile_name=self.profile)
478
- session.client('ec2').start_instances(InstanceIds=[instance_id])
479
- self.print_status("Instance start requested. This may take a few minutes...", None, 2)
480
-
481
- # Wait for instance to start
482
- for _ in range(30): # 5 minute timeout
483
- time.sleep(10)
484
- ssm_accessible, is_running, is_complete = self.check_instance_setup(instance_id)
485
- if is_running:
486
- break
487
-
488
- if not is_running:
489
- self.print_status("Timeout waiting for instance to start", False, 2)
490
- return False
491
- except Exception as e:
492
- self.print_status(f"Error starting instance: {e}", False, 2)
493
- 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
494
468
 
495
469
  if is_complete:
496
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.8
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