Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ public interface SenlinNodeService {
*/
Node get(String nodeID);

/**
* returns details of a {@link Node}
* @param nodeID Id of {@link Node}
* @param showDetails {@literal true} to retrieve the properties about the physical object that backs the node
* @return Node
*/
Node get(String nodeID, boolean showDetails);

/**
* Deletes the specified {@link Node} from the server.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,14 @@ public Node create(NodeCreate newNode) {

@Override
public Node get(String nodeID) {
return get(nodeID, false); //false for backward compatibility
}

@Override
public Node get(final String nodeID, final boolean showDetails) {
checkNotNull(nodeID);
return get(SenlinNode.class, uri("/nodes/%s", nodeID)).execute();
//see at https://developer.openstack.org/api-ref/clustering/?expanded=show-node-details-detail
return get(SenlinNode.class, uri("/nodes/%s", nodeID)).param("show_details", showDetails).execute();
}

@Override
Expand Down