Skip to content

Instantly share code, notes, and snippets.

@kenperkins
Created June 25, 2013 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenperkins/455d79018cbc2307d8f1 to your computer and use it in GitHub Desktop.
Save kenperkins/455d79018cbc2307d8f1 to your computer and use it in GitHub Desktop.
/*
* volumetype.js: OpenStack Block Storage volume type
*
* (C) 2013 Rackspace
* Ken Perkins
* MIT LICENSE
*
*/
var utile = require('utile'),
base = require('../../core/base'),
_ = require('underscore');
var VolumeType = exports.VolumeType = function VolumeType(client, details) {
base.Model.call(this, client, details);
};
utile.inherits(VolumeType, base.Model);
VolumeType.prototype._setProperties = function (details) {
this.id = details.id;
this.name = details.name;
this.extra_specs = details.extra_specs;
};
VolumeType.prototype.toJSON = function() {
return _.pick(this, ['id', 'name', 'extra_specs']);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment