Commit 653cbca4 authored by xiaohua guan's avatar xiaohua guan Committed by Yas Naoi
Browse files

Issue #3270658 by Xiaohua Guan, yas: Support to run the operations from Cloud...

Issue #3270658 by Xiaohua Guan, yas: Support to run the operations from Cloud Orchestrator master to workers (OpenStack snapshot) (Edit and Delete)
parent fd730c1f
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1535,6 +1535,12 @@ class OpenStackService extends CloudServiceBase implements OpenStackServiceInter
   *   The snapshot update API response.
   */
  public function updateSnapshot(array $params = []) {
    if ($this->isWorkerResource()) {
      $this->saveOperation(__FUNCTION__, [$params], 'updateSnapshots');

      return ['SendToWorker' => TRUE];
    }

    $this->loadCredentials();

    $body['snapshot'] = [
@@ -1578,6 +1584,12 @@ class OpenStackService extends CloudServiceBase implements OpenStackServiceInter
   *   Succeeded or failed.
   */
  public function deleteSnapshot(array $params = []) {
    if ($this->isWorkerResource()) {
      $this->saveOperation(__FUNCTION__, [$params], 'updateSnapshots');

      return ['SendToWorker' => TRUE];
    }

    $this->loadCredentials();

    $project_id = $this->credentials['project_id'];