Committed by
Gerrit Code Review
CORD-248 Added host management network type
And changed OLT_AGENT to ACCESS_AGENT Change-Id: I8bfdb9171ca73aec6bd271ca13b2234a6935ac30
Showing
2 changed files
with
11 additions
and
12 deletions
| ... | @@ -26,12 +26,13 @@ public interface VtnServiceApi { | ... | @@ -26,12 +26,13 @@ public interface VtnServiceApi { |
| 26 | enum NetworkType { | 26 | enum NetworkType { |
| 27 | PRIVATE, | 27 | PRIVATE, |
| 28 | PUBLIC, | 28 | PUBLIC, |
| 29 | - MANAGEMENT | 29 | + MANAGEMENT_HOSTS, |
| 30 | + MANAGEMENT_LOCAL | ||
| 30 | } | 31 | } |
| 31 | 32 | ||
| 32 | enum ServiceType { | 33 | enum ServiceType { |
| 33 | VSG, | 34 | VSG, |
| 34 | - OLT_AGENT, | 35 | + ACCESS_AGENT, |
| 35 | MANAGEMENT, | 36 | MANAGEMENT, |
| 36 | DEFAULT | 37 | DEFAULT |
| 37 | } | 38 | } | ... | ... |
| ... | @@ -39,12 +39,8 @@ import java.util.Set; | ... | @@ -39,12 +39,8 @@ import java.util.Set; |
| 39 | 39 | ||
| 40 | import static com.google.common.base.Preconditions.checkNotNull; | 40 | import static com.google.common.base.Preconditions.checkNotNull; |
| 41 | import static com.google.common.base.Preconditions.checkArgument; | 41 | import static com.google.common.base.Preconditions.checkArgument; |
| 42 | -import static org.onosproject.xosclient.api.VtnServiceApi.NetworkType.PRIVATE; | 42 | +import static org.onosproject.xosclient.api.VtnServiceApi.NetworkType.*; |
| 43 | -import static org.onosproject.xosclient.api.VtnServiceApi.NetworkType.PUBLIC; | 43 | +import static org.onosproject.xosclient.api.VtnServiceApi.ServiceType.*; |
| 44 | -import static org.onosproject.xosclient.api.VtnServiceApi.NetworkType.MANAGEMENT; | ||
| 45 | -import static org.onosproject.xosclient.api.VtnServiceApi.ServiceType.DEFAULT; | ||
| 46 | -import static org.onosproject.xosclient.api.VtnServiceApi.ServiceType.OLT_AGENT; | ||
| 47 | -import static org.onosproject.xosclient.api.VtnServiceApi.ServiceType.VSG; | ||
| 48 | 44 | ||
| 49 | /** | 45 | /** |
| 50 | * Provides CORD VTN service and service dependency APIs. | 46 | * Provides CORD VTN service and service dependency APIs. |
| ... | @@ -180,8 +176,10 @@ public final class DefaultVtnServiceApi extends XosApi implements VtnServiceApi | ... | @@ -180,8 +176,10 @@ public final class DefaultVtnServiceApi extends XosApi implements VtnServiceApi |
| 180 | String name = netName.toUpperCase(); | 176 | String name = netName.toUpperCase(); |
| 181 | if (name.contains(PUBLIC.name())) { | 177 | if (name.contains(PUBLIC.name())) { |
| 182 | return PUBLIC; | 178 | return PUBLIC; |
| 183 | - } else if (name.contains(MANAGEMENT.name())) { | 179 | + } else if (name.contains(MANAGEMENT_HOSTS.name())) { |
| 184 | - return MANAGEMENT; | 180 | + return MANAGEMENT_HOSTS; |
| 181 | + } else if (name.contains("MANAGEMENT")) { | ||
| 182 | + return MANAGEMENT_LOCAL; | ||
| 185 | } else { | 183 | } else { |
| 186 | return PRIVATE; | 184 | return PRIVATE; |
| 187 | } | 185 | } |
| ... | @@ -194,8 +192,8 @@ public final class DefaultVtnServiceApi extends XosApi implements VtnServiceApi | ... | @@ -194,8 +192,8 @@ public final class DefaultVtnServiceApi extends XosApi implements VtnServiceApi |
| 194 | String name = netName.toUpperCase(); | 192 | String name = netName.toUpperCase(); |
| 195 | if (name.contains(VSG.name())) { | 193 | if (name.contains(VSG.name())) { |
| 196 | return VSG; | 194 | return VSG; |
| 197 | - } else if (name.contains(OLT_AGENT.name())) { | 195 | + } else if (name.contains(ACCESS_AGENT.name())) { |
| 198 | - return OLT_AGENT; | 196 | + return ACCESS_AGENT; |
| 199 | } else if (name.contains(ServiceType.MANAGEMENT.name())) { | 197 | } else if (name.contains(ServiceType.MANAGEMENT.name())) { |
| 200 | return ServiceType.MANAGEMENT; | 198 | return ServiceType.MANAGEMENT; |
| 201 | } else { | 199 | } else { | ... | ... |
-
Please register or login to post a comment