def get_alibaba_info(self): """Gets alibaba specific.""" self.json_info["alibaba_image_id"] = read_file_value( "image_id.json", "image_id") self.json_info["alibaba_region"] = get_config_value('ALIBABA_REGION') self.json_info["alibaba_location"] = read_file_value( "alibaba_location.json", "alibaba_location")
def get_azure_info(self): """Gets azure specific info.""" self.json_info["azure_resource_group"] = get_config_value( 'AZURE_RESOURCE_GROUP') self.json_info["azure_region"] = get_config_value('AZURE_REGION') self.json_info["azure_location"] = read_file_value( "vhd_url.json", "vhd_url")
def get_platform_specific_info(self): """Gets platform then directs to the correct platform info gathering function.""" plat = get_config_value("PLATFORM") if plat == "aws": self.get_aws_info() if plat == "alibaba": self.get_alibaba_info() if plat == "gce": self.get_gce_info() if plat == "azure": self.get_azure_info() if is_hypervisor_image(plat): location_dir = read_file_value("location.json", "location_dir") self.json_info["location"] = location_dir
def get_aws_info(self): """Gets aws specific info.""" self.json_info["aws_image_id"] = read_file_value( "image_id.json", "image_id") self.json_info["aws_region"] = get_config_value("AWS_REGION")
def get_gce_info(self): """Gets gce specific info.""" self.json_info["gce_project"] = read_file_value( "prepare_cloud_image.json", "gce_project") self.json_info["gce_location"] = read_file_value( "gce_location.json", "gce_location")