コード例 #1
0
import res.storage as storage
import res.db as db
import res.dev as dev
import res.iam as iam
import res.network as net
import res.fact as fact
import res.security as security
import res.analytics as analytics
import res.management as mgn
import res.business as bus
import res.integration as integ
import res.awsthread as awsthread

# --- AWS basic information

ownerId = utils.get_ownerID()
config.logger.info('OWNER ID:' + ownerId)

# --- AWS Regions

with open('aws_regions.json') as json_file:
    aws_regions = json.load(json_file)
regions = aws_regions.get('Regions', [])

# --- Inventory initialization

inventory = {}

# --- Argumentation. See function check_arguments.
#
# If we find log level parameter, we adjust log level.
コード例 #2
0
ファイル: inventory.py プロジェクト: janiko71/aws-inventory
if (nb_arg == 0):
    arguments = config.SUPPORTED_COMMANDS
    arguments.remove(
        'ce'
    )  # For it's not free, cost explorer is removed from defaults inventory. You need to call it explicitly.

# --- Displaying execution parameters
print('-' * 100)
print('Number of services   :', len(arguments))
print('Services List        :', str(arguments))
print('-' * 100)
print()

# --- AWS basic information

ownerId = utils.get_ownerID(profile_name)
config.logger.info('OWNER ID: ' + ownerId)
config.logger.info('AWS Profile: ' + str(profile_name))

# --- AWS Regions

config.regions = utils.get_aws_regions(profile_name)
config.nb_regions = len(config.regions)

# --- Inventory initialization

inventory = {}

# --- Progression counter initialization

config.nb_units_done = 0