2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.policy.pap.xacml.rest.controller;
23 import com.fasterxml.jackson.databind.DeserializationFeature;
24 import com.fasterxml.jackson.databind.JsonNode;
25 import com.fasterxml.jackson.databind.ObjectMapper;
27 import java.io.IOException;
28 import java.util.Date;
29 import java.util.List;
31 import javax.servlet.http.HttpServletRequest;
32 import javax.servlet.http.HttpServletResponse;
34 import org.onap.policy.pap.xacml.rest.adapters.GridData;
35 import org.onap.policy.pap.xacml.rest.daoimpl.CommonClassDaoImpl;
36 import org.onap.policy.pap.xacml.rest.util.DictionaryUtils;
37 import org.onap.policy.rest.dao.CommonClassDao;
38 import org.onap.policy.rest.jpa.ClosedLoopD2Services;
39 import org.onap.policy.rest.jpa.ClosedLoopSite;
40 import org.onap.policy.rest.jpa.OnapName;
41 import org.onap.policy.rest.jpa.PepOptions;
42 import org.onap.policy.rest.jpa.UserInfo;
43 import org.onap.policy.rest.jpa.VnfType;
44 import org.onap.policy.rest.jpa.VsclAction;
45 import org.onap.policy.rest.jpa.VarbindDictionary;
46 import org.springframework.beans.factory.annotation.Autowired;
47 import org.springframework.http.MediaType;
48 import org.springframework.stereotype.Controller;
49 import org.springframework.web.bind.annotation.RequestMapping;
50 import org.springframework.web.bind.annotation.RequestMethod;
51 import org.springframework.web.servlet.ModelAndView;
54 public class ClosedLoopDictionaryController {
56 private static CommonClassDao commonClassDao;
57 private static String vsclaction = "action";
58 private static String operation = "operation";
59 private static String vnftype = "type";
60 private static String pepName = "pepName";
61 private static String varbindName = "varbindName";
62 private static String serviceName = "serviceName";
63 private static String siteName = "siteName";
64 private static String dictionaryFields = "dictionaryFields";
65 private static String duplicateResponseString = "Duplicate";
66 private static String userid = "userid";
67 private static String vsclActionDatas = "vsclActionDictionaryDatas";
68 private static String vnfTypeDatas = "vnfTypeDictionaryDatas";
69 private static String pepOptionDatas = "pepOptionsDictionaryDatas";
70 private static String varbindDatas = "varbindDictionaryDatas";
71 private static String closedLoopDatas = "closedLoopServiceDictionaryDatas";
72 private static String closedLoopSiteDatas = "closedLoopSiteDictionaryDatas";
75 public ClosedLoopDictionaryController(CommonClassDao commonClassDao) {
76 ClosedLoopDictionaryController.commonClassDao = commonClassDao;
79 public void setCommonClassDao(CommonClassDao commonClassDao) {
80 ClosedLoopDictionaryController.commonClassDao = commonClassDao;
83 public static void setCommonClassDao(CommonClassDaoImpl commonClassDaoImpl) {
84 commonClassDao = commonClassDaoImpl;
87 public ClosedLoopDictionaryController() {
91 private DictionaryUtils getDictionaryUtilsInstance() {
92 return DictionaryUtils.getDictionaryUtils();
96 value = {"/get_VSCLActionDataByName"},
97 method = {RequestMethod.GET},
98 produces = MediaType.APPLICATION_JSON_VALUE)
99 public void getVSCLActionDictionaryByNameEntityData(HttpServletResponse response) {
100 DictionaryUtils utils = getDictionaryUtilsInstance();
101 utils.getDataByEntity(response, vsclActionDatas, vsclaction, VsclAction.class);
105 value = {"/get_VSCLActionData"},
106 method = {RequestMethod.GET},
107 produces = MediaType.APPLICATION_JSON_VALUE)
108 public void getVSCLActionDictionaryEntityData(HttpServletResponse response) {
109 DictionaryUtils utils = getDictionaryUtilsInstance();
110 utils.getData(response, vsclActionDatas, VsclAction.class);
114 value = {"/get_VNFTypeDataByName"},
115 method = {RequestMethod.GET},
116 produces = MediaType.APPLICATION_JSON_VALUE)
117 public void getVNFTypeDictionaryByNameEntityData(HttpServletResponse response) {
118 DictionaryUtils utils = getDictionaryUtilsInstance();
119 utils.getDataByEntity(response, vnfTypeDatas, vnftype, VnfType.class);
123 value = {"/get_VNFTypeData"},
124 method = {RequestMethod.GET},
125 produces = MediaType.APPLICATION_JSON_VALUE)
126 public void getVNFTypeDictionaryEntityData(HttpServletResponse response) {
127 DictionaryUtils utils = getDictionaryUtilsInstance();
128 utils.getData(response, vnfTypeDatas, VnfType.class);
132 value = {"/get_PEPOptionsDataByName"},
133 method = {RequestMethod.GET},
134 produces = MediaType.APPLICATION_JSON_VALUE)
135 public void getPEPOptionsDictionaryByNameEntityData(HttpServletResponse response) {
136 DictionaryUtils utils = getDictionaryUtilsInstance();
137 utils.getDataByEntity(response, pepOptionDatas, pepName, PepOptions.class);
141 value = {"/get_PEPOptionsData"},
142 method = {RequestMethod.GET},
143 produces = MediaType.APPLICATION_JSON_VALUE)
144 public void getPEPOptionsDictionaryEntityData(HttpServletResponse response) {
145 DictionaryUtils utils = getDictionaryUtilsInstance();
146 utils.getData(response, pepOptionDatas, PepOptions.class);
150 value = {"/get_VarbindDictionaryDataByName"},
151 method = {RequestMethod.GET},
152 produces = MediaType.APPLICATION_JSON_VALUE)
153 public void getVarbindDictionaryByNameEntityData(HttpServletResponse response) {
154 DictionaryUtils utils = getDictionaryUtilsInstance();
155 utils.getDataByEntity(response, varbindDatas, varbindName, VarbindDictionary.class);
159 value = {"/get_VarbindDictionaryData"},
160 method = {RequestMethod.GET},
161 produces = MediaType.APPLICATION_JSON_VALUE)
162 public void getVarbindDictionaryEntityData(HttpServletResponse response) {
163 DictionaryUtils utils = getDictionaryUtilsInstance();
164 utils.getData(response, varbindDatas, VarbindDictionary.class);
168 value = {"/get_ClosedLoopServicesDataByName"},
169 method = {RequestMethod.GET},
170 produces = MediaType.APPLICATION_JSON_VALUE)
171 public void getClosedLoopServiceDictionaryByNameEntityData(HttpServletResponse response) {
172 DictionaryUtils utils = getDictionaryUtilsInstance();
173 utils.getDataByEntity(response, closedLoopDatas, serviceName, ClosedLoopD2Services.class);
177 value = {"/get_ClosedLoopServicesData"},
178 method = {RequestMethod.GET},
179 produces = MediaType.APPLICATION_JSON_VALUE)
180 public void getClosedLoopServiceDictionaryEntityData(HttpServletResponse response) {
181 DictionaryUtils utils = getDictionaryUtilsInstance();
182 utils.getData(response, closedLoopDatas, ClosedLoopD2Services.class);
186 value = {"/get_ClosedLoopSiteDataByName"},
187 method = {RequestMethod.GET},
188 produces = MediaType.APPLICATION_JSON_VALUE)
189 public void getClosedLoopSiteDictionaryByNameEntityData(HttpServletResponse response) {
190 DictionaryUtils utils = getDictionaryUtilsInstance();
191 utils.getDataByEntity(response, closedLoopSiteDatas, siteName, ClosedLoopSite.class);
195 value = {"/get_ClosedLoopSiteData"},
196 method = {RequestMethod.GET},
197 produces = MediaType.APPLICATION_JSON_VALUE)
198 public void getClosedLoopSiteDictionaryEntityData(HttpServletResponse response) {
199 DictionaryUtils utils = getDictionaryUtilsInstance();
200 utils.getData(response, closedLoopSiteDatas, ClosedLoopSite.class);
203 @RequestMapping(value = {"/cl_dictionary/save_vsclAction"}, method = {RequestMethod.POST})
204 public ModelAndView saveVSCLAction(HttpServletRequest request, HttpServletResponse response) throws IOException {
205 DictionaryUtils utils = getDictionaryUtilsInstance();
207 boolean fromAPI = utils.isRequestFromAPI(request);
208 ObjectMapper mapper = new ObjectMapper();
209 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
210 JsonNode root = mapper.readTree(request.getReader());
211 VsclAction vSCLAction;
212 String userId = null;
214 vSCLAction = mapper.readValue(root.get(dictionaryFields).toString(), VsclAction.class);
217 vSCLAction = mapper.readValue(root.get("vsclActionDictionaryData").toString(), VsclAction.class);
218 userId = root.get(userid).textValue();
220 UserInfo userInfo = utils.getUserInfo(userId);
222 List<Object> duplicateData =
223 commonClassDao.checkDuplicateEntry(vSCLAction.getAction(), vsclaction, VsclAction.class);
224 boolean duplicateflag = false;
225 if (!duplicateData.isEmpty()) {
226 VsclAction data = (VsclAction) duplicateData.get(0);
227 if (request.getParameter(operation) != null && "update".equals(request.getParameter(operation))) {
228 vSCLAction.setId(data.getId());
229 } else if ((request.getParameter(operation) != null
230 && !"update".equals(request.getParameter(operation)))
231 || (request.getParameter(operation) == null && (data.getId() != vSCLAction.getId()))) {
232 duplicateflag = true;
235 String responseString = null;
236 if (!duplicateflag) {
237 vSCLAction.setUserModifiedBy(userInfo);
238 if (vSCLAction.getId() == 0) {
239 vSCLAction.setUserCreatedBy(userInfo);
240 commonClassDao.save(vSCLAction);
242 vSCLAction.setModifiedDate(new Date());
243 commonClassDao.update(vSCLAction);
245 responseString = mapper.writeValueAsString(commonClassDao.getData(VsclAction.class));
247 responseString = duplicateResponseString;
251 return utils.getResultForApi(responseString);
253 utils.setResponseData(response, vsclActionDatas, responseString);
255 } catch (Exception e) {
256 utils.setErrorResponseData(response, e);
261 @RequestMapping(value = {"/cl_dictionary/remove_VsclAction"}, method = {RequestMethod.POST})
262 public void removeVSCLAction(HttpServletRequest request, HttpServletResponse response) throws IOException {
263 DictionaryUtils utils = getDictionaryUtilsInstance();
264 utils.removeData(request, response, vsclActionDatas, OnapName.class);
267 @RequestMapping(value = {"/cl_dictionary/save_vnfType"}, method = {RequestMethod.POST})
268 public ModelAndView saveVnfType(HttpServletRequest request, HttpServletResponse response) throws IOException {
269 DictionaryUtils utils = getDictionaryUtilsInstance();
271 boolean fromAPI = utils.isRequestFromAPI(request);
272 ObjectMapper mapper = new ObjectMapper();
273 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
274 JsonNode root = mapper.readTree(request.getReader());
276 String userId = null;
278 vNFType = mapper.readValue(root.get(dictionaryFields).toString(), VnfType.class);
281 vNFType = mapper.readValue(root.get("vnfTypeDictionaryData").toString(), VnfType.class);
282 userId = root.get(userid).textValue();
284 UserInfo userInfo = utils.getUserInfo(userId);
286 List<Object> duplicateData =
287 commonClassDao.checkDuplicateEntry(vNFType.getType(), vnftype, VnfType.class);
288 boolean duplicateflag = false;
289 if (!duplicateData.isEmpty()) {
290 VnfType data = (VnfType) duplicateData.get(0);
291 if (request.getParameter(operation) != null && "update".equals(request.getParameter(operation))) {
292 vNFType.setId(data.getId());
293 } else if ((request.getParameter(operation) != null
294 && !"update".equals(request.getParameter(operation)))
295 || (request.getParameter(operation) == null && (data.getId() != vNFType.getId()))) {
296 duplicateflag = true;
299 String responseString = null;
300 if (!duplicateflag) {
301 vNFType.setUserModifiedBy(userInfo);
302 if (vNFType.getId() == 0) {
303 vNFType.setUserCreatedBy(userInfo);
304 commonClassDao.save(vNFType);
306 vNFType.setModifiedDate(new Date());
307 commonClassDao.update(vNFType);
309 responseString = mapper.writeValueAsString(commonClassDao.getData(VnfType.class));
311 responseString = duplicateResponseString;
315 return utils.getResultForApi(responseString);
317 utils.setResponseData(response, vnfTypeDatas, responseString);
319 } catch (Exception e) {
320 utils.setErrorResponseData(response, e);
325 @RequestMapping(value = {"/cl_dictionary/remove_vnfType"}, method = {RequestMethod.POST})
326 public void removeVnfType(HttpServletRequest request, HttpServletResponse response) throws IOException {
327 DictionaryUtils utils = getDictionaryUtilsInstance();
328 utils.removeData(request, response, vnfTypeDatas, VnfType.class);
331 @RequestMapping(value = {"/cl_dictionary/save_pepOptions"}, method = {RequestMethod.POST})
332 public ModelAndView savePEPOptions(HttpServletRequest request, HttpServletResponse response) throws IOException {
333 DictionaryUtils utils = getDictionaryUtilsInstance();
335 boolean fromAPI = utils.isRequestFromAPI(request);
336 ObjectMapper mapper = new ObjectMapper();
337 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
338 JsonNode root = mapper.readTree(request.getReader());
339 PepOptions pEPOptions;
341 String userId = null;
343 pEPOptions = mapper.readValue(root.get(dictionaryFields).toString(), PepOptions.class);
344 gridData = mapper.readValue(root.get(dictionaryFields).toString(), GridData.class);
347 pEPOptions = mapper.readValue(root.get("pepOptionsDictionaryData").toString(), PepOptions.class);
348 gridData = mapper.readValue(root.get("pepOptionsDictionaryData").toString(), GridData.class);
349 userId = root.get(userid).textValue();
351 UserInfo userInfo = utils.getUserInfo(userId);
353 if (!gridData.getAttributes().isEmpty()) {
354 pEPOptions.setActions(utils.appendKeyValue(gridData.getAttributes(), ":#@", "=#@"));
357 List<Object> duplicateData =
358 commonClassDao.checkDuplicateEntry(pEPOptions.getPepName(), pepName, PepOptions.class);
359 boolean duplicateflag = false;
360 if (!duplicateData.isEmpty()) {
361 PepOptions data = (PepOptions) duplicateData.get(0);
362 if (request.getParameter(operation) != null && "update".equals(request.getParameter(operation))) {
363 pEPOptions.setId(data.getId());
364 } else if ((request.getParameter(operation) != null
365 && !"update".equals(request.getParameter(operation)))
366 || (request.getParameter(operation) == null && (data.getId() != pEPOptions.getId()))) {
367 duplicateflag = true;
370 String responseString = null;
371 if (!duplicateflag) {
372 pEPOptions.setUserModifiedBy(userInfo);
373 if (pEPOptions.getId() == 0) {
374 pEPOptions.setUserCreatedBy(userInfo);
375 commonClassDao.save(pEPOptions);
377 pEPOptions.setModifiedDate(new Date());
378 commonClassDao.update(pEPOptions);
380 responseString = mapper.writeValueAsString(commonClassDao.getData(PepOptions.class));
382 responseString = duplicateResponseString;
386 return utils.getResultForApi(responseString);
388 utils.setResponseData(response, pepOptionDatas, responseString);
390 } catch (Exception e) {
391 utils.setErrorResponseData(response, e);
396 @RequestMapping(value = {"/cl_dictionary/remove_pepOptions"}, method = {RequestMethod.POST})
397 public void removePEPOptions(HttpServletRequest request, HttpServletResponse response) throws IOException {
398 DictionaryUtils utils = getDictionaryUtilsInstance();
399 utils.removeData(request, response, pepOptionDatas, VnfType.class);
402 @RequestMapping(value = {"/cl_dictionary/save_service"}, method = {RequestMethod.POST})
403 public ModelAndView saveServiceType(HttpServletRequest request, HttpServletResponse response) throws IOException {
404 DictionaryUtils utils = getDictionaryUtilsInstance();
406 boolean fromAPI = utils.isRequestFromAPI(request);
407 ObjectMapper mapper = new ObjectMapper();
408 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
409 JsonNode root = mapper.readTree(request.getReader());
410 ClosedLoopD2Services serviceData;
411 String userId = null;
413 serviceData = mapper.readValue(root.get(dictionaryFields).toString(), ClosedLoopD2Services.class);
416 serviceData = mapper.readValue(root.get("closedLoopServiceDictionaryData").toString(),
417 ClosedLoopD2Services.class);
418 userId = root.get(userid).textValue();
420 UserInfo userInfo = utils.getUserInfo(userId);
422 List<Object> duplicateData = commonClassDao.checkDuplicateEntry(serviceData.getServiceName(), serviceName,
423 ClosedLoopD2Services.class);
424 boolean duplicateflag = false;
425 if (!duplicateData.isEmpty()) {
426 ClosedLoopD2Services data = (ClosedLoopD2Services) duplicateData.get(0);
427 if (request.getParameter(operation) != null && "update".equals(request.getParameter(operation))) {
428 serviceData.setId(data.getId());
429 } else if ((request.getParameter(operation) != null
430 && !"update".equals(request.getParameter(operation)))
431 || (request.getParameter(operation) == null && (data.getId() != serviceData.getId()))) {
432 duplicateflag = true;
435 String responseString = null;
436 if (!duplicateflag) {
437 serviceData.setUserModifiedBy(userInfo);
438 if (serviceData.getId() == 0) {
439 serviceData.setUserCreatedBy(userInfo);
440 commonClassDao.save(serviceData);
442 serviceData.setModifiedDate(new Date());
443 commonClassDao.update(serviceData);
445 responseString = mapper.writeValueAsString(commonClassDao.getData(ClosedLoopD2Services.class));
447 responseString = duplicateResponseString;
450 return utils.getResultForApi(responseString);
452 utils.setResponseData(response, closedLoopDatas, responseString);
454 } catch (Exception e) {
455 utils.setErrorResponseData(response, e);
460 @RequestMapping(value = {"/cl_dictionary/remove_Service"}, method = {RequestMethod.POST})
461 public void removeServiceType(HttpServletRequest request, HttpServletResponse response) throws IOException {
462 DictionaryUtils utils = getDictionaryUtilsInstance();
463 utils.removeData(request, response, closedLoopDatas, VnfType.class);
466 @RequestMapping(value = {"/cl_dictionary/save_siteName"}, method = {RequestMethod.POST})
467 public ModelAndView saveSiteType(HttpServletRequest request, HttpServletResponse response) throws IOException {
468 DictionaryUtils utils = getDictionaryUtilsInstance();
470 boolean fromAPI = utils.isRequestFromAPI(request);
471 ObjectMapper mapper = new ObjectMapper();
472 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
473 JsonNode root = mapper.readTree(request.getReader());
474 ClosedLoopSite siteData;
475 String userId = null;
477 siteData = mapper.readValue(root.get(dictionaryFields).toString(), ClosedLoopSite.class);
480 siteData = mapper.readValue(root.get("closedLoopSiteDictionaryData").toString(), ClosedLoopSite.class);
481 userId = root.get(userid).textValue();
483 UserInfo userInfo = utils.getUserInfo(userId);
485 List<Object> duplicateData =
486 commonClassDao.checkDuplicateEntry(siteData.getSiteName(), siteName, ClosedLoopSite.class);
487 boolean duplicateflag = false;
488 if (!duplicateData.isEmpty()) {
489 ClosedLoopSite data = (ClosedLoopSite) duplicateData.get(0);
490 if (request.getParameter(operation) != null && "update".equals(request.getParameter(operation))) {
491 siteData.setId(data.getId());
492 } else if ((request.getParameter(operation) != null
493 && !"update".equals(request.getParameter(operation)))
494 || (request.getParameter(operation) == null && (data.getId() != siteData.getId()))) {
495 duplicateflag = true;
498 String responseString = null;
499 if (!duplicateflag) {
500 siteData.setUserModifiedBy(userInfo);
501 if (siteData.getId() == 0) {
502 siteData.setUserCreatedBy(userInfo);
503 commonClassDao.save(siteData);
505 siteData.setModifiedDate(new Date());
506 commonClassDao.update(siteData);
508 responseString = mapper.writeValueAsString(commonClassDao.getData(ClosedLoopSite.class));
510 responseString = duplicateResponseString;
513 return utils.getResultForApi(responseString);
515 utils.setResponseData(response, closedLoopSiteDatas, responseString);
517 } catch (Exception e) {
518 utils.setErrorResponseData(response, e);
523 @RequestMapping(value = {"/cl_dictionary/remove_site"}, method = {RequestMethod.POST})
524 public void removeSiteType(HttpServletRequest request, HttpServletResponse response) throws IOException {
525 DictionaryUtils utils = getDictionaryUtilsInstance();
526 utils.removeData(request, response, closedLoopSiteDatas, VnfType.class);
529 @RequestMapping(value = {"/cl_dictionary/save_varbind"}, method = {RequestMethod.POST})
530 public ModelAndView saveVarbind(HttpServletRequest request, HttpServletResponse response) throws IOException {
531 DictionaryUtils utils = getDictionaryUtilsInstance();
533 boolean fromAPI = utils.isRequestFromAPI(request);
534 ObjectMapper mapper = new ObjectMapper();
535 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
536 JsonNode root = mapper.readTree(request.getReader());
537 VarbindDictionary varbindDictionary;
538 String userId = null;
540 varbindDictionary = mapper.readValue(root.get(dictionaryFields).toString(), VarbindDictionary.class);
544 mapper.readValue(root.get("varbindDictionaryData").toString(), VarbindDictionary.class);
545 userId = root.get(userid).textValue();
547 UserInfo userInfo = utils.getUserInfo(userId);
549 List<Object> duplicateData = commonClassDao.checkDuplicateEntry(varbindDictionary.getVarbindName(),
550 varbindName, VarbindDictionary.class);
551 boolean duplicateflag = false;
552 if (!duplicateData.isEmpty()) {
553 VarbindDictionary data = (VarbindDictionary) duplicateData.get(0);
554 if (request.getParameter(operation) != null && "update".equals(request.getParameter(operation))) {
555 varbindDictionary.setId(data.getId());
556 } else if ((request.getParameter(operation) != null
557 && !"update".equals(request.getParameter(operation)))
558 || (request.getParameter(operation) == null && (data.getId() != varbindDictionary.getId()))) {
559 duplicateflag = true;
563 String responseString = null;
564 if (!duplicateflag) {
565 varbindDictionary.setUserModifiedBy(userInfo);
566 if (varbindDictionary.getId() == 0) {
567 varbindDictionary.setUserCreatedBy(userInfo);
568 commonClassDao.save(varbindDictionary);
570 varbindDictionary.setModifiedDate(new Date());
571 commonClassDao.update(varbindDictionary);
573 responseString = mapper.writeValueAsString(commonClassDao.getData(VarbindDictionary.class));
575 responseString = duplicateResponseString;
578 return utils.getResultForApi(responseString);
580 utils.setResponseData(response, varbindDatas, responseString);
582 } catch (Exception e) {
583 utils.setErrorResponseData(response, e);
588 @RequestMapping(value = {"/cl_dictionary/remove_varbindDict"}, method = {RequestMethod.POST})
589 public void removeVarbind(HttpServletRequest request, HttpServletResponse response) throws IOException {
590 DictionaryUtils utils = getDictionaryUtilsInstance();
591 utils.removeData(request, response, varbindDatas, VnfType.class);