Ray Milkey
Committed by Gerrit Code Review

API changes for net config link provider

Change-Id: I4c20987b9922906573b69511f634197054f1e8ec
...@@ -136,6 +136,11 @@ public class MockLinkService extends LinkServiceAdapter { ...@@ -136,6 +136,11 @@ public class MockLinkService extends LinkServiceAdapter {
136 } 136 }
137 137
138 @Override 138 @Override
139 + public boolean isExpected() {
140 + return false;
141 + }
142 +
143 + @Override
139 public Annotations annotations() { 144 public Annotations annotations() {
140 return null; 145 return null;
141 } 146 }
......
...@@ -31,7 +31,7 @@ public class DefaultLink extends AbstractModel implements Link { ...@@ -31,7 +31,7 @@ public class DefaultLink extends AbstractModel implements Link {
31 private final ConnectPoint dst; 31 private final ConnectPoint dst;
32 private final Type type; 32 private final Type type;
33 private final State state; 33 private final State state;
34 - private final boolean isDurable; 34 + private final boolean isExpected;
35 35
36 /** 36 /**
37 * Creates an active infrastructure link using the supplied information. 37 * Creates an active infrastructure link using the supplied information.
...@@ -57,18 +57,18 @@ public class DefaultLink extends AbstractModel implements Link { ...@@ -57,18 +57,18 @@ public class DefaultLink extends AbstractModel implements Link {
57 * @param dst link destination 57 * @param dst link destination
58 * @param type link type 58 * @param type link type
59 * @param state link state 59 * @param state link state
60 - * @param isDurable indicates if the link is to be considered durable 60 + * @param isExpected indicates if the link is preconfigured
61 * @param annotations optional key/value annotations 61 * @param annotations optional key/value annotations
62 */ 62 */
63 public DefaultLink(ProviderId providerId, ConnectPoint src, ConnectPoint dst, 63 public DefaultLink(ProviderId providerId, ConnectPoint src, ConnectPoint dst,
64 Type type, State state, 64 Type type, State state,
65 - boolean isDurable, Annotations... annotations) { 65 + boolean isExpected, Annotations... annotations) {
66 super(providerId, annotations); 66 super(providerId, annotations);
67 this.src = src; 67 this.src = src;
68 this.dst = dst; 68 this.dst = dst;
69 this.type = type; 69 this.type = type;
70 this.state = state; 70 this.state = state;
71 - this.isDurable = isDurable; 71 + this.isExpected = isExpected;
72 } 72 }
73 73
74 @Override 74 @Override
...@@ -93,7 +93,12 @@ public class DefaultLink extends AbstractModel implements Link { ...@@ -93,7 +93,12 @@ public class DefaultLink extends AbstractModel implements Link {
93 93
94 @Override 94 @Override
95 public boolean isDurable() { 95 public boolean isDurable() {
96 - return isDurable; 96 + return isExpected();
97 + }
98 +
99 + @Override
100 + public boolean isExpected() {
101 + return isExpected;
97 } 102 }
98 103
99 // Note: Durability & state are purposefully omitted form equality & hashCode. 104 // Note: Durability & state are purposefully omitted form equality & hashCode.
...@@ -124,7 +129,7 @@ public class DefaultLink extends AbstractModel implements Link { ...@@ -124,7 +129,7 @@ public class DefaultLink extends AbstractModel implements Link {
124 .add("dst", dst) 129 .add("dst", dst)
125 .add("type", type) 130 .add("type", type)
126 .add("state", state) 131 .add("state", state)
127 - .add("durable", isDurable) 132 + .add("configured", isExpected)
128 .toString(); 133 .toString();
129 } 134 }
130 135
......
...@@ -108,7 +108,16 @@ public interface Link extends Annotated, Provided, NetworkResource { ...@@ -108,7 +108,16 @@ public interface Link extends Annotated, Provided, NetworkResource {
108 * Indicates if the link is to be considered durable. 108 * Indicates if the link is to be considered durable.
109 * 109 *
110 * @return true if the link is durable 110 * @return true if the link is durable
111 + * @deprecated in Falcon Release - replaced by isConfigured()
111 */ 112 */
113 + @Deprecated
112 boolean isDurable(); 114 boolean isDurable();
113 115
116 + /**
117 + * Indicates if the link was created from a predefined configuration.
118 + *
119 + * @return true if the link was created from a predefined configuration,
120 + * false otherwise.
121 + */
122 + boolean isExpected();
114 } 123 }
......
...@@ -54,6 +54,9 @@ public abstract class BiLinkTestBase { ...@@ -54,6 +54,9 @@ public abstract class BiLinkTestBase {
54 @Override public boolean isDurable() { 54 @Override public boolean isDurable() {
55 return false; 55 return false;
56 } 56 }
57 + @Override public boolean isExpected() {
58 + return false;
59 + }
57 @Override public Annotations annotations() { 60 @Override public Annotations annotations() {
58 return null; 61 return null;
59 } 62 }
......