Commit f8116bef authored by Leigh Stoller's avatar Leigh Stoller

Build commands with the WebTask arguments.

parent f01c86be
<?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
#
......@@ -186,11 +186,16 @@ class Dataset
return $this->remote_url();
}
function deleteCommand() {
return "webmanage_dataset delete " . $this->pid() . "/" . $this->id();
function deleteCommand($webtask) {
$command = " webmanage_dataset " .
"-t " . $webtask->task_id() . " delete " .
$this->pid() . "/" . $this->id();
return $command;
}
function grantCommand() {
return "webmanage_dataset modify ";
function grantCommand($webtask) {
$command = " webmanage_dataset " .
"-t " . $webtask->task_id() . " modify ";
return $command;
}
# Grab the webtask. Backwards compat mode, see if there is one associated
......
<?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
#
......@@ -250,10 +250,11 @@ class Lease
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();
}
function grantCommand() {
function grantCommand($webtask) {
return "webgrantlease ";
}
}
......@@ -443,10 +444,11 @@ class ImageDataset
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();
}
function grantCommand() {
function grantCommand($webtask) {
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