-
Notifications
You must be signed in to change notification settings - Fork 77
Add tasks to run the node tagging job. #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| var self = this; | ||
|
|
||
| waterline.tags.find({}).then(function (tags) { | ||
| var catalogTypes = _(tags) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just discovered this usage pattern of lodash a couple weeks ago, glad you are using it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heavily leveraged: https://github.com/RackHD/on-tasks/blob/master/lib/jobs/generate-sku.js#L59
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, well, hat tip to @halfspiral then :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this chain style, seems very cool :)
|
+0, a couple of minor tests that I think might be useful in the long run, but if you spend more than 10 minutes on them I'll feel bad :) |
4b38b72 to
6d5250a
Compare
| friendlyName: 'Generate Tag', | ||
| injectableName: 'Task.Base.Catalog.GenerateTag', | ||
| runJob: 'Job.Catalog.GenerateTag', | ||
| requiredOptions: [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we assert nodeId as a required option here?
|
lib/jobs/generate-tag.js
Outdated
| @@ -0,0 +1,119 @@ | |||
| // Copyright 2015, EMC, Inc. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still the copyright problem
|
👍 after fix the copyright and the clarify the injectableName naming. |
6d5250a to
6b50781
Compare
|
6b50781 to
2a38ced
Compare
spec/lib/jobs/generate-tag-spec.js
Outdated
| return job.run() | ||
| .then(function() { | ||
| expect(waterline.nodes.addTags).to.have.been.calledOnce; | ||
| expect(waterline.nodes.addTags).to.have.been.calledWith('bc7dab7e8fb7d6abf8e7d6ab', ['Test Tag']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
|
👍 |
|
👍 after fix the newly appeared "Line is too long" warning. |
2a38ced to
21e00ad
Compare
|
+1 |
Add tasks to run the node tagging job.
Brocade VDX switch integration as part of switch discovery
@RackHD/corecommitters @uppalk1 @keedya @tannoa2
Depends on RackHD/on-core#88