Skip to content
Snippets Groups Projects
Commit bddc54da authored by xiaohua guan's avatar xiaohua guan Committed by Yas Naoi
Browse files

Issue #3043965 by Xiaohua Guan, yas: Sync-up aws_cloud.install in between 8.x-1.x and 8.x-2.x

parent c4e293ee
No related branches found
No related tags found
No related merge requests found
......@@ -452,6 +452,24 @@ function aws_cloud_update_8130() {
aws_cloud_update_entity_definitions();
}
/**
* Add cost to Instance entity and Instance list.
*/
function aws_cloud_update_8131() {
aws_cloud_update_entity_definitions();
$files = ['views.view.aws_instances.yml'];
cloud_update_yml_definitions($files, 'aws_cloud');
// Update instances.
$cloud_configs = \Drupal::service('plugin.manager.cloud_config_plugin')->loadConfigEntities('aws_ec2');
foreach ($cloud_configs as $cloud_config) {
$aws_ec2_service = \Drupal::service('aws_cloud.ec2');
$aws_ec2_service->setCloudContext($cloud_config->getCloudContext());
$aws_ec2_service->updateInstances();
}
}
/**
* Helper function to add fields to the entity type.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment