Skip to content
This repository has been archived by the owner on Aug 5, 2021. It is now read-only.

Commit

Permalink
add describeVolumeAttribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Genki Sugawara committed Mar 27, 2012
1 parent c862975 commit bd573be
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion ec2ui/content/ec2ui/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -2666,7 +2666,6 @@ var ec2ui_controller = {
}
},


describeInstanceAttribute : function (instanceId, attribute, callback) {
var params = new Array();
params.push(["InstanceId", instanceId]);
Expand All @@ -2689,6 +2688,28 @@ var ec2ui_controller = {
}
},

describeVolumeAttribute : function (volumeId, attribute, callback) {
var params = new Array();
params.push(["VolumeId", volumeId]);
params.push(["Attribute", attribute]);
ec2_httpclient.queryEC2("DescribeInstanceAttribute", params, this, true, "onCompleteDescribeVolumeAttribute", callback);
},

onCompleteDescribeVolumeAttribute : function (objResponse) {
var xmlDoc = objResponse.xmlDoc;
var items = xmlDoc.evaluate("/ec2:DescribeVolumeAttributeResponse/*",
xmlDoc,
this.getNsResolver(),
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
null);

var value = getNodeValueByName(items.snapshotItem(2), "value");

if (objResponse.callback) {
objResponse.callback(value);
}
},

modifyInstanceAttribute : function (instanceId, attribute, callback) {
var params = new Array();
var name = attribute[0];
Expand Down

0 comments on commit bd573be

Please sign in to comment.