Commit f8116bef authored by Leigh Stoller's avatar Leigh Stoller

Build commands with the WebTask arguments.

parent f01c86be
<?php <?php
# #
# Copyright (c) 2006-2017 University of Utah and the Flux Group. # Copyright (c) 2006-2018 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -186,11 +186,16 @@ class Dataset ...@@ -186,11 +186,16 @@ class Dataset
return $this->remote_url(); return $this->remote_url();
} }
function deleteCommand() { function deleteCommand($webtask) {
return "webmanage_dataset delete " . $this->pid() . "/" . $this->id(); $command = " webmanage_dataset " .
"-t " . $webtask->task_id() . " delete " .
$this->pid() . "/" . $this->id();
return $command;
} }
function grantCommand() { function grantCommand($webtask) {
return "webmanage_dataset modify "; $command = " webmanage_dataset " .
"-t " . $webtask->task_id() . " modify ";
return $command;
} }
# Grab the webtask. Backwards compat mode, see if there is one associated # Grab the webtask. Backwards compat mode, see if there is one associated
......
<?php <?php
# #
# Copyright (c) 2006-2017 University of Utah and the Flux Group. # Copyright (c) 2006-2018 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -250,10 +250,11 @@ class Lease ...@@ -250,10 +250,11 @@ class Lease
return "urn:publicid:IDN+${domain}+${type}+${id}"; return "urn:publicid:IDN+${domain}+${type}+${id}";
} }
function deleteCommand() { # We ignore webtasks for classic UI
function deleteCommand($webtask) {
return "webdeletelease -f -b " . $this->pid() . "/" . $this->id(); return "webdeletelease -f -b " . $this->pid() . "/" . $this->id();
} }
function grantCommand() { function grantCommand($webtask) {
return "webgrantlease "; return "webgrantlease ";
} }
} }
...@@ -443,10 +444,11 @@ class ImageDataset ...@@ -443,10 +444,11 @@ class ImageDataset
return "$TBBASE/image_metadata.php?uuid=$image_uuid"; return "$TBBASE/image_metadata.php?uuid=$image_uuid";
} }
function deleteCommand() { # We ignore webtasks for classic UI
function deleteCommand($webtask) {
return "webdelete_image -F -p " . $this->image->imageid(); return "webdelete_image -F -p " . $this->image->imageid();
} }
function grantCommand() { function grantCommand($webtask) {
return "webgrantimage "; return "webgrantimage ";
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment