Skip to content

Conversation

@zyoung51
Copy link
Contributor

@RackHD/corecommitters @uppalk1 @keedya @tannoa2

Depends on RackHD/on-core#88

var self = this;

waterline.tags.find({}).then(function (tags) {
var catalogTypes = _(tags)
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

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 :)

Copy link
Contributor

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 :)

@benbp
Copy link
Contributor

benbp commented Feb 17, 2016

+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 :)

@zyoung51 zyoung51 force-pushed the feature/node-tagging branch 2 times, most recently from 4b38b72 to 6d5250a Compare February 17, 2016 21:22
friendlyName: 'Generate Tag',
injectableName: 'Task.Base.Catalog.GenerateTag',
runJob: 'Job.Catalog.GenerateTag',
requiredOptions: [],
Copy link
Member

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?

@JenkinsRHD
Copy link
Contributor

*** BUILD #235 ***
Test Name: Job.Catalog.GenerateTag assigns a matching tag
Error Details: expected addTags to have been called with arguments ["Test Tag"]     addTags(bc7dab7e8fb7d6abf8e7d6ab, ["Test Tag"]) => [object Promise] at /var/lib/jenkins/jobs/on-tasks/workspace/build/lib/jobs/generate-tag.js:9:3017
Stack Trace: AssertionError: expected addTags to have been called with arguments ["Test Tag"]
    addTags(bc7dab7e8fb7d6abf8e7d6ab, ["Test Tag"]) => [object Promise] at lib/jobs/generate-tag.js:9:3017
    at spec/lib/jobs/generate-tag-spec.js:99:58
    at tryCatcher (node_modules/on-core/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (node_modules/on-core/node_modules/bluebird/js/main/promise.js:507:31)
    at Promise._settlePromiseAt (node_modules/on-core/node_modules/bluebird/js/main/promise.js:581:18)
    at Async._drainQueue (node_modules/on-core/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:133:10)
    at Async.drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:15:14)

Test Name: Job.Catalog.GenerateTag assigns all tags when multiples match
Error Details: expected addTags to have been called with arguments ["Test Tag", "Test Tag 2"]     addTags(bc7dab7e8fb7d6abf8e7d6ab, ["Test Tag", "Test Tag 2"]) => [object Promise] at /var/lib/jenkins/jobs/on-tasks/workspace/build/lib/jobs/generate-tag.js:9:3017
Stack Trace: AssertionError: expected addTags to have been called with arguments ["Test Tag", "Test Tag 2"]
    addTags(bc7dab7e8fb7d6abf8e7d6ab, ["Test Tag", "Test Tag 2"]) => [object Promise] at lib/jobs/generate-tag.js:9:3017
    at spec/lib/jobs/generate-tag-spec.js:158:58
    at tryCatcher (node_modules/on-core/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (node_modules/on-core/node_modules/bluebird/js/main/promise.js:507:31)
    at Promise._settlePromiseAt (node_modules/on-core/node_modules/bluebird/js/main/promise.js:581:18)
    at Async._drainQueue (node_modules/on-core/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:133:10)
    at Async.drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:15:14)

Test Name: Job.Catalog.GenerateTag assigns a matching tag against multiple catalogs
Error Details: expected addTags to have been called with arguments ["Test Tag"]     addTags(bc7dab7e8fb7d6abf8e7d6ab, ["Test Tag"]) => [object Promise] at /var/lib/jenkins/jobs/on-tasks/workspace/build/lib/jobs/generate-tag.js:9:3017
Stack Trace: AssertionError: expected addTags to have been called with arguments ["Test Tag"]
    addTags(bc7dab7e8fb7d6abf8e7d6ab, ["Test Tag"]) => [object Promise] at lib/jobs/generate-tag.js:9:3017
    at spec/lib/jobs/generate-tag-spec.js:186:58
    at tryCatcher (node_modules/on-core/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (node_modules/on-core/node_modules/bluebird/js/main/promise.js:507:31)
    at Promise._settlePromiseAt (node_modules/on-core/node_modules/bluebird/js/main/promise.js:581:18)
    at Async._drainQueue (node_modules/on-core/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:133:10)
    at Async.drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:15:14)

@@ -0,0 +1,119 @@
// Copyright 2015, EMC, Inc.
Copy link
Contributor

Choose a reason for hiding this comment

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

Still the copyright problem

@yyscamper
Copy link
Contributor

👍 after fix the copyright and the clarify the injectableName naming.

@zyoung51 zyoung51 force-pushed the feature/node-tagging branch from 6d5250a to 6b50781 Compare February 18, 2016 13:34
@JenkinsRHD
Copy link
Contributor

*** BUILD #239 ***
Test Name: Job.Catalog.GenerateTag assigns a matching tag
Error Details: expected addTags to have been called with arguments ["Test Tag"]     addTags(bc7dab7e8fb7d6abf8e7d6ab, ["Test Tag"]) => [object Promise] at /var/lib/jenkins/jobs/on-tasks/workspace/build/lib/jobs/generate-tag.js:9:3017
Stack Trace: AssertionError: expected addTags to have been called with arguments ["Test Tag"]
    addTags(bc7dab7e8fb7d6abf8e7d6ab, ["Test Tag"]) => [object Promise] at lib/jobs/generate-tag.js:9:3017
    at spec/lib/jobs/generate-tag-spec.js:99:58
    at tryCatcher (node_modules/on-core/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (node_modules/on-core/node_modules/bluebird/js/main/promise.js:507:31)
    at Promise._settlePromiseAt (node_modules/on-core/node_modules/bluebird/js/main/promise.js:581:18)
    at Async._drainQueue (node_modules/on-core/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:133:10)
    at Async.drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:15:14)

Test Name: Job.Catalog.GenerateTag assigns all tags when multiples match
Error Details: expected addTags to have been called with arguments ["Test Tag", "Test Tag 2"]     addTags(bc7dab7e8fb7d6abf8e7d6ab, ["Test Tag", "Test Tag 2"]) => [object Promise] at /var/lib/jenkins/jobs/on-tasks/workspace/build/lib/jobs/generate-tag.js:9:3017
Stack Trace: AssertionError: expected addTags to have been called with arguments ["Test Tag", "Test Tag 2"]
    addTags(bc7dab7e8fb7d6abf8e7d6ab, ["Test Tag", "Test Tag 2"]) => [object Promise] at lib/jobs/generate-tag.js:9:3017
    at spec/lib/jobs/generate-tag-spec.js:158:58
    at tryCatcher (node_modules/on-core/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (node_modules/on-core/node_modules/bluebird/js/main/promise.js:507:31)
    at Promise._settlePromiseAt (node_modules/on-core/node_modules/bluebird/js/main/promise.js:581:18)
    at Async._drainQueue (node_modules/on-core/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:133:10)
    at Async.drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:15:14)

Test Name: Job.Catalog.GenerateTag assigns a matching tag against multiple catalogs
Error Details: expected addTags to have been called with arguments ["Test Tag"]     addTags(bc7dab7e8fb7d6abf8e7d6ab, ["Test Tag"]) => [object Promise] at /var/lib/jenkins/jobs/on-tasks/workspace/build/lib/jobs/generate-tag.js:9:3017
Stack Trace: AssertionError: expected addTags to have been called with arguments ["Test Tag"]
    addTags(bc7dab7e8fb7d6abf8e7d6ab, ["Test Tag"]) => [object Promise] at lib/jobs/generate-tag.js:9:3017
    at spec/lib/jobs/generate-tag-spec.js:186:58
    at tryCatcher (node_modules/on-core/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (node_modules/on-core/node_modules/bluebird/js/main/promise.js:507:31)
    at Promise._settlePromiseAt (node_modules/on-core/node_modules/bluebird/js/main/promise.js:581:18)
    at Async._drainQueue (node_modules/on-core/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:133:10)
    at Async.drainQueues (node_modules/on-core/node_modules/bluebird/js/main/async.js:15:14)

@zyoung51 zyoung51 force-pushed the feature/node-tagging branch from 6b50781 to 2a38ced Compare February 18, 2016 14:08
return job.run()
.then(function() {
expect(waterline.nodes.addTags).to.have.been.calledOnce;
expect(waterline.nodes.addTags).to.have.been.calledWith('bc7dab7e8fb7d6abf8e7d6ab', ['Test Tag']);

Choose a reason for hiding this comment

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

Line is too long.

@benbp
Copy link
Contributor

benbp commented Feb 18, 2016

👍

@yyscamper
Copy link
Contributor

👍 after fix the newly appeared "Line is too long" warning.

@zyoung51 zyoung51 force-pushed the feature/node-tagging branch from 2a38ced to 21e00ad Compare February 19, 2016 16:31
@jlongever
Copy link
Contributor

+1

jlongever added a commit that referenced this pull request Feb 21, 2016
Add tasks to run the node tagging job.
@jlongever jlongever merged commit ac29f8c into RackHD:master Feb 21, 2016
@zyoung51 zyoung51 deleted the feature/node-tagging branch February 24, 2016 15:44
kellylu2sym pushed a commit to kellylu2sym/on-tasks that referenced this pull request Aug 8, 2017
Brocade VDX switch integration as part of switch discovery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants