blob: 48bfe773abfa7e156959dcc38ad665784144e15b [file] [log] [blame]
Ray Milkey140e4782015-04-24 11:25:13 -07001/*
2 * Copyright 2014-2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.xosintegration;
17
Jonathan Hart5e9a63d2015-05-19 16:21:46 -070018import com.eclipsesource.json.JsonArray;
19import com.eclipsesource.json.JsonObject;
alshabib60562282015-06-01 16:45:04 -070020import com.google.common.collect.Maps;
Jonathan Hart5e9a63d2015-05-19 16:21:46 -070021import com.sun.jersey.api.client.Client;
Jonathan Hartb4558032015-05-20 16:32:04 -070022import com.sun.jersey.api.client.ClientHandlerException;
Jonathan Hart5e9a63d2015-05-19 16:21:46 -070023import com.sun.jersey.api.client.ClientResponse;
24import com.sun.jersey.api.client.WebResource;
25import com.sun.jersey.api.client.filter.HTTPBasicAuthFilter;
Ray Milkey140e4782015-04-24 11:25:13 -070026import org.apache.felix.scr.annotations.Activate;
27import org.apache.felix.scr.annotations.Component;
28import org.apache.felix.scr.annotations.Deactivate;
29import org.apache.felix.scr.annotations.Modified;
30import org.apache.felix.scr.annotations.Property;
31import org.apache.felix.scr.annotations.Reference;
32import org.apache.felix.scr.annotations.ReferenceCardinality;
33import org.apache.felix.scr.annotations.Service;
Jonathan Hart5e9a63d2015-05-19 16:21:46 -070034import org.onlab.packet.VlanId;
Ray Milkey140e4782015-04-24 11:25:13 -070035import org.onlab.util.Tools;
36import org.onosproject.cfg.ComponentConfigService;
37import org.onosproject.core.ApplicationId;
38import org.onosproject.core.CoreService;
Jonathan Hart5e9a63d2015-05-19 16:21:46 -070039import org.onosproject.net.ConnectPoint;
40import org.onosproject.net.DeviceId;
41import org.onosproject.net.PortNumber;
42import org.onosproject.net.flow.DefaultTrafficSelector;
43import org.onosproject.net.flow.DefaultTrafficTreatment;
44import org.onosproject.net.flow.TrafficSelector;
45import org.onosproject.net.flow.TrafficTreatment;
46import org.onosproject.net.flowobjective.DefaultForwardingObjective;
47import org.onosproject.net.flowobjective.FlowObjectiveService;
48import org.onosproject.net.flowobjective.ForwardingObjective;
Ray Milkey140e4782015-04-24 11:25:13 -070049import org.osgi.service.component.ComponentContext;
50import org.slf4j.Logger;
51
Jonathan Hart5e9a63d2015-05-19 16:21:46 -070052import java.util.Dictionary;
alshabib60562282015-06-01 16:45:04 -070053import java.util.Map;
Jonathan Hart5e9a63d2015-05-19 16:21:46 -070054import java.util.Set;
55import java.util.stream.Collectors;
56import java.util.stream.IntStream;
Ray Milkey140e4782015-04-24 11:25:13 -070057
58import static com.google.common.base.Strings.isNullOrEmpty;
59import static com.google.common.net.MediaType.JSON_UTF_8;
alshabib60562282015-06-01 16:45:04 -070060import static java.net.HttpURLConnection.*;
Ray Milkey140e4782015-04-24 11:25:13 -070061import static org.slf4j.LoggerFactory.getLogger;
62
63
64/**
65 * XOS interface application.
66 */
67@Component(immediate = true)
68@Service
69public class OnosXOSIntegrationManager implements VoltTenantService {
Ray Milkeydea98172015-05-18 10:39:39 -070070 private static final String XOS_SERVER_ADDRESS_PROPERTY_NAME =
71 "xosServerAddress";
72 private static final String XOS_SERVER_PORT_PROPERTY_NAME =
73 "xosServerPort";
74 private static final String XOS_PROVIDER_SERVICE_PROPERTY_NAME =
75 "xosProviderService";
Ray Milkey140e4782015-04-24 11:25:13 -070076
77 private static final String TEST_XOS_SERVER_ADDRESS = "10.254.1.22";
78 private static final int TEST_XOS_SERVER_PORT = 8000;
79 private static final String XOS_TENANT_BASE_URI = "/xoslib/volttenant/";
Ray Milkeydea98172015-05-18 10:39:39 -070080 private static final int TEST_XOS_PROVIDER_SERVICE = 1;
Ray Milkey140e4782015-04-24 11:25:13 -070081
Jonathan Hartb4558032015-05-20 16:32:04 -070082 private static final int PRIORITY = 50000;
Jonathan Hart5e9a63d2015-05-19 16:21:46 -070083 private static final DeviceId FABRIC_DEVICE_ID = DeviceId.deviceId("of:5e3e486e73000187");
84 private static final PortNumber FABRIC_OLT_CONNECT_POINT = PortNumber.portNumber(2);
85 private static final PortNumber FABRIC_VCPE_CONNECT_POINT = PortNumber.portNumber(3);
86 private static final String FABRIC_CONTROLLER_ADDRESS = "10.0.3.136";
87 private static final int FABRIC_SERVER_PORT = 8181;
88 private static final String FABRIC_BASE_URI = "/onos/cordfabric/vlans/add";
89
90 private static final ConnectPoint FABRIC_PORT = new ConnectPoint(
91 DeviceId.deviceId("of:000090e2ba82f974"),
92 PortNumber.portNumber(2));
93
Ray Milkey140e4782015-04-24 11:25:13 -070094 private final Logger log = getLogger(getClass());
95 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
96 protected CoreService coreService;
97 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
98 protected ComponentConfigService cfgService;
Ray Milkeydea98172015-05-18 10:39:39 -070099
Jonathan Hart5e9a63d2015-05-19 16:21:46 -0700100 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
101 protected FlowObjectiveService flowObjectiveService;
102
Ray Milkeydea98172015-05-18 10:39:39 -0700103 @Property(name = XOS_SERVER_ADDRESS_PROPERTY_NAME,
Ray Milkey140e4782015-04-24 11:25:13 -0700104 value = TEST_XOS_SERVER_ADDRESS,
105 label = "XOS Server address")
106 protected String xosServerAddress = TEST_XOS_SERVER_ADDRESS;
Ray Milkeydea98172015-05-18 10:39:39 -0700107
108 @Property(name = XOS_SERVER_PORT_PROPERTY_NAME,
Ray Milkey140e4782015-04-24 11:25:13 -0700109 intValue = TEST_XOS_SERVER_PORT,
110 label = "XOS Server port")
111 protected int xosServerPort = TEST_XOS_SERVER_PORT;
Ray Milkeydea98172015-05-18 10:39:39 -0700112
113 @Property(name = XOS_PROVIDER_SERVICE_PROPERTY_NAME,
114 intValue = TEST_XOS_PROVIDER_SERVICE,
115 label = "XOS Provider Service")
116 protected int xosProviderService = TEST_XOS_PROVIDER_SERVICE;
117
Ray Milkey140e4782015-04-24 11:25:13 -0700118 private ApplicationId appId;
alshabib60562282015-06-01 16:45:04 -0700119 private Map<String, ConnectPoint> nodeToPort;
alshabib17cde6d2015-06-05 15:03:51 -0700120 private Map<Long, Short> portToVlan;
Ray Milkey140e4782015-04-24 11:25:13 -0700121
122 @Activate
123 public void activate(ComponentContext context) {
124 log.info("XOS app is starting");
125 cfgService.registerProperties(getClass());
126 appId = coreService.registerApplication("org.onosproject.xosintegration");
alshabib60562282015-06-01 16:45:04 -0700127
128 setupMap();
129
Ray Milkey140e4782015-04-24 11:25:13 -0700130 readComponentConfiguration(context);
131
132 log.info("XOS({}) started", appId.id());
133 }
134
135 @Deactivate
136 public void deactivate() {
137 cfgService.unregisterProperties(getClass(), false);
138 log.info("XOS({}) stopped", appId.id());
139 }
140
141 @Modified
142 public void modified(ComponentContext context) {
143 readComponentConfiguration(context);
144 }
145
alshabib60562282015-06-01 16:45:04 -0700146 private void setupMap() {
147 nodeToPort = Maps.newHashMap();
148
149 nodeToPort.put("cordcompute01.onlab.us", new ConnectPoint(FABRIC_DEVICE_ID,
150 PortNumber.portNumber(4)));
151
152 nodeToPort.put("cordcompute02.onlab.us", new ConnectPoint(FABRIC_DEVICE_ID,
153 PortNumber.portNumber(3)));
alshabib17cde6d2015-06-05 15:03:51 -0700154
Jonathan Hartc02437c2015-06-09 10:05:13 -0700155 portToVlan = Maps.newHashMap();
alshabib17cde6d2015-06-05 15:03:51 -0700156 portToVlan.putIfAbsent(2L, (short) 201);
157 portToVlan.putIfAbsent(6L, (short) 401);
alshabib60562282015-06-01 16:45:04 -0700158 }
159
Ray Milkey140e4782015-04-24 11:25:13 -0700160 /**
161 * Converts a JSON representation of a tenant into a tenant object.
162 *
163 * @param jsonTenant JSON object representing the tenant
164 * @return volt tenant object
165 */
166 private VoltTenant jsonToTenant(JsonObject jsonTenant) {
167 return VoltTenant.builder()
168 .withHumanReadableName(jsonTenant.get("humanReadableName").asString())
169 .withId(jsonTenant.get("id").asInt())
170 .withProviderService(jsonTenant.get("provider_service").asInt())
171 .withServiceSpecificId(jsonTenant.get("service_specific_id").asString())
172 .withVlanId(jsonTenant.get("vlan_id").asString())
173 .build();
174 }
175
176 /**
177 * Converts a tenant object into a JSON string.
178 *
179 * @param tenant volt tenant object to convert
180 * @return JSON string for the tenant
181 */
182 private String tenantToJson(VoltTenant tenant) {
183 return "{"
184 + "\"humanReadableName\": \"" + tenant.humanReadableName() + "\","
185 + "\"id\": \"" + tenant.id() + "\","
186 + "\"provider_service\": \"" + tenant.providerService() + "\","
187 + "\"service_specific_id\": \"" + tenant.serviceSpecificId() + "\","
188 + "\"vlan_id\": \"" + tenant.vlanId() + "\""
189 + "}";
190 }
191
192 /**
193 * Gets a client web resource builder for the base XOS REST API
194 * with no additional URI.
195 *
196 * @return web resource builder
197 */
Simon Hunt8483e9d2015-05-26 18:22:07 -0700198 @Deprecated
Ray Milkey140e4782015-04-24 11:25:13 -0700199 private WebResource.Builder getClientBuilder() {
200 return getClientBuilder("");
201 }
202
203 /**
204 * Gets a client web resource builder for the base XOS REST API
205 * with an optional additional URI.
206 *
207 * @return web resource builder
208 */
Simon Hunt8483e9d2015-05-26 18:22:07 -0700209 @Deprecated
Ray Milkey140e4782015-04-24 11:25:13 -0700210 private WebResource.Builder getClientBuilder(String uri) {
211 String baseUrl = "http://" + xosServerAddress + ":"
212 + Integer.toString(xosServerPort);
213 Client client = Client.create();
214 client.addFilter(new HTTPBasicAuthFilter("padmin@vicci.org", "letmein"));
215 WebResource resource = client.resource(baseUrl
216 + XOS_TENANT_BASE_URI + uri);
217 return resource.accept(JSON_UTF_8.toString())
218 .type(JSON_UTF_8.toString());
219 }
220
221 /**
222 * Performs a REST GET operation on the base XOS REST URI.
223 *
224 * @return JSON string fetched by the GET operation
225 */
Simon Hunt8483e9d2015-05-26 18:22:07 -0700226 @Deprecated
Ray Milkey140e4782015-04-24 11:25:13 -0700227 private String getRest() {
228 return getRest("");
229 }
230
231 /**
232 * Performs a REST GET operation on the base XOS REST URI with
233 * an optional additional URI.
234 *
235 * @return JSON string fetched by the GET operation
236 */
Simon Hunt8483e9d2015-05-26 18:22:07 -0700237 @Deprecated
Ray Milkey140e4782015-04-24 11:25:13 -0700238 private String getRest(String uri) {
239 WebResource.Builder builder = getClientBuilder(uri);
240 ClientResponse response = builder.get(ClientResponse.class);
241
242 if (response.getStatus() != HTTP_OK) {
243 log.info("REST GET request returned error code {}",
244 response.getStatus());
245 }
246 String jsonString = response.getEntity(String.class);
247 log.info("JSON read:\n{}", jsonString);
248
249 return jsonString;
250 }
251
252 /**
253 * Performs a REST POST operation of a json string on the base
254 * XOS REST URI with an optional additional URI.
255 *
256 * @param json JSON string to post
257 */
Simon Hunt8483e9d2015-05-26 18:22:07 -0700258 @Deprecated
alshabib60562282015-06-01 16:45:04 -0700259 private String postRest(String json) {
Ray Milkey140e4782015-04-24 11:25:13 -0700260 WebResource.Builder builder = getClientBuilder();
Jonathan Hartb4558032015-05-20 16:32:04 -0700261 ClientResponse response;
262
263 try {
264 response = builder.post(ClientResponse.class, json);
265 } catch (ClientHandlerException e) {
266 log.warn("Unable to contact REST server: {}", e.getMessage());
alshabib60562282015-06-01 16:45:04 -0700267 return "{ 'error' : 'oops no one home' }";
Jonathan Hartb4558032015-05-20 16:32:04 -0700268 }
Ray Milkey140e4782015-04-24 11:25:13 -0700269
270 if (response.getStatus() != HTTP_CREATED) {
271 log.info("REST POST request returned error code {}",
272 response.getStatus());
273 }
alshabib60562282015-06-01 16:45:04 -0700274 return response.getEntity(String.class);
Ray Milkey140e4782015-04-24 11:25:13 -0700275 }
276
277 /**
278 * Performs a REST DELETE operation on the base
279 * XOS REST URI with an optional additional URI.
280 *
281 * @param uri optional additional URI
282 */
Simon Hunt8483e9d2015-05-26 18:22:07 -0700283 @Deprecated
Ray Milkey140e4782015-04-24 11:25:13 -0700284 private void deleteRest(String uri) {
285 WebResource.Builder builder = getClientBuilder(uri);
286 ClientResponse response = builder.delete(ClientResponse.class);
287
288 if (response.getStatus() != HTTP_NO_CONTENT) {
289 log.info("REST DELETE request returned error code {}",
290 response.getStatus());
291 }
292 }
293
294 /**
295 * Deletes the tenant with the given ID.
296 *
297 * @param tenantId ID of tenant to delete
298 */
299 private void deleteTenant(long tenantId) {
300 deleteRest(Long.toString(tenantId));
301 }
302
303 @Override
304 public Set<VoltTenant> getAllTenants() {
305 String jsonString = getRest();
306
307 JsonArray voltTenantItems = JsonArray.readFrom(jsonString);
308
309 return IntStream.range(0, voltTenantItems.size())
310 .mapToObj(index -> jsonToTenant(voltTenantItems.get(index).asObject()))
311 .collect(Collectors.toSet());
312 }
313
314 @Override
315 public void removeTenant(long id) {
316 deleteTenant(id);
317 }
318
319 @Override
320 public VoltTenant addTenant(VoltTenant newTenant) {
Ray Milkeydea98172015-05-18 10:39:39 -0700321 long providerServiceId = newTenant.providerService();
322 if (providerServiceId == -1) {
323 providerServiceId = xosProviderService;
324 }
325 VoltTenant tenantToCreate = VoltTenant.builder()
326 .withProviderService(providerServiceId)
327 .withServiceSpecificId(newTenant.serviceSpecificId())
328 .withVlanId(newTenant.vlanId())
Jonathan Hart5e9a63d2015-05-19 16:21:46 -0700329 .withPort(newTenant.port())
Ray Milkeydea98172015-05-18 10:39:39 -0700330 .build();
331 String json = tenantToJson(tenantToCreate);
Jonathan Hart5e9a63d2015-05-19 16:21:46 -0700332
alshabib60562282015-06-01 16:45:04 -0700333 //provisionDataPlane(tenantToCreate);
Jonathan Hart5e9a63d2015-05-19 16:21:46 -0700334
alshabib60562282015-06-01 16:45:04 -0700335 String retJson = postRest(json);
Jonathan Hart5e9a63d2015-05-19 16:21:46 -0700336
alshabib60562282015-06-01 16:45:04 -0700337 fetchCPELocation(newTenant, retJson);
Jonathan Hart5e9a63d2015-05-19 16:21:46 -0700338
Ray Milkey140e4782015-04-24 11:25:13 -0700339 return newTenant;
340 }
341
alshabib60562282015-06-01 16:45:04 -0700342 private void fetchCPELocation(VoltTenant newTenant, String jsonString) {
343 JsonObject json = JsonObject.readFrom(jsonString);
344
345 if (json.get("computeNodeName") != null) {
Jonathan Hart10b98ad2015-06-02 09:53:12 -0700346 ConnectPoint point = nodeToPort.get(json.get("computeNodeName").asString());
alshabib48dd9a12015-06-05 14:45:57 -0700347 ConnectPoint fromPoint = newTenant.port();
alshabib60562282015-06-01 16:45:04 -0700348
349 provisionFabric(VlanId.vlanId(Short.parseShort(newTenant.vlanId())),
alshabib48dd9a12015-06-05 14:45:57 -0700350 point, fromPoint);
alshabib60562282015-06-01 16:45:04 -0700351 }
352
353 }
354
Ray Milkey140e4782015-04-24 11:25:13 -0700355 @Override
356 public VoltTenant getTenant(long id) {
357 String jsonString = getRest(Long.toString(id));
358 JsonObject jsonTenant = JsonObject.readFrom(jsonString);
359 if (jsonTenant.get("id") != null) {
360 return jsonToTenant(jsonTenant);
361 } else {
362 return null;
363 }
364 }
365
Jonathan Hart5e9a63d2015-05-19 16:21:46 -0700366 private void provisionDataPlane(VoltTenant tenant) {
367 VlanId vlan = VlanId.vlanId(Short.parseShort(tenant.vlanId()));
368
369 TrafficSelector fromGateway = DefaultTrafficSelector.builder()
370 .matchInPhyPort(tenant.port().port())
371 .build();
372
373 TrafficSelector fromFabric = DefaultTrafficSelector.builder()
374 .matchInPhyPort(FABRIC_PORT.port())
375 .matchVlanId(vlan)
376 .build();
377
378 TrafficTreatment toFabric = DefaultTrafficTreatment.builder()
379 .pushVlan()
380 .setVlanId(vlan)
381 .setOutput(FABRIC_PORT.port())
382 .build();
383
384 TrafficTreatment toGateway = DefaultTrafficTreatment.builder()
385 .popVlan()
386 .setOutput(tenant.port().port())
387 .build();
388
389 ForwardingObjective forwardToFabric = DefaultForwardingObjective.builder()
390 .withFlag(ForwardingObjective.Flag.VERSATILE)
Jonathan Hartb4558032015-05-20 16:32:04 -0700391 .withPriority(PRIORITY)
Jonathan Hart5e9a63d2015-05-19 16:21:46 -0700392 .makePermanent()
393 .fromApp(appId)
394 .withSelector(fromGateway)
395 .withTreatment(toFabric)
396 .add();
397
398 ForwardingObjective forwardToGateway = DefaultForwardingObjective.builder()
399 .withFlag(ForwardingObjective.Flag.VERSATILE)
Jonathan Hartb4558032015-05-20 16:32:04 -0700400 .withPriority(PRIORITY)
Jonathan Hart5e9a63d2015-05-19 16:21:46 -0700401 .makePermanent()
402 .fromApp(appId)
403 .withSelector(fromFabric)
404 .withTreatment(toGateway)
405 .add();
406
407 flowObjectiveService.forward(FABRIC_PORT.deviceId(), forwardToFabric);
408 flowObjectiveService.forward(FABRIC_PORT.deviceId(), forwardToGateway);
409 }
410
alshabib48dd9a12015-06-05 14:45:57 -0700411 private void provisionFabric(VlanId vlanId, ConnectPoint point, ConnectPoint fromPoint) {
alshabib60562282015-06-01 16:45:04 -0700412 //String json = "{\"vlan\":" + vlanId + ",\"ports\":[";
413 //json += "{\"device\":\"" + FABRIC_DEVICE_ID.toString() + "\",\"port\":\""
414 // + FABRIC_OLT_CONNECT_POINT.toString() + "\"},";
415 //json += "{\"device\":\"" + FABRIC_DEVICE_ID.toString() + "\",\"port\":\""
416 // + FABRIC_VCPE_CONNECT_POINT.toString() + "\"}";
417 //json += "]}";
418
alshabibc4b5d462015-06-08 23:06:24 -0700419 long vlan = portToVlan.get(fromPoint.port().toLong());
420
421
alshabib60562282015-06-01 16:45:04 -0700422 JsonObject node = new JsonObject();
alshabibc4b5d462015-06-08 23:06:24 -0700423 node.add("vlan", vlan);
424 if (vlan == 201) {
425 node.add("iptv", true);
426 } else {
427 node.add("iptv", false);
428 }
alshabib60562282015-06-01 16:45:04 -0700429 JsonArray array = new JsonArray();
430 JsonObject cp1 = new JsonObject();
431 JsonObject cp2 = new JsonObject();
432 cp1.add("device", point.deviceId().toString());
433 cp1.add("port", point.port().toLong());
alshabib48dd9a12015-06-05 14:45:57 -0700434 cp2.add("device", fromPoint.deviceId().toString());
435 cp2.add("port", fromPoint.port().toLong());
alshabib60562282015-06-01 16:45:04 -0700436 array.add(cp1);
437 array.add(cp2);
438 node.add("ports", array);
439
Jonathan Hart5e9a63d2015-05-19 16:21:46 -0700440
441 String baseUrl = "http://" + FABRIC_CONTROLLER_ADDRESS + ":"
442 + Integer.toString(FABRIC_SERVER_PORT);
443 Client client = Client.create();
Jonathan Hartb4558032015-05-20 16:32:04 -0700444 WebResource resource = client.resource(baseUrl + FABRIC_BASE_URI);
Jonathan Hart5e9a63d2015-05-19 16:21:46 -0700445 WebResource.Builder builder = resource.accept(JSON_UTF_8.toString())
446 .type(JSON_UTF_8.toString());
447
Jonathan Hartb4558032015-05-20 16:32:04 -0700448 try {
Jonathan Hart8e36be52015-06-05 10:54:29 -0700449 builder.post(ClientResponse.class, node.toString());
Jonathan Hartb4558032015-05-20 16:32:04 -0700450 } catch (ClientHandlerException e) {
Jonathan Hart8e36be52015-06-05 10:54:29 -0700451 log.warn("Unable to contact fabric REST server: {}", e.getMessage());
Jonathan Hartb4558032015-05-20 16:32:04 -0700452 return;
453 }
Jonathan Hart5e9a63d2015-05-19 16:21:46 -0700454 }
455
Ray Milkey140e4782015-04-24 11:25:13 -0700456 /**
457 * Extracts properties from the component configuration context.
458 *
459 * @param context the component context
460 */
461 private void readComponentConfiguration(ComponentContext context) {
462 Dictionary<?, ?> properties = context.getProperties();
463
Ray Milkeydea98172015-05-18 10:39:39 -0700464 String newXosServerAddress =
465 Tools.get(properties, XOS_SERVER_ADDRESS_PROPERTY_NAME);
Ray Milkey140e4782015-04-24 11:25:13 -0700466 if (!isNullOrEmpty(newXosServerAddress)) {
467 xosServerAddress = newXosServerAddress;
468 }
469
Ray Milkeydea98172015-05-18 10:39:39 -0700470 String newXosServerPortString =
471 Tools.get(properties, XOS_SERVER_PORT_PROPERTY_NAME);
Ray Milkey140e4782015-04-24 11:25:13 -0700472 if (!isNullOrEmpty(newXosServerPortString)) {
473 xosServerPort = Integer.parseInt(newXosServerPortString);
474 }
Ray Milkeydea98172015-05-18 10:39:39 -0700475
476 String newXosProviderServiceString =
477 Tools.get(properties, XOS_PROVIDER_SERVICE_PROPERTY_NAME);
478 if (!isNullOrEmpty(newXosProviderServiceString)) {
479 xosProviderService = Integer.parseInt(newXosProviderServiceString);
480 }
Ray Milkey140e4782015-04-24 11:25:13 -0700481 }
482}
483
484