forked from p15670423/monkey
Remove unused `get_regions`, `get_session`, and `test_client` in `common/cloud/aws/aws_service.py`
This commit is contained in:
parent
897a92b961
commit
6c80335509
|
@ -2,7 +2,6 @@ import logging
|
||||||
|
|
||||||
import boto3
|
import boto3
|
||||||
import botocore
|
import botocore
|
||||||
from botocore.exceptions import ClientError
|
|
||||||
|
|
||||||
from common.cloud.aws.aws_instance import AwsInstance
|
from common.cloud.aws.aws_instance import AwsInstance
|
||||||
|
|
||||||
|
@ -53,22 +52,6 @@ class AwsService(object):
|
||||||
client_type, region_name=region if region is not None else AwsService.region
|
client_type, region_name=region if region is not None else AwsService.region
|
||||||
)
|
)
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def get_session():
|
|
||||||
return boto3.session.Session()
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def get_regions():
|
|
||||||
return AwsService.get_session().get_available_regions("ssm")
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def test_client():
|
|
||||||
try:
|
|
||||||
AwsService.get_client("ssm").describe_instance_information()
|
|
||||||
return True
|
|
||||||
except ClientError:
|
|
||||||
return False
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_instances():
|
def get_instances():
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue