modify_launch_templates module

modify_launch_templates.create_prepost_sheets(file_path)

Creates or updates the sheets that contain the comparison data between initial and current state of DRS configs

Parameters:

file_path (string) – Path to the XLS doc

modify_launch_templates.fetch_updated_data(file_path, region)

Retrieves updated DRS data and re-populates the data on the XLS doc

Parameters:
  • file_path (string) – Path to the XLS doc

  • region (string) – AWS region

modify_launch_templates.get_excel_data(file_path)

Reads data from XLS and returns the respective lists

Parameters:

file_path (string) – Path to the XLS doc

Returns:

drs_df, mod_df, vol_dfs

Return type:

list, list, list

modify_launch_templates.init_aws_clients(region)

Initializes EC2 and DRS boto clients

Parameters:

region (string) – AWS Region

Returns:

DRS client, EC2 client

Return type:

boto_client, boto_client

modify_launch_templates.logActions(level, short_desc, long_desc)

Formats and prints logs

Parameters:
  • level (string) – Log level (INF,ERR)

  • short_desc (string) – Short log message

  • long_desc (string) – Long log message

modify_launch_templates.update_launch_templates(drs_df, mod_df, vol_dfs)

Makes the modification of the launch templates

Parameters:
  • drs_df (list) – DRS related data

  • mod_df (list) – Modification related data

  • vol_dfs (list) – Volume related data

Returns:

True if any update occured, False if otherwise

Return type:

boolean