Skip to content

Commit

Permalink
Not showing useless metadata in add instances command for Digital Oce…
Browse files Browse the repository at this point in the history
…an (fixes #193)
  • Loading branch information
vania-pooh committed Nov 29, 2016
1 parent be11a9f commit b80c40b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ public List<String[]> formatNewInstances(List<Instance> instances) {

private static String formatInstanceAdditionalProperties(Instance instance) {
List<String> additionalProperties = new ArrayList<>();
if (instance.getMetadata() != null) {
if (instance.getMetadata() != null && !instance.getMetadata().isEmpty()) {
additionalProperties.add(String.format("Metadata: %s", instance.getMetadata().toString()));
}
if (instance.getNetworks() != null) {
if (instance.getNetworks() != null && !instance.getNetworks().isEmpty()) {
additionalProperties.add(String.format("Networks: %s", enumerateValues(
instance.getNetworks().stream()
.map(Network::getName)
Expand Down

0 comments on commit b80c40b

Please sign in to comment.