@yawetse/pkgcloud
Version:
An infrastructure-as-a-service agnostic cloud library for node.js
34 lines (29 loc) • 900 B
JavaScript
/*
* image.js: Joyent Cloud DataSet
*
* (C) 2012 Charlie Robbins, Ken Perkins, Ross Kukulinski & the Contributors.
*
*/
var util = require('util'),
base = require('../../core/compute/image');
var Image = exports.Image = function Image(client, details) {
base.Image.call(this, client, details);
};
util.inherits(Image, base.Image);
Image.prototype._setProperties = function (details) {
this.id = details.urn;
this.name = details.name;
this.created = details.created;
//
// Joyent specific
//
this.urn = details.urn;
this.joyentId = details.id;
this.os = details.os;
this.type = details.type;
this.description = details.description;
this['default'] = details['default'];
this.version = details.version;
this.requirements = details.requirements;
this.original = this.rackspace = details;
};