Skip to content

Commit

Permalink
Merge 307f763 into 8e93bea
Browse files Browse the repository at this point in the history
  • Loading branch information
DonSchenck committed Jul 22, 2015
2 parents 8e93bea + 307f763 commit 9ef114f
Showing 1 changed file with 22 additions and 1 deletion.
Expand Up @@ -6,7 +6,7 @@
*/

var async = require('async');

var urlJoin = require('url-join');
var _extension = 'os-security-group-rules';

/**
Expand Down Expand Up @@ -78,3 +78,24 @@ exports.addRules = function(rules, callback) {
callback(null, created);
});
};

/**
* client.deleteRule
*
* @description Remove a rule from a security group
*
* @param {string} ruleId the id of the rule to be deleted
* @param {Function} callback
* @returns {request|*}
*/
exports.deleteRule = function deleteRule(ruleId, callback) {

return this._request({
method: 'DELETE',
path: urlJoin(_extension, ruleId)
}, function (err) {
return err
? callback(err)
: callback(err, { ok: ruleId});
});
};

0 comments on commit 9ef114f

Please sign in to comment.