def create_ssh_config(working_dir=None): if working_dir is None: return constants.set_working_dir(working_dir) constants.set_aws_credentials(None) constants.set_account_key(None) constants.set_logentries_logging() if working_dir is None: aws_conf_filename = 'aws.json' else: aws_conf_filename = '%s/aws.json'%working_dir # Open the updated version of the aws config file aws_conf = AWSConfFile(aws_conf_filename) aws_client = AWS_Client(aws_conf) aws_client.aws_create_ssh_config()
def create_ssh_config(working_dir=None): if working_dir is None: return constants.set_working_dir(working_dir) constants.set_aws_credentials(None) constants.set_account_key(None) constants.set_logentries_logging() if working_dir is None: aws_conf_filename = 'aws.json' else: aws_conf_filename = '%s/aws.json'%working_dir # Open the updated version of the aws config file aws_conf = AWSConfFile(aws_conf_filename) aws_client = AWS_Client(aws_conf) aws_client.aws_create_ssh_config() if __name__ == '__main__': if len(sys.argv) < 2: print 'You must specify the path to the AWS configuration file containing your AWS credentials' else: constants.set_working_dir(sys.argv[1]) constants.set_aws_credentials(None) constants.set_account_key(None) constants.set_logentries_logging() main('%s/aws.json'%constants.WORKING_DIR)