Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/models/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function NodeModelFactory (Model, waterline, _) {
},
type: {
type: 'string',
enum: [ 'compute', 'switch', 'dae', 'pdu', 'mgmt' ],
enum: [ 'compute', 'switch', 'dae', 'pdu', 'mgmt', 'enclosure'],
defaultsTo: 'compute'
},
workflows: {
Expand All @@ -50,6 +50,10 @@ function NodeModelFactory (Model, waterline, _) {
type: 'boolean',
defaultsTo: false
},
relations: {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to have any values such as 'encloses' and 'enclosedBy'?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now we make no restrictions on what you add. It all depends on which logic is using it, so feel free to put a stake in the ground as far as conventions for enclosures.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unstructured json data that depends on the implementation, basically.

type: 'array',
defaultsTo: []
},
// We only count a node as having been discovered if
// a node document exists AND it has any catalogs
// associated with it
Expand Down