Skip to content

Conversation

@anhou
Copy link
Member

@anhou anhou commented Nov 3, 2015

Update removing node based on @iceiilin 's PR RackHD/on-tasks#26

  1. when removing a compute node, check the relationship within this node, if it's enclosed by an enclosure node, after remove compute node, also remove the relationship within enclosure node, when all nodes of an enclosure are removed, remove the enclosure automatically.
  2. add nodes-api-service.js to handle nodes api function.
  3. add unit tests

@tldavies
Copy link
Contributor

tldavies commented Nov 3, 2015

We are testing Travis CI. Since there are no .travis.yml files it will fail.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be better to make the code in these promise blocks their own named functions, that way we can more easily test their functionality individually, and also have a more easily readable promise chain.

@tldavies
Copy link
Contributor

tldavies commented Nov 3, 2015

test this please

@benbp
Copy link
Contributor

benbp commented Nov 3, 2015

👍

with a suggestion about some potential cleanup.

@anhou anhou force-pushed the remove_node_enhancement branch from ab0d77f to abb2f20 Compare November 4, 2015 09:50
@anhou
Copy link
Member Author

anhou commented Nov 4, 2015

codes has been refactored and updated

Copy link
Contributor

Choose a reason for hiding this comment

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

This was an error that I put in a bunch of tests a while back. This statement can actually go in the before block instead of the beforeEach block, since we only need to create the sandbox once (and will save us test execution time).

Copy link
Member Author

Choose a reason for hiding this comment

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

Great. most of cases didn't pay attention on this. let's correct it from now. I've also update it

@benbp
Copy link
Contributor

benbp commented Nov 4, 2015

Thanks @anhou! Still 👍

@anhou anhou force-pushed the remove_node_enhancement branch from abb2f20 to aa9d699 Compare November 5, 2015 05:24
Copy link
Contributor

Choose a reason for hiding this comment

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

not big problem. the better name is "removeEnclosureRelations" because it cannot be used to remove other future relations.

@yyscamper
Copy link
Contributor

still 👍 , though I have some minor suggestion

@anhou anhou force-pushed the remove_node_enhancement branch from aa9d699 to 7cd96df Compare November 6, 2015 01:43
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.

4 participants