Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

ISSUE-737: Add ManagerStatus into Node #790

Merged

Conversation

ssullivan
Copy link
Contributor

@ssullivan ssullivan commented Jun 10, 2017

I saw that there was a closed issue #737 that my PR was referenced but my additions didn't add ManagerStatus into node.

This PR adds MangerStatus and NodeStatus into Node which should satisfy #737

@ssullivan ssullivan force-pushed the issue-737-add-manager-status-into-node branch from 40cd463 to 4f81b74 Compare June 10, 2017 01:18
@ssullivan ssullivan force-pushed the issue-737-add-manager-status-into-node branch 2 times, most recently from de0b1b6 to acee2dc Compare June 10, 2017 01:51
@codecov-io
Copy link

codecov-io commented Jun 10, 2017

Codecov Report

Merging #790 into master will decrease coverage by 0.32%.
The diff coverage is 9.09%.

@@             Coverage Diff              @@
##             master     #790      +/-   ##
============================================
- Coverage     66.51%   66.19%   -0.33%     
  Complexity      725      725              
============================================
  Files           162      162              
  Lines          3082     3097      +15     
  Branches        348      353       +5     
============================================
  Hits           2050     2050              
- Misses          877      892      +15     
  Partials        155      155

@ssullivan ssullivan force-pushed the issue-737-add-manager-status-into-node branch 9 times, most recently from d96036a to 4f64290 Compare June 15, 2017 11:42
@@ -2850,6 +2849,18 @@ public ListVolumesFilterParam(String name, String value) {
List<Node> listNodes() throws DockerException, InterruptedException;

/**
* List swarm nodes that match the given criteriag. Only available in Docker API &gt;= 1.24.
Copy link
Contributor

Choose a reason for hiding this comment

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

typo in criteria

)
);

final List<Node> nodes = dockerClient.listNodes(Node.find().nodeId("24ifsmvkjbyhk").build());
Copy link
Contributor

Choose a reason for hiding this comment

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

listNodes() will return the list of one node provided by fixtures/1.28/listNodes.json all the time, regardless of the nodeId used here. So this test only seems to check that listNodes() can take Node.Criteria as a parameter. I would lean towards removing this and the tests below (keep testListNodesWithServerError()) since they don't add much.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll update and remove the tests, thanks for taking a look.

ISSUE-793: Fix for ManagerStatus when a manager is not a Leader on docker 17.03.1-ce
Added a listNodes with Criteria call
Switched to using a static import of Fixture
Fixed typo in Criteria
Removed some unit tests per PR feedback
Fixed some checkstyle issues related to import ordering, and some indentation that got introduced after last merge
@ssullivan ssullivan force-pushed the issue-737-add-manager-status-into-node branch from da0fe79 to c3abb82 Compare June 29, 2017 01:33
@ssullivan
Copy link
Contributor Author

I've updated the PR with the requested changes.

@davidxia davidxia merged commit 7af33bc into spotify:master Jun 29, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants