Comparing version 0.8.7 to 0.8.8
@@ -0,1 +1,5 @@ | ||
## v0.8.8 | ||
* Adding support for uploading a tar.gz to Cloud files and extract on upload | ||
* Minor tenant changes for openstack identity providers | ||
## v0.8.7 | ||
@@ -2,0 +6,0 @@ * Adding Rackspace CloudDNS as a DNS service |
@@ -314,2 +314,59 @@ /* | ||
} | ||
}; | ||
}; | ||
/** | ||
* Identity.getTenantInfo | ||
* | ||
* This is an administrative API that allows a admin to get detailed information about the specified tenant by ID | ||
* | ||
* @param {String|Function} [tenantId] The tenantId for which we are seeking info | ||
* @param callback | ||
* | ||
*/ | ||
Identity.prototype.getTenantInfo = function(tenantId, callback) { | ||
var self = this; | ||
if (typeof tenantId === 'function' && !callback) { | ||
callback = tenantId; | ||
tenantId = null; | ||
} | ||
if (self.token) { | ||
tenantInfo(); | ||
} | ||
else { | ||
self.authorize(function(err) { | ||
if (err) { | ||
return callback(err); | ||
} | ||
tenantInfo(); | ||
}); | ||
} | ||
function tenantInfo() { | ||
var url = self.options.adminAuthUrl | ||
? urlJoin(self.options.adminAuthUrl, '/v2.0') | ||
: self.serviceCatalog.getServiceByType('identity').getEndpointUrl({ admin: true }); | ||
var options = { | ||
uri: urlJoin(url, '/tenants', tenantId ? tenantId : ''), | ||
method: 'GET', | ||
headers: { | ||
'X-Auth-Token': self.token.id, | ||
'User-Agent': util.format('nodejs-pkgcloud/%s', pkgcloud.version) | ||
} | ||
}; | ||
request(options, function(err, res, body) { | ||
return err | ||
? callback(err) | ||
: (res.statusCode === 200 | ||
? callback(err, body) | ||
: callback(err)); | ||
}); | ||
} | ||
}; |
@@ -24,2 +24,3 @@ /* | ||
utile.mixin(this, require('./files')); | ||
utile.mixin(this, require('./archive')); | ||
@@ -26,0 +27,0 @@ this.serviceType = 'object-store'; |
{ | ||
"name": "pkgcloud", | ||
"description": "An infrastructure-as-a-service agnostic cloud library for node.js", | ||
"version": "0.8.7", | ||
"version": "0.8.8", | ||
"author": "Nodejitsu Inc <info@nodejitsu.com>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
650381
213
14614
18