diff options
author | wr148d <wr148d@att.com> | 2021-01-15 15:32:00 -0500 |
---|---|---|
committer | wr148d <wr148d@att.com> | 2021-02-11 09:47:17 -0500 |
commit | 5ee7367a101143715c2869d72ea4a6fbf55f5af6 (patch) | |
tree | 84bf43601c0cce4fb37b5b3b494e113c96d5591e /src/app | |
parent | ddc05d4ea0254b427fea6ec80e2b03950eeca4ce (diff) |
Updated Sparky to add ECOMP functionality Browse, Specialized Search, BYOQ, and the Builder FE Updates
Issue-ID: AAI-3250
Change-Id: I576e37f77f7e9b40d72e4a5e7de645e9f62bc7d2
Signed-off-by: wr148d <wr148d@att.com>
Diffstat (limited to 'src/app')
88 files changed, 38026 insertions, 152 deletions
diff --git a/src/app/AppStore.js b/src/app/AppStore.js index 842b683..856ffca 100644 --- a/src/app/AppStore.js +++ b/src/app/AppStore.js @@ -28,6 +28,7 @@ import VnfSearchReducer from './vnfSearch/VnfSearchReducer.js'; import GlobalInlineMessageBarReducer from 'app/globalInlineMessageBar/GlobalInlineMessageBarReducer.js'; import ExtensibilityReducer from 'app/extensibility/ExtensibilityReducer.js'; import ConfigurableViewReducer from 'app/configurableViews/ConfigurableViewReducer.js'; +import ModelReducer from './model/modelSearch/ModelReducer.js'; function createCompose() { @@ -46,8 +47,9 @@ export const storeCreator = (initialState) => createStore( vnfSearch: VnfSearchReducer, globalInlineMessageBar: GlobalInlineMessageBarReducer, extensibility: ExtensibilityReducer, - configurableViews: ConfigurableViewReducer - }), + configurableViews: ConfigurableViewReducer, + modelReducer: ModelReducer + }), initialState, createCompose() ); diff --git a/src/app/MainScreenHeader.jsx b/src/app/MainScreenHeader.jsx index 7808d19..14d6bf2 100644 --- a/src/app/MainScreenHeader.jsx +++ b/src/app/MainScreenHeader.jsx @@ -25,14 +25,18 @@ import FontAwesome from 'react-fontawesome'; import {clearFilters} from 'filter-bar-utils'; import Button from 'react-bootstrap/lib/Button.js'; import Modal from 'react-bootstrap/lib/Modal.js'; -import GlobalAutoCompleteSearchBar from 'app/globalAutoCompleteSearchBar/GlobalAutoCompleteSearchBar.jsx'; import {postAnalyticsData, getStoreAnalyticsPayload} from 'app/analytics/AnalyticsActions.js'; import GlobalInlineMessageBar from 'app/globalInlineMessageBar/GlobalInlineMessageBar.jsx'; import {getClearGlobalMessageEvent} from 'app/globalInlineMessageBar/GlobalInlineMessageBarActions.js'; import {externalUrlRequest, externalMessageRequest, getSubscriptionPayload} from 'app/contextHandler/ContextHandlerActions.js'; import { getConfigurableViewConfigs } from 'app/configurableViews/ConfigurableViewActions.js'; +import {GlobalExtConstants} from 'utils/GlobalExtConstants.js'; +import axios from 'axios'; +import {BASE_URL} from 'app/networking/NetworkConstants.js'; + import { - filterBarActionTypes + filterBarActionTypes, + ENVIRONMENT } from 'utils/GlobalConstants.js'; import { @@ -43,8 +47,8 @@ import { import { AAI_TOP_LEFT_HEADER, AAI_HTML_TITLE, - MENU_ITEM_TIER_SUPPORT, - MENU_ITEM_VNF_SEARCH + AAI_APERTURE_SERVICE, + AAI_LOADTEMPLATE_MAX_COUNT } from './MainScreenWrapperConstants.js'; import { @@ -55,10 +59,13 @@ import { import {clearSuggestionsTextField} from 'app/globalAutoCompleteSearchBar/GlobalAutoCompleteSearchBarActions.js'; import {changeUrlAddress} from 'utils/Routes.js'; -import extensibleViews from 'resources/views/extensibleViews.json'; +import defaultViews from 'resources/views/defaultViews.json'; +import defaultViews_onap from 'resources/views/defaultViews_onap.json'; import {getPersonalizationDetails} from 'app/personlaization/PersonalizationActions.js'; import {isEmpty} from 'lodash'; +let INVLIST = GlobalExtConstants.INVLIST; + const mapStateToProps = ({mainWrapper, configurableViews}) => { let { showMenu = false, @@ -68,7 +75,9 @@ const mapStateToProps = ({mainWrapper, configurableViews}) => { subscriptionPayload = {}, subscriptionEnabled = false, aaiTopLeftPersonalizedHeader = AAI_TOP_LEFT_HEADER, - aaiPersonalizedHtmlDocumentTitle = AAI_HTML_TITLE + aaiPersonalizedHtmlDocumentTitle = AAI_HTML_TITLE, + aaiPersonalizedApertureService = AAI_APERTURE_SERVICE, + aaiPersonalizedLoadTemplateMaxCount = AAI_LOADTEMPLATE_MAX_COUNT } = mainWrapper; let { @@ -84,7 +93,9 @@ const mapStateToProps = ({mainWrapper, configurableViews}) => { subscriptionEnabled, configurableViewsConfig, aaiTopLeftPersonalizedHeader, - aaiPersonalizedHtmlDocumentTitle + aaiPersonalizedHtmlDocumentTitle, + aaiPersonalizedApertureService, + aaiPersonalizedLoadTemplateMaxCount }; }; @@ -130,7 +141,9 @@ class MainScreenHeader extends Component { secondaryTitle: PropTypes.string, subscriptionPayload: PropTypes.object, aaiTopLeftPersonalizedHeader: PropTypes.string, - aaiPersonalizedHtmlDocumentTitle: PropTypes.string + aaiPersonalizedHtmlDocumentTitle: PropTypes.string, + aaiPersonalizedApertureService: PropTypes.bool, + aaiPersonalizedLoadTemplateMaxCount: PropTypes.string }; navigationLinkAndCurrentPathMatch(location, to) { @@ -168,17 +181,67 @@ class MainScreenHeader extends Component { this.isValidExternalURL(this.props.match.params.externalUrl)) { this.props.onExternalUrlRequest(this.props.match.params.externalUrl); } + sessionStorage.setItem(ENVIRONMENT + 'ENABLE_ANALYSIS', !INVLIST.IS_ONAP); + var portalInfoPath = BASE_URL + '/portal/info'; + //portalInfoPath = 'https://localhost:8000/portal/info'; + axios.get(portalInfoPath).then(res => { + console.log('res:' + res.data); + var roles = []; + if(res.status === 200){ + if(res.data.status && (res.data.status !== '200')){ + this.setDefaultCredentials(res.data); + }else{ + sessionStorage.setItem(ENVIRONMENT + 'userId', res.data.attuid); + for(var i = 0; i < res.data.role.length; i++){ + roles.push(res.data.role[i].name); + } + sessionStorage.setItem(ENVIRONMENT + 'roles', roles); + } + }else{ + this.setDefaultCredentials(res.data); + } + }, error=>{ + this.setDefaultCredentials(error); + }).catch(error => { + this.setDefaultCredentials(error); + }); + } + + setDefaultCredentials = (error) =>{ + console.log('MainScreenHeader.jsx :: Issue retrieving portal info from sparky backend, setting default, details - ' + JSON.stringify(error)); + sessionStorage.setItem(ENVIRONMENT + 'userId', 'default_uid'); + var roles = ['ui_view']; + sessionStorage.setItem(ENVIRONMENT + 'roles', roles); } componentWillReceiveProps(nextProps) { if(!isEmpty(nextProps.aaiPersonalizedHtmlDocumentTitle)) { - if(!sessionStorage.getItem('PAGE_TITLE') || sessionStorage.getItem('PAGE_TITLE') !== nextProps.aaiPersonalizedHtmlDocumentTitle) { - sessionStorage.setItem('PAGE_TITLE', nextProps.aaiPersonalizedHtmlDocumentTitle); + if(!sessionStorage.getItem(ENVIRONMENT + 'PAGE_TITLE') || sessionStorage.getItem(ENVIRONMENT + 'PAGE_TITLE') !== nextProps.aaiPersonalizedHtmlDocumentTitle) { + sessionStorage.setItem(ENVIRONMENT + 'PAGE_TITLE', nextProps.aaiPersonalizedHtmlDocumentTitle); } document.title = nextProps.aaiPersonalizedHtmlDocumentTitle; } else { document.title = AAI_HTML_TITLE; } + //Added for APERTURE Service Enable/Disable + if(!sessionStorage.getItem(ENVIRONMENT + 'APERTURE_SERVICE') || JSON.parse(sessionStorage.getItem(ENVIRONMENT + 'APERTURE_SERVICE')) !== nextProps.aaiPersonalizedApertureService) { + if(JSON.parse(sessionStorage.getItem(ENVIRONMENT + 'APERTURE_SERVICE')) !== nextProps.aaiPersonalizedApertureService){ + sessionStorage.setItem(ENVIRONMENT + 'APERTURE_SERVICE', Boolean(nextProps.aaiPersonalizedApertureService)); + if(nextProps.aaiPersonalizedApertureService){ + sessionStorage.setItem(ENVIRONMENT + 'ENABLE_ANALYSIS', true); + }else{ + sessionStorage.setItem(ENVIRONMENT + 'ENABLE_ANALYSIS', false); + } + }else{ + sessionStorage.setItem(ENVIRONMENT + 'APERTURE_SERVICE', Boolean(nextProps.aaiPersonalizedApertureService)); + } + } + if(!sessionStorage.getItem(ENVIRONMENT + 'APERTURE_SERVICE')){ + sessionStorage.setItem(ENVIRONMENT + 'ENABLE_ANALYSIS', false); + } + if(!sessionStorage.getItem(ENVIRONMENT + 'LOADTEMPLATE_MAX_COUNT') || sessionStorage.getItem(ENVIRONMENT + 'LOADTEMPLATE_MAX_COUNT') !== nextProps.aaiPersonalizedLoadTemplateMaxCount) { + sessionStorage.setItem(ENVIRONMENT + 'LOADTEMPLATE_MAX_COUNT', nextProps.aaiPersonalizedLoadTemplateMaxCount); + } if (this.props.location && this.props.location.pathname !== nextProps.location.pathname) { @@ -295,33 +358,24 @@ class MainScreenHeader extends Component { )}/> ); - // add Tier Support view - menuOptions.push( - <MenuItem key='schemaMenu' to='/schema' label={MENU_ITEM_TIER_SUPPORT} - iconClass='button-icon view-inspect-button-icon'/> - ); - - // add VNF view - menuOptions.push( - <MenuItem key='vnfSearchMenu' - to='/vnfSearch' - label={MENU_ITEM_VNF_SEARCH} - iconClass='button-icon vnf-search-button-icon'/> - ); + let dv = defaultViews; + if(INVLIST.IS_ONAP){ + dv = defaultViews_onap; + } - // add all custom view menu options - for (let view in extensibleViews) { + // add all default view menu options + for (let view in dv) { let shouldDisplayIcon = false; - if(extensibleViews[view]['onlyRoute'] === undefined){ + if(dv[view]['onlyRoute'] === undefined){ shouldDisplayIcon = true; - } else if(extensibleViews[view]['onlyRoute'] === false){ + } else if(dv[view]['onlyRoute'] === false){ shouldDisplayIcon = true; } if(shouldDisplayIcon === true){ menuOptions.push( - <MenuItem key={extensibleViews[view]['viewName'] + 'Menu'} to={'/' + extensibleViews[view]['viewName']} - label={extensibleViews[view]['displayName']} - iconClass={'button-icon ' + extensibleViews[view]['iconClass']}/> + <MenuItem key={dv[view]['viewName'] + 'Menu'} to={'/' + dv[view]['viewName']} + label={dv[view]['displayName']} + iconClass={'button-icon font-awesome-icon fa ' + dv[view]['iconClass']}/> ); } } @@ -357,7 +411,6 @@ class MainScreenHeader extends Component { </Modal.Body> </Modal> <span className='application-title'>{aaiTopLeftPersonalizedHeader}</span> - <GlobalAutoCompleteSearchBar history={this.props.history}/> </div> <GlobalInlineMessageBar /> <div className={secondaryTitleClass}> diff --git a/src/app/MainScreenWrapper.jsx b/src/app/MainScreenWrapper.jsx index 3348494..5a5209d 100644 --- a/src/app/MainScreenWrapper.jsx +++ b/src/app/MainScreenWrapper.jsx @@ -20,7 +20,7 @@ */ import React, {Component} from 'react'; import {connect} from 'react-redux'; -import * as Extensibility from './extensibility/index.js'; +import * as Module from './module/index.js'; import TierSupport from './tierSupport/TierSupport.jsx'; import VnfSearch from './vnfSearch/VnfSearch.jsx'; import MainScreenHeader from './MainScreenHeader.jsx'; @@ -45,7 +45,7 @@ import { extensibleViewMessageCallback } from './MainScreenWrapperActionHelper.js'; -import extensibleViews from 'resources/views/extensibleViews.json'; +import defaultViews from 'resources/views/defaultViews.json'; import customComponentConfig from 'resources/views/customComponents.json'; import { newCustomComponentsEvent } from 'app/configurableViews/ConfigurableViewActions.js'; import { @@ -146,10 +146,10 @@ class MainScreenWrapper extends Component { } = this.props; let customViewList = []; - extensibleViews.forEach(function(view,key) { + defaultViews.forEach(function(view,key) { let path = '', extKey = ''; - if(isEmpty(extensibleViews[key]['viewParams'])){ + if(isEmpty(defaultViews[key]['viewParams'])){ path = '/' + view.viewName + '/:extensibleViewParams?'; extKey = view.viewName + 'Route'; } else { @@ -159,12 +159,12 @@ class MainScreenWrapper extends Component { var renderComponent = (props) => { let viewParams = {}; - if(isEmpty(extensibleViews[key]['viewParams']) && props.match.params.extensibleViewParams !== undefined) { + if(isEmpty(defaultViews[key]['viewParams']) && props.match.params.extensibleViewParams !== undefined) { viewParams = decryptParamsForView(props.match.params.extensibleViewParams); } - if (Extensibility.default.hasOwnProperty(view.componentName)) { - let Component = Extensibility.default[view.componentName]; + if (Module.default.hasOwnProperty(view.componentName)) { + let Component = Module.default[view.componentName]; return ( <Component {...props} @@ -189,7 +189,7 @@ class MainScreenWrapper extends Component { ); } }; - if(isEmpty(extensibleViews[key]['isExact']) && !extensibleViews[key]['isExact']){ + if(isEmpty(defaultViews[key]['isExact']) && !defaultViews[key]['isExact']){ customViewList.push( <Route key={extKey} path={path} render={renderComponent}/> ); @@ -205,7 +205,7 @@ class MainScreenWrapper extends Component { return ( <Router> - <div className='main-app-container'> + <div className='main-app-container' id='main-app-container'> <Switch> <Redirect from='/' exact to='/schema'/> </Switch> diff --git a/src/app/MainScreenWrapperConstants.js b/src/app/MainScreenWrapperConstants.js index a3748d0..f3baf28 100644 --- a/src/app/MainScreenWrapperConstants.js +++ b/src/app/MainScreenWrapperConstants.js @@ -39,3 +39,5 @@ export const AAI_TOP_LEFT_HEADER = 'A&AI'; export const AAI_HTML_TITLE = 'A&AI'; export const MENU_ITEM_TIER_SUPPORT = 'View & Inspect'; export const MENU_ITEM_VNF_SEARCH = 'VNFs'; +export const AAI_APERTURE_SERVICE = false; +export const AAI_LOADTEMPLATE_MAX_COUNT = 10; diff --git a/src/app/MainScreenWrapperReducer.js b/src/app/MainScreenWrapperReducer.js index 1875163..1301032 100644 --- a/src/app/MainScreenWrapperReducer.js +++ b/src/app/MainScreenWrapperReducer.js @@ -83,7 +83,9 @@ export default (state = {}, action) => { return { ...state, aaiTopLeftPersonalizedHeader: action.data.topLeftHeader, - aaiPersonalizedHtmlDocumentTitle: action.data.htmlDocumentTitle + aaiPersonalizedHtmlDocumentTitle: action.data.htmlDocumentTitle, + aaiPersonalizedApertureService: action.data.apertureService, + aaiPersonalizedLoadTemplateMaxCount: action.data.loadTemplateMaxCount }; } return state; diff --git a/src/app/assets/configuration/aai/CustomQueryList.json b/src/app/assets/configuration/aai/CustomQueryList.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/src/app/assets/configuration/aai/CustomQueryList.json @@ -0,0 +1 @@ +{} diff --git a/src/app/assets/configuration/aai/InvList.json b/src/app/assets/configuration/aai/InvList.json new file mode 100644 index 0000000..d0d0619 --- /dev/null +++ b/src/app/assets/configuration/aai/InvList.json @@ -0,0 +1,364 @@ +{ + "NODESERVER": false, + "PROXY": "proxy", + "PREFIX": "aai", + "VERSION": "v23", + "APERTURE": "aperture", + "APERTURE_SERVICENAME": "inquiry", + "IS_ONAP": true, + "USERGUIDE_URL": "", + "useStubs": false, + "TABULAR": "tabular", + "TABULARVERSION": "v1", + "animationIntervalMs": 5000, + "INVENTORYLIST": { + "AVAILABILITYZONES": { + "apiPath": "nodes/availability-zones", + "display": "Availability Zones", + "modelPath": "availabilityZones", + "icon": "browse-fa fa fa-globe" + }, + "ACTIVITIES": { + "apiPath": "nodes/activities", + "display": "Activities", + "modelPath": "activities", + "icon": "browse-fa fa fa-server" + }, + "AGGREGATEROUTES": { + "apiPath": "nodes/aggregate-route", + "display": "Aggregate Routes", + "modelPath": "aggregateRoutes", + "icon": "browse-fa fa fa-link" + }, + "AUTONOMOUSSYSTEMS": { + "apiPath": "nodes/autonomous-systems", + "display": "Autonomous Systems", + "modelPath": "autonomousSystems", + "icon": "browse-fa fa fa-desktop" + }, + "BGPGROUPS": { + "apiPath": "nodes/bgp-groups", + "display": "Bgp Groups", + "modelPath": "bgpGroups", + "icon": "browse-fa fa fa-server" + }, + "BGPNEIGHBORS": { + "apiPath": "nodes/bgp-neighbors", + "display": "Bgp Neighbors", + "modelPath": "bgpNeighbors", + "icon": "browse-fa fa fa-server" + }, + "CABLES": { + "apiPath": "nodes/cables", + "display": "Cables", + "modelPath": "cables", + "icon": "browse-fa fa fa-link" + }, + "COMPLEXES": { + "apiPath": "nodes/complexes", + "display": "Complexes", + "modelPath": "complexes", + "icon": "browse-fa fa fa-building" + }, + "CONFIGURATIONS": { + "apiPath": "nodes/configurations", + "display": "Configurations", + "modelPath": "configurations", + "icon": "browse-fa fa fa-list-alt" + }, + "CLOUDREGIONS": { + "apiPath": "nodes/cloud-regions", + "display": "Cloud Regions", + "modelPath": "cloudRegions", + "icon": "browse-fa fa fa-cloud" + }, + "CHASSIES": { + "apiPath": "nodes/chassies", + "display": "Chassies", + "modelPath": "chassies", + "icon": "browse-fa fa fa-server" + }, + "CARDS": { + "apiPath": "nodes/cards", + "display": "Cards", + "modelPath": "cards", + "icon": "browse-fa fa fa-hdd-o" + }, + "CONTACTS": { + "apiPath": "nodes/contacts", + "display": "Contacts", + "modelPath": "contacts", + "icon": "browse-fa fa fa-group" + }, + "CUSTOMERS": { + "apiPath": "nodes/customers", + "display": "Customers", + "modelPath": "customers", + "icon": "browse-fa fa fa-group" + }, + "ENDPOINTS": { + "apiPath": "nodes/endpoints", + "display": "Endpoints", + "modelPath": "endpoints", + "icon": "browse-fa fa fa-dot-circle-o" + }, + "GENERICVNFS": { + "apiPath": "nodes/generic-vnfs", + "display": "Generic Virtual Network Functions", + "modelPath": "genericVnfs", + "icon": "browse-fa fa fa-server" + }, + "GEOREGIONS": { + "apiPath": "nodes/geo-region", + "display": "GeoRegions", + "modelPath": "geoRegions", + "icon": "browse-fa fa fa-globe" + }, + "HARDWARECATALOGITEMS": { + "apiPath": "nodes/hardware-catalog-items", + "display": "Hardware Catalog Items", + "modelPath": "hardwareCatalogItems", + "icon": "browse-fa fa fa-server" + }, + "HOSTAGGREGATES": { + "apiPath": "nodes/host-aggregates", + "display": "Host-Aggregates", + "modelPath": "hostAggregates", + "icon": "browse-fa fa fa-cubes" + }, + "INSTANCEGROUPS": { + "apiPath": "nodes/instance-groups", + "display": "Instance Groups", + "modelPath": "instanceGroups", + "icon": "browse-fa fa fa-cubes" + }, + "LAGINTERFACES": { + "apiPath": "nodes/lag-interfaces", + "display": "Lag-Interfaces", + "modelPath": "lagInterfaces", + "icon": "browse-fa fa fa-hdd-o" + }, + "LAGLINKS": { + "apiPath": "network/lag-links", + "display": "Line Aggregation Links", + "modelPath": "lagLinks", + "icon": "browse-fa fa fa-exchange" + }, + "LINESOFBUSINESS": { + "apiPath": "nodes/lines-of-business", + "display": "Lines of Business", + "modelPath": "linesOfBusiness", + "icon": "browse-fa fa fa-server" + }, + "LINTERFACES": { + "apiPath": "nodes/l-interfaces", + "display": "L-Interfaces", + "modelPath": "lInterfaces", + "icon": "browse-fa fa fa-hdd-o" + }, + "LOGICALLINKS": { + "apiPath": "nodes/logical-links", + "display": "Logical Links", + "modelPath": "logicalLinks", + "icon": "browse-fa fa fa-exchange" + }, + "L3NETWORKS": { + "apiPath": "nodes/l3-networks", + "display": "L3 Networks", + "modelPath": "l3Networks", + "icon": "browse-fa fa fa-server" + }, + "MAPPINGS": { + "apiPath": "nodes/mappings", + "display": "Mappings", + "modelPath": "mappings", + "icon": "browse-fa fa fa-code-fork" + }, + "OBJECTGROUPS": { + "apiPath": "nodes/object-groups", + "display": "Object Groups", + "modelPath": "objectGroups", + "icon": "browse-fa fa fa-cubes" + }, + "OWNINGENTITIES": { + "apiPath": "nodes/owning-entities", + "display": "Owning Entities", + "modelPath": "owningEntities", + "icon": "browse-fa fa fa-sitemap" + }, + "PDUS": { + "apiPath": "nodes/pdus", + "display": "Power Distribution Units", + "modelPath": "pdus", + "icon": "browse-fa fa fa-flash" + }, + "PHYSICALLINKS": { + "apiPath": "nodes/physical-links", + "display": "Physical Links", + "modelPath": "physicalLinks", + "icon": "browse-fa fa fa-exchange" + }, + "PINTERFACES": { + "apiPath": "nodes/p-interfaces", + "display": "Physical Interface", + "modelPath": "pInterfaces", + "icon": "browse-fa fa fa-hdd-o" + }, + "PLUGGABLES": { + "apiPath": "nodes/pluggables", + "display": "Pluggables", + "modelPath": "pluggables", + "icon": "browse-fa fa fa-plug" + }, + "PLATFORMS": { + "apiPath": "business/platforms", + "display": "Platforms", + "modelPath": "platforms", + "icon": "browse-fa fa fa-connectdevelop" + }, + "PNFS": { + "apiPath": "nodes/pnfs", + "display": "Physical Network Functions", + "modelPath": "pnfs", + "icon": "browse-fa fa fa-server" + }, + "POLICIES": { + "apiPath": "nodes/policies", + "display": "Policies", + "modelPath": "policies", + "icon": "browse-fa fa fa-list-alt" + }, + "PORTS": { + "apiPath": "nodes/ports", + "display": "Ports", + "modelPath": "ports", + "icon": "browse-fa fa fa-dot-circle-o" + }, + "PROJECTS": { + "apiPath": "nodes/projects", + "display": "Projects", + "modelPath": "projects", + "icon": "browse-fa fa fa-cubes" + }, + "PROFILES": { + "apiPath": "nodes/profiles", + "display": "Profiles", + "modelPath": "profiles", + "icon": "browse-fa fa fa-list-alt" + }, + "PSERVERS": { + "apiPath": "nodes/pservers", + "display": "Physical Servers", + "modelPath": "pservers", + "icon": "browse-fa fa fa-server" + }, + "RACKS": { + "apiPath": "nodes/racks", + "display": "Racks", + "modelPath": "racks", + "icon": "browse-fa fa fa-server" + }, + "RULES": { + "apiPath": "nodes/rules", + "display": "Rules", + "modelPath": "rules", + "icon": "browse-fa fa fa-list-ol" + }, + "ROUTETARGETS": { + "apiPath": "nodes/route-targets", + "display": "Route Targets", + "modelPath": "routeTargets", + "icon": "browse-fa fa fa-server" + }, + "SERVICESUBSCRIPTIONS": { + "apiPath": "nodes/service-subscriptions", + "display": "Service Subscriptions", + "modelPath": "serviceSubscriptions", + "icon": "browse-fa fa fa-newspaper-o" + }, + "SERVICEINSTANCES": { + "apiPath": "nodes/service-instances", + "display": "Service Instances", + "modelPath": "serviceInstances", + "icon": "browse-fa fa fa-list-alt" + }, + "SUBNETS": { + "apiPath": "nodes/subnets", + "display": "Subnets", + "modelPath": "subnets", + "icon": "browse-fa fa fa-share-alt" + }, + "TENANTS": { + "apiPath": "nodes/tenants", + "display": "Tenants", + "modelPath": "tenants", + "icon": "browse-fa fa fa-cloud" + }, + "VCES": { + "apiPath": "network/vces", + "display": "Virtual Customer Edge Routers", + "modelPath": "vces", + "icon": "browse-fa fa fa-cloud" + }, + "VFMODULES": { + "apiPath": "nodes/vf-modules", + "display": "Virtual Function Modules", + "modelPath": "vfModules", + "icon": "browse-fa fa fa-cloud" + }, + "VIRTUALDATACENTERS": { + "apiPath": "cloud-infrastructure/virtual-data-centers", + "display": "Virtual Data Centers", + "modelPath": "virtualDataCenters", + "icon": "browse-fa fa fa-cloud" + }, + "VLANTAGS": { + "apiPath": "nodes/vlan-tags", + "display": "Vlan Tags", + "modelPath": "vlanTags", + "icon": "browse-fa fa fa-server" + }, + "VLANRANGES": { + "apiPath": "nodes/vlan-ranges", + "display": "Vlan Ranges", + "modelPath": "vlanRanges", + "icon": "browse-fa fa fa-server" + }, + "VNFCS": { + "apiPath": "network/vnfcs", + "display": "Virtual Network Function Components", + "modelPath": "vnfcs", + "icon": "browse-fa fa fa-server" + }, + "VPLSPES": { + "apiPath": "network/vpls-pes", + "display": "VPLS-PES", + "modelPath": "vplsPes", + "icon": "browse-fa fa fa-server" + }, + "VPNBINDINGS": { + "apiPath": "nodes/vpn-bindings", + "display": "VPN Bindings", + "modelPath": "vpnBindings", + "icon": "browse-fa fa fa-exchange" + }, + "VSERVERS": { + "apiPath": "nodes/vservers", + "display": "Virtual Servers", + "modelPath": "vservers", + "icon": "browse-fa fa fa-server" + }, + "VRFS": { + "apiPath": "nodes/vrfs", + "display": "VRFs", + "modelPath": "vrfs", + "icon": "browse-fa fa fa-server" + }, + "ZONES": { + "apiPath": "nodes/zones", + "display": "Zones", + "modelPath": "zones", + "icon": "browse-fa fa fa-map-marker" + } + } +} diff --git a/src/app/assets/configuration/aai/dbedgeRules.json b/src/app/assets/configuration/aai/dbedgeRules.json new file mode 100644 index 0000000..3b7b908 --- /dev/null +++ b/src/app/assets/configuration/aai/dbedgeRules.json @@ -0,0 +1,6036 @@ +{ + "rules": [ + { + "from": "allotted-resource", + "to": "generic-vnf", + "label": "org.onap.relationships.inventory.PartOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "allotted-resource", + "to": "instance-group", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "allotted-resource", + "to": "l3-network", + "label": "org.onap.relationships.inventory.PartOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "allotted-resource", + "to": "l-interface", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "allotted-resource", + "to": "network-policy", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "allotted-resource", + "to": "vlan", + "label": "org.onap.relationships.inventory.PartOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "allotted-resource", + "to": "vpn-binding", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "tunnel-xconnect", + "to": "allotted-resource", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "availability-zone", + "to": "complex", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "availability-zone", + "to": "service-capability", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "availability-zone", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "cloud-region", + "to": "complex", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "cloud-region", + "to": "l3-network", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "cloud-region", + "to": "zone", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "dvs-switch", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "flavor", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "group-assignment", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "image", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "oam-network", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "snapshot", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "tenant", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "vip-ipv4-address-list", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "vip-ipv6-address-list", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "volume-group", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "line-of-business", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "complex", + "to": "l3-network", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "ctag-pool", + "to": "complex", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "configuration", + "to": "allotted-resource", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "configuration", + "to": "logical-link", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "metadatum", + "to": "configuration", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "connector", + "to": "virtual-data-center", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "metadatum", + "to": "connector", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "element-choice-set", + "to": "constrained-element-set", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "ctag-pool", + "to": "availability-zone", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "service-subscription", + "to": "customer", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"service-subscription BelongsTo customer" + }, + { + "from": "dvs-switch", + "to": "availability-zone", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "model-element", + "to": "element-choice-set", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "entitlement", + "to": "generic-vnf", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "generic-vnf", + "to": "availability-zone", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "generic-vnf", + "to": "complex", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "generic-vnf", + "to": "configuration", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "generic-vnf", + "to": "ctag-pool", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "generic-vnf", + "to": "instance-group", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "generic-vnf", + "to": "ipsec-configuration", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "generic-vnf", + "to": "l3-network", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "generic-vnf", + "to": "pnf", + "label": "tosca.relationships.HostedOn", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "generic-vnf", + "to": "pserver", + "label": "tosca.relationships.HostedOn", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "generic-vnf", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "generic-vnf", + "to": "tenant", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vnfc", + "to": "generic-vnf", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "generic-vnf", + "to": "vnf-image", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "generic-vnf", + "to": "volume-group", + "label": "org.onap.relationships.inventory.DependsOn", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "generic-vnf", + "to": "vserver", + "label": "tosca.relationships.HostedOn", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "lag-interface", + "to": "generic-vnf", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "license", + "to": "generic-vnf", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l-interface", + "to": "generic-vnf", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "network-profile", + "to": "generic-vnf", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-instance", + "to": "generic-vnf", + "label": "org.onap.relationships.inventory.ComposedOf", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "site-pair-set", + "to": "generic-vnf", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vf-module", + "to": "generic-vnf", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "pserver", + "to": "group-assignment", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description":"" + }, + { + "from": "tenant", + "to": "group-assignment", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "metadatum", + "to": "image", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "instance-group", + "to": "model", + "label": "org.onap.relationships.inventory.Targets", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "vig-server", + "to": "ipsec-configuration", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l3-interface-ipv4-address-list", + "to": "instance-group", + "label": "org.onap.relationships.inventory.network.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l3-interface-ipv4-address-list", + "to": "l3-network", + "label": "org.onap.relationships.inventory.network.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l3-interface-ipv4-address-list", + "to": "subnet", + "label": "org.onap.relationships.inventory.network.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "l3-interface-ipv6-address-list", + "to": "instance-group", + "label": "org.onap.relationships.inventory.network.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l3-interface-ipv6-address-list", + "to": "l3-network", + "label": "org.onap.relationships.inventory.network.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l3-interface-ipv6-address-list", + "to": "subnet", + "label": "org.onap.relationships.inventory.network.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "ctag-assignment", + "to": "l3-network", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l3-network", + "to": "instance-group", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l3-network", + "to": "network-policy", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l3-network", + "to": "route-table-reference", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l3-network", + "to": "vpn-binding", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "segmentation-assignment", + "to": "l3-network", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-instance", + "to": "l3-network", + "label": "org.onap.relationships.inventory.ComposedOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "subnet", + "to": "l3-network", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "lag-interface", + "to": "lag-link", + "label": "tosca.relationships.network.LinksTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "lag-interface", + "to": "logical-link", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "lag-interface", + "to": "p-interface", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l-interface", + "to": "lag-interface", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "lag-interface", + "to": "l-interface", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "false", + "description":"" + }, + { + "from": "line-of-business", + "to": "generic-vnf", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l3-interface-ipv4-address-list", + "to": "l-interface", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l3-interface-ipv6-address-list", + "to": "l-interface", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l-interface", + "to": "instance-group", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l-interface", + "to": "l-interface", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l-interface", + "to": "logical-link", + "label": "tosca.relationships.network.LinksTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "logical-link", + "to": "l-interface", + "label": "org.onap.relationships.inventory.Source", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "false", + "description":"" + }, + { + "from": "logical-link", + "to": "l-interface", + "label": "org.onap.relationships.inventory.Destination", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "false", + "description":"" + }, + { + "from": "sriov-vf", + "to": "l-interface", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vlan", + "to": "l-interface", + "label": "tosca.relationships.network.LinksTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "logical-link", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "logical-link", + "to": "generic-vnf", + "label": "org.onap.relationships.inventory.BridgedTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "logical-link", + "to": "lag-link", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "logical-link", + "to": "logical-link", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "logical-link", + "to": "pnf", + "label": "org.onap.relationships.inventory.BridgedTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "logical-link", + "to": "pserver", + "label": "org.onap.relationships.inventory.BridgedTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "logical-link", + "to": "vpn-binding", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "model-ver", + "to": "model", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "constrained-element-set", + "to": "model-constraint", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "constrained-element-set", + "to": "model-element", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "model-constraint", + "to": "model-element", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "model-element", + "to": "model-element", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "model-element", + "to": "model-ver", + "label": "org.onap.relationships.inventory.IsA", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "metadatum", + "to": "model-ver", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "model-element", + "to": "model-ver", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "named-query", + "to": "model", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "named-query-element", + "to": "named-query", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "named-query-element", + "to": "model", + "label": "org.onap.relationships.inventory.IsA", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "named-query-element", + "to": "named-query-element", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "property-constraint", + "to": "named-query-element", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "related-lookup", + "to": "named-query-element", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l-interface", + "to": "newvce", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "oam-network", + "to": "complex", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "oam-network", + "to": "service-capability", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "operational-environment", + "to": "operational-environment", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-instance", + "to": "owning-entity", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-instance", + "to": "owning-entity", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "false", + "description":"service-instance Uses an owning-entity" + }, + { + "from": "l-interface", + "to": "p-interface", + "label": "tosca.relationships.network.BindsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "p-interface", + "to": "logical-link", + "label": "tosca.relationships.network.LinksTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "p-interface", + "to": "physical-link", + "label": "tosca.relationships.network.LinksTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "sriov-pf", + "to": "p-interface", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "platform", + "to": "generic-vnf", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "lag-interface", + "to": "pnf", + "label": "tosca.relationships.network.BindsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "p-interface", + "to": "pnf", + "label": "tosca.relationships.network.BindsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "pnf", + "to": "complex", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "pnf", + "to": "instance-group", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "pnf", + "to": "instance-group", + "label": "org.onap.relationships.inventory.Primary", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "false", + "description":"" + }, + { + "from": "pnf", + "to": "instance-group", + "label": "org.onap.relationships.inventory.Secondary", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "false", + "description":"" + }, + { + "from": "pnf", + "to": "zone", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "cvlan-tag", + "to": "port-group", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "project", + "to": "service-instance", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "lag-interface", + "to": "pserver", + "label": "tosca.relationships.network.BindsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "p-interface", + "to": "pserver", + "label": "tosca.relationships.network.BindsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "pserver", + "to": "availability-zone", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "pserver", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "pserver", + "to": "complex", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "pserver", + "to": "zone", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "site-pair", + "to": "routing-instance", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "allotted-resource", + "to": "service-instance", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "metadatum", + "to": "service-instance", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-instance", + "to": "allotted-resource", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-instance", + "to": "instance-group", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA":"NONE", + "prevent-delete": "NONE", + "default": "false", + "description":"MSO creates this edge on VNF Group Service creation" + }, + { + "from": "service-instance", + "to": "configuration", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-instance", + "to": "connector", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-instance", + "to": "ctag-assignment", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-instance", + "to": "cvlan-tag", + "label": "org.onap.relationships.inventory.ComposedOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-instance", + "to": "instance-group", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-instance", + "to": "logical-link", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-instance", + "to": "pnf", + "label": "org.onap.relationships.inventory.ComposedOf", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-instance", + "to": "service-instance", + "label": "org.onap.relationships.inventory.ComposedOf", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-instance", + "to": "vlan", + "label": "org.onap.relationships.inventory.ComposedOf", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-instance", + "to": "zone", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-instance", + "to": "service-subscription", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"service-instance BelongsTo service-subscription" + }, + { + "from": "class-of-service", + "to": "site-pair", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "routing-instance", + "to": "site-pair-set", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "sriov-vf", + "to": "sriov-pf", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "host-route", + "to": "subnet", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-subscription", + "to": "tenant", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "tenant", + "to": "l3-network", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vserver", + "to": "tenant", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "entitlement", + "to": "vce", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "license", + "to": "vce", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "port-group", + "to": "vce", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-instance", + "to": "vce", + "label": "org.onap.relationships.inventory.ComposedOf", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vce", + "to": "availability-zone", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "vce", + "to": "complex", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "vce", + "to": "vserver", + "label": "tosca.relationships.HostedOn", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vf-module", + "to": "l3-network", + "label": "org.onap.relationships.inventory.DependsOn", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vf-module", + "to": "vnfc", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vf-module", + "to": "volume-group", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vip-ipv4-address-list", + "to": "instance-group", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vip-ipv4-address-list", + "to": "subnet", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "vip-ipv6-address-list", + "to": "instance-group", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vip-ipv6-address-list", + "to": "subnet", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "generic-vnf", + "to": "virtual-data-center", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "logical-link", + "to": "virtual-data-center", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l3-interface-ipv4-address-list", + "to": "vlan", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l3-interface-ipv6-address-list", + "to": "vlan", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vlan", + "to": "logical-link", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vlan", + "to": "multicast-configuration", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l3-interface-ipv4-address-list", + "to": "vnfc", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l3-interface-ipv6-address-list", + "to": "vnfc", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vnfc", + "to": "instance-group", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vnfc", + "to": "vip-ipv4-address-list", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vnfc", + "to": "vip-ipv6-address-list", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "tenant", + "to": "volume-group", + "label": "org.onap.relationships.inventory.DependsOn", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "volume-group", + "to": "complex", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "lag-interface", + "to": "vpls-pe", + "label": "tosca.relationships.network.BindsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "p-interface", + "to": "vpls-pe", + "label": "tosca.relationships.network.BindsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vpls-pe", + "to": "complex", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "vpls-pe", + "to": "ctag-pool", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "route-target", + "to": "vpn-binding", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l-interface", + "to": "vserver", + "label": "tosca.relationships.network.BindsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vf-module", + "to": "vserver", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vnfc", + "to": "vserver", + "label": "tosca.relationships.HostedOn", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vserver", + "to": "flavor", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "vserver", + "to": "image", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "vserver", + "to": "pserver", + "label": "tosca.relationships.HostedOn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "vserver", + "to": "snapshot", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vserver", + "to": "volume", + "label": "tosca.relationships.AttachesTo", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "${direction}", + "delete-other-v": "${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "zone", + "to": "complex", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "configuration", + "to": "l-interface", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "configuration", + "to": "pnf", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "forwarder", + "to": "forwarding-path", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "forwarding-path", + "to": "service-instance", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "forwarder", + "to": "l-interface", + "label": "org.onap.relationships.inventory.ForwardsTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "forwarder", + "to": "configuration", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "forwarding-path", + "to": "configuration", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "forwarder", + "to": "lag-interface", + "label": "org.onap.relationships.inventory.ForwardsTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "evc", + "to": "configuration", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "forwarder-evc", + "to": "configuration", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "forwarder", + "to": "p-interface", + "label": "org.onap.relationships.inventory.ForwardsTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "generic-vnf", + "to": "nos-server", + "label": "tosca.relationships.HostedOn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "nos-server", + "to": "pserver", + "label": "tosca.relationships.HostedOn", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "nos-server", + "to": "tenant", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"" + }, + { + "from": "configuration", + "to": "configuration", + "label": "tosca.relationships.network.BindsTo", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "configuration", + "to": "vpn-binding", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "configuration", + "to": "l3-network", + "label": "org.onap.relationships.inventory.PartOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vpn-binding", + "to": "customer", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-instance", + "to": "configuration", + "label": "org.onap.relationships.inventory.ComposedOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "false", + "description":"" + }, + { + "from": "forwarder", + "to": "generic-vnf", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "Points to the generic-vnf(s) involved in this forwarding step." + }, + { + "from": "cloud-region", + "to": "instance-group", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "instance-group", + "to": "collection", + "label": "org.onap.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "service-instance", + "to": "collection", + "label": "org.onap.relationships.inventory.ComposedOf", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "vlan-mapping", + "to": "forwarder-evc", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "allotted-resource", + "to": "model-ver", + "label": "org.onap.relationships.inventory.IsA", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "private": "true" + }, + { + "from": "configuration", + "to": "model-ver", + "label": "org.onap.relationships.inventory.IsA", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "private": "true" + }, + { + "from": "connector", + "to": "model-ver", + "label": "org.onap.relationships.inventory.IsA", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "private": "true" + }, + { + "from": "generic-vnf", + "to": "model-ver", + "label": "org.onap.relationships.inventory.IsA", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "private": "true" + }, + { + "from": "instance-group", + "to": "model-ver", + "label": "org.onap.relationships.inventory.IsA", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "private": "true" + }, + { + "from": "l3-network", + "to": "model-ver", + "label": "org.onap.relationships.inventory.IsA", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "private": "true" + }, + { + "from": "logical-link", + "to": "model-ver", + "label": "org.onap.relationships.inventory.IsA", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "private": "true" + }, + { + "from": "service-instance", + "to": "model-ver", + "label": "org.onap.relationships.inventory.IsA", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "private": "true" + }, + { + "from": "vf-module", + "to": "model-ver", + "label": "org.onap.relationships.inventory.IsA", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "private": "true" + }, + { + "from": "vnfc", + "to": "model-ver", + "label": "org.onap.relationships.inventory.IsA", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "private": "true" + }, + { + "from": "pnf", + "to": "model-ver", + "label": "org.onap.relationships.inventory.IsA", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "private": "true" + }, + { + "from": "collection", + "to": "model-ver", + "label": "org.onap.relationships.inventory.IsA", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "private": "true" + }, + { + "from": "configuration", + "to": "vnfc", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vnfc", + "to": "cp", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "${direction}", + "delete-other-v": "${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"cp is child of vnfc" + }, + { + "from": "l3-interface-ipv4-address-list", + "to": "cp", + "label": "org.onap.relationships.inventory.network.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l3-interface-ipv6-address-list", + "to": "cp", + "label": "org.onap.relationships.inventory.network.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vip-ipv4-address-list", + "to": "cp", + "label": "org.onap.relationships.inventory.network.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vip-ipv6-address-list", + "to": "cp", + "label": "org.onap.relationships.inventory.network.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vlan-tag", + "to": "cp", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l-interface", + "to": "cp", + "label": "tosca.relationships.network.LinksTo", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l3-network", + "to": "cp", + "label": "tosca.relationships.network.LinksTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "line-of-business", + "to": "l3-network", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "platform", + "to": "l3-network", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "l3-network", + "to": "l3-network", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"l3-network uses l3-network" + }, + { + "from": "generic-vnf", + "to": "instance-group", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "false", + "description":"" + }, + { + "from": "generic-vnf", + "to": "instance-group", + "label": "org.onap.relationships.inventory.Primary", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "false", + "description":"" + }, + { + "from": "generic-vnf", + "to": "instance-group", + "label": "org.onap.relationships.inventory.Secondary", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "false", + "description":"" + }, + { + "from": "instance-group", + "to": "generic-vnf", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "false", + "description":"" + }, + { + "from": "cloud-region", + "to": "network-technology", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "vrf", + "to": "pnf", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"A vrf belongs to a pnf." + }, + { + "from": "vrf", + "to": "vpn-binding", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"A vrf uses a vpn-binding." + }, + { + "from": "vrf", + "to": "l3-network", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"A vrf uses many l3-networks" + }, + { + "from": "configuration", + "to": "vrf", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"A Configuration uses VRFs" + }, + { + "from": "vrf", + "to": "l-interface", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "route-target", + "to": "vrf", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "contact", + "to": "generic-vnf", + "label": "org.onap.relationships.inventory.supports", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "aggregate-route", + "to": "l3-network", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + },{ + "from": "configuration", + "to": "lag-interface", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + },{ + "from": "configuration", + "to": "instance-group", + "label": "org.onap.relationships.inventory.PartOf", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + },{ + "from": "owning-entity", + "to": "tenant", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + },{ + "from": "line-of-business", + "to": "tenant", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + },{ + "from": "vlan-tag", + "to": "vlan-range", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"A vlan-tag belongs to a vlan-range." + },{ + "from": "l3-network", + "to": "vlan-tag", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"A l3-network Uses vlan-tag." + },{ + "from": "policy", + "to": "vlan-tag", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description":"This edge allows for QOS policy to vlan-tag relationship. For a given policy get all vlan tags as well as for a given vlan-tag get all the policies." + },{ + "from": "l-interface", + "to": "vlan-tag", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description":"An sub-interface that uses a vlan-tag." + },{ + "from": "vlan-range", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"A vlan range belongs to a cloud-region." + },{ + "from": "owning-entity", + "to": "vlan-range", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"An owning-entity uses a vlan-range." + },{ + "from": "line-of-business", + "to": "vlan-range", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"A line-of uses a vlan-range" + },{ + "from": "ip-address-list", + "to": "endpoint", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "l3-interface-ipv6-address-list", + "to": "lag-interface", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A IPv6 address associated with a lag-interface." + }, + { + "from": "bgp-neighbor", + "to": "bgp-group", + "label": "org.onap.relationships.inventory.network.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "bgp-neighbor is a member of an bgp-group." + }, + { + "from": "policy", + "to": "address-family", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A policy applies to an address family." + }, + { + "from": "l3-interface-ipv4-address-list", + "to": "p-interface", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A IPv4 address associated with a p-interface." + }, + { + "from": "pserver", + "to": "hw-component", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The hw-component associated to a pserver" + }, + { + "from": "pnf", + "to": "autonomous-system", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "pnf is located in the autonomous-system." + }, + { + "from": "zone", + "to": "endpoint", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "" + }, + { + "from": "network-range", + "to": "complex", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The network-range is located in a complex" + }, + { + "from": "lag-interface", + "to": "geo-region", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The lag-interface associated to a geo-region" + }, + { + "from": "activity-state", + "to": "activity", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "An activity-state is tracks the state of an activity." + }, + { + "from": "relationship-rule", + "to": "policy", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "Details relationships policy requires." + }, + { + "from": "generic-vnf", + "to": "bgp-group", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "${direction}", + "delete-other-v": "${direction}", + "prevent-delete": "NONE", + "default": "true", + "description": "The bgp-group associated to a generic-vnf." + }, + { + "from": "mapping", + "to": "policy", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The mapping associated to a policy" + }, + { + "from": "bgp-group", + "to": "pnf", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A bgp-group belongs to a pnf." + }, + { + "from": "address-family", + "to": "bgp-group", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "Address Family belongs to a bgp-group" + }, + { + "from": "bgp-group", + "to": "autonomous-system", + "label": "org.onap.relationships.inventory.Source", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "To node-type is source of bgp-group." + }, + { + "from": "bgp-group", + "to": "autonomous-system", + "label": "org.onap.relationships.inventory.Destination", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "false", + "description": "To node-type is destination of bgp-group." + }, + { + "from": "profile", + "to": "policy", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A profile (set of characteristics) applies to the policy." + }, + { + "from": "profile", + "to": "vpn-binding", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A profile (set of characteristics) applies to the vpn-binding." + }, + { + "from": "sw-component", + "to": "profile", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The profile associated to a sw-component" + }, + { + "from": "pserver", + "to": "sw-component", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The sw-component associated to a pserver" + }, + { + "from": "policy", + "to": "l3-network", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A policy applies to l3-networks." + }, + { + "from": "ip-address-list", + "to": "port-list", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "profile", + "to": "chassis", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "None", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "The profile (set of characteristics) applies to the chassis." + }, + { + "from": "selector-list", + "to": "object-group", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "bgp-neighbor", + "to": "vip-ipv6-address-list", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "bgp-neighbor uses To node-type." + }, + { + "from": "network-range", + "to": "zone", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The network-range is located in a zone" + }, + { + "from": "pnf", + "to": "endpoint", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "profile", + "to": "lag-interface", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A profile (set of characteristics) applies to the lag-interface." + }, + { + "from": "bgp-group", + "to": "vip-ipv6-address-list", + "label": "org.onap.relationships.inventory.Source", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "To node-type is source of bgp-group." + }, + { + "from": "bgp-group", + "to": "vip-ipv6-address-list", + "label": "org.onap.relationships.inventory.Destination", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "false", + "description": "To node-type is destination of bgp-group." + }, + { + "from": "port-list", + "to": "endpoint", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "zone", + "to": "service-instance", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "false", + "description": "" + }, + { + "from": "selector-list", + "to": "endpoint", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "policy", + "to": "l-interface", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The policy applies to an l-interface." + }, + { + "from": "activity", + "to": "pserver", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The activity applies to a pserver." + }, + { + "from": "profile", + "to": "hardware-catalog-item", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A set of characteristics of the hardware-catalog-item." + }, + { + "from": "pdu", + "to": "rack", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A pdu is located in a building (aka complex)." + }, + { + "from": "pserver", + "to": "policy", + "label": "org.onap.relationships.inventory.Implements", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "mapping", + "to": "pnf", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The mapping associated to a pnf" + }, + { + "from": "bgp-group", + "to": "l3-interface-ipv4-address-list", + "label": "org.onap.relationships.inventory.Source", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "To node-type is source of bgp-group." + }, + { + "from": "bgp-group", + "to": "l3-interface-ipv4-address-list", + "label": "org.onap.relationships.inventory.Destination", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "false", + "description": "To node-type is destination of bgp-group." + }, + { + "from": "port", + "to": "pluggable", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A port is located in a pluggable." + }, + { + "from": "activity", + "to": "mapping", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The reservation information associated with a NAT Pool mapping." + }, + { + "from": "mapping", + "to": "object-group", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The mapping associated to an object-group" + }, + { + "from": "profile", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "ip-address-list", + "to": "policy", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "An ip-address-list BelongsTo a policy." + }, + { + "from": "rack-unit", + "to": "rack", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A rack-unit is located in a rack." + }, + { + "from": "pdu", + "to": "hardware-catalog-item", + "label": "org.onap.relationships.inventory.IsA", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "The pdu is described by the hardware-catalog-item." + }, + { + "from": "complex", + "to": "endpoint", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "" + }, + { + "from": "relationship-rule", + "to": "endpoint", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "Details relationships endpoint requires" + }, + { + "from": "policy", + "to": "instance-group", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The policy associated to an instance-group" + }, + { + "from": "vserver", + "to": "instance-group", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "subnet", + "to": "zone", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description": "A fabric subnet belongs to a zone." + }, + { + "from": "bgp-neighbor", + "to": "autonomous-system", + "label": "org.onap.relationships.inventory.network.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "bgp-neighbor is a member of an autonomous-system." + }, + { + "from": "chassis", + "to": "rack", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "A chassis is LocatedIn a rack." + }, + { + "from": "card-slot", + "to": "chassis", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A card-slot is located in a chassis." + }, + { + "from": "activity", + "to": "network-range", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "An activity is being performed on a network-range." + }, + { + "from": "profile", + "to": "p-interface", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A profile (set of characteristics) applies to the p-interface." + }, + { + "from": "chassis", + "to": "complex", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A chassis LinksTo a complex." + }, + { + "from": "policy", + "to": "object-group", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "relationship-rule", + "to": "profile", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "Details relationships profile requires." + }, + { + "from": "port", + "to": "card", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A port is located in a card." + }, + { + "from": "hw-component", + "to": "profile", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The profile associated to a hw-component" + }, + { + "from": "chassis", + "to": "pserver", + "label": "org.onap.relationships.inventory.PartOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A chassis is part of a pserver." + }, + { + "from": "mapping", + "to": "mapping", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The mapping associated to a mapping" + }, + { + "from": "mapping", + "to": "mapping", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "false", + "description": "The mapping associated to a mapping" + }, + { + "from": "bgp-neighbor", + "to": "l3-interface-ipv6-address-list", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "bgp-neighbor uses To node-type." + }, + { + "from": "object-group", + "to": "complex", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The object-group is located in a complex" + }, + { + "from": "pserver", + "to": "endpoint", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "" + }, + { + "from": "l3-interface-ipv4-address-list", + "to": "lag-interface", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A IPv4 address associated with a lag-interface." + }, + { + "from": "rack", + "to": "complex", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A rack is located in a complex (aka building)." + }, + { + "from": "host-aggregate", + "to": "pserver", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "selector-list", + "to": "rule", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "complex", + "to": "geo-region", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The complex associated to a geo-region" + }, + { + "from": "profile", + "to": "vlan-range", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A profile (set of characteristics) applies to the vlan-range." + }, + { + "from": "metadatum", + "to": "profile", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "cloud-region", + "to": "geo-region", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The cloud-region associated to a geo-region" + }, + { + "from": "bgp-neighbor", + "to": "pnf", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A bgp-neighbor belongs to a pnf." + }, + { + "from": "chassis", + "to": "hardware-catalog-item", + "label": "org.onap.relationships.inventory.IsA", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "The chassis is described by the hardware-catalog-item." + }, + { + "from": "port-list", + "to": "rule", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "cloud-region", + "to": "service-instance", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "contact", + "to": "complex", + "label": "org.onap.relationships.inventory.Supports", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "The contact supports a complex." + }, + { + "from": "bgp-neighbor", + "to": "l3-interface-ipv4-address-list", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "bgp-neighbor uses To node-type." + }, + { + "from": "pnf", + "to": "sw-component", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The sw-component associated to a pnf" + }, + { + "from": "address-family", + "to": "bgp-neighbor", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "Address Family belongs to a bgp-neighbor" + }, + { + "from": "ip-address-list", + "to": "subnet", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "service-instance", + "to": "vrf", + "label": "org.onap.relationships.inventory.ComposedOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "This edge relates a vrf that is configured on a pnf to the service-instances that the vrf supports." + }, + { + "from": "relationship-rule", + "to": "object-group", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "Details relationships object-group requires" + }, + { + "from": "chassis", + "to": "rack-unit", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "A chassis uses space in a rack (aka one or more rack-units)." + }, + { + "from": "activity", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The activity applies to a cloud-region." + }, + { + "from": "profile", + "to": "vrf", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A profile (set of characteristics) applies to the vrf." + }, + { + "from": "bgp-group", + "to": "subnet", + "label": "org.onap.relationships.inventory.Source", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "To node-type is source of bgp-group." + }, + { + "from": "bgp-group", + "to": "subnet", + "label": "org.onap.relationships.inventory.Destination", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "false", + "description": "To node-type is destination of bgp-group." + }, + { + "from": "contact", + "to": "pserver", + "label": "org.onap.relationships.inventory.Supports", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "The contact supports a pserver." + }, + { + "from": "policy", + "to": "bgp-neighbor", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A policy applies to a bgp-neighbor." + }, + { + "from": "ip-address-list", + "to": "rule", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "policy", + "to": "rule", + "label": "org.onap.relationships.inventory.Implements", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "${direction}", + "delete-other-v": "${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "host-aggregate", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "contact", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.Supports", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "The contact supports a cloud-region." + }, + { + "from": "pluggable", + "to": "hardware-catalog-item", + "label": "org.onap.relationships.inventory.IsA", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "The pluggable is described by the hardware-catalog-item." + }, + { + "from": "profile", + "to": "subnet", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A profile (set of characteristics) applies to the subnet." + }, + { + "from": "pnf", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A pnf is located in (aka supports) a cloud-region." + }, + { + "from": "profile", + "to": "pserver", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A profile (set of characteristics) applies to the pserver." + }, + { + "from": "configuration", + "to": "bgp-neighbor", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The configuration Uses bgp-neighbor." + }, + { + "from": "bgp-neighbor", + "to": "vip-ipv4-address-list", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "bgp-neighbor uses To node-type." + }, + { + "from": "cable", + "to": "physical-link", + "label": "org.onap.relationships.inventory.ComposedOf", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A cable is composed of one or more physical-links." + }, + { + "from": "bgp-group", + "to": "vip-ipv4-address-list", + "label": "org.onap.relationships.inventory.Source", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "To node-type is source of bgp-group." + }, + { + "from": "bgp-group", + "to": "vip-ipv4-address-list", + "label": "org.onap.relationships.inventory.Destination", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "false", + "description": "To node-type is destination of bgp-group." + }, + { + "from": "object-group", + "to": "vrf", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "The object-group to VRF for various route types." + }, + { + "from": "l-interface", + "to": "pnf", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description": "A logical interface associated with a pnf." + }, + { + "from": "port", + "to": "chassis", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A port is LocatedIn a chassis." + }, + { + "from": "profile", + "to": "endpoint", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A profile (set of characteristics) applies to the endpoint." + }, + { + "from": "validation-audit", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description": "The validation-audit associated to a cloud-region" + }, + { + "from": "pluggable-slot", + "to": "chassis", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A pluggable-slot is located in a chassis." + }, + { + "from": "configuration", + "to": "subnet", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A configuration uses a subnet" + }, + { + "from": "network-range", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The network-range is located in a cloud-region" + }, + { + "from": "rack", + "to": "hardware-catalog-item", + "label": "org.onap.relationships.inventory.IsA", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "The rack is this item from the hardware-catalog." + }, + { + "from": "mapping", + "to": "instance-group", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The mapping associated to an instance-group" + }, + { + "from": "mapping", + "to": "instance-group", + "label": "org.onap.relationships.inventory.Current", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "false", + "description": "" + }, + { + "from": "mapping", + "to": "instance-group", + "label": "org.onap.relationships.inventory.Target", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "false", + "description": "" + }, + { + "from": "cloud-region", + "to": "endpoint", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "" + }, + { + "from": "pnf", + "to": "hw-component", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The hw-component associated to a pnf" + }, + { + "from": "port", + "to": "p-interface", + "label": "org.onap.relationships.inventory.ComposedOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A port is composed of one or more p-interfaces." + }, + { + "from": "validation-audit", + "to": "line-of-business", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The line-of-business associated to a validation-audit" + }, + { + "from": "object-group", + "to": "object-group", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The object-gorup that applies to an object-group" + }, + { + "from": "generic-vnf", + "to": "object-group", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"A relationship that ties the device to the prefix-list/community-list." + }, + { + "from": "profile", + "to": "physical-link", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A profile (set of characteristics) applies to the physical-link." + }, + { + "from": "instance-group", + "to": "instance-group", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The instance-group associated to an instance-group" + }, + { + "from": "bgp-group", + "to": "l3-interface-ipv6-address-list", + "label": "org.onap.relationships.inventory.Source", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "To node-type is source of bgp-group." + }, + { + "from": "bgp-group", + "to": "l3-interface-ipv6-address-list", + "label": "org.onap.relationships.inventory.Destination", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "false", + "description": "To node-type is destination of bgp-group." + }, + { + "from": "object-group", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The object-group is located in a cloud-region" + }, + { + "from": "profile", + "to": "l-interface", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A profile (set of characteristics) applies to the l-interface." + }, + { + "from": "policy", + "to": "vrf", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "rule", + "to": "object-group", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "" + }, + { + "from": "rule", + "to": "object-group", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "false", + "description": "" + }, + { + "from": "rule", + "to": "object-group", + "label": "org.onap.relationships.inventory.Source", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "false", + "description": "" + }, + { + "from": "rule", + "to": "object-group", + "label": "org.onap.relationships.inventory.Destination", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "false", + "description": "" + }, + { + "from": "mapping", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The mapping associated to a cloud-region" + }, + { + "from": "autonomous-system", + "to": "zone", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A local autonomous-system is located in a zone." + }, + { + "from": "pdu", + "to": "rack-unit", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "A pdu uses space in a rack (aka one or more rack-units)." + }, + { + "from": "selector-list", + "to": "policy", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "rack", + "to": "instance-group", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "The rack is a member of the instance-group (rack-group or pod)." + }, + { + "from": "contact", + "to": "zone", + "label": "org.onap.relationships.inventory.Supports", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "The contact supports a zone." + }, + { + "from": "bgp-neighbor", + "to": "subnet", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "bgp-neighbor belongs To a subnet." + }, + { + "from": "activity", + "to": "pnf", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The activity applies to a pnf." + }, + { + "from": "profile", + "to": "vlan-tag", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A profile (set of characteristics) applies to the vlan-tag." + }, + { + "from": "profile", + "to": "object-group", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "The profile (set of characteristics) classifies the object-group." + }, + { + "from": "l-interface", + "to": "pserver", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description": "A logical interface associated with a pserver." + }, + { + "from": "chassis", + "to": "pnf", + "label": "org.onap.relationships.inventory.PartOf", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A chassis is part of a pnf." + }, + { + "from": "object-group", + "to": "zone", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The object-group is located in a zone" + }, + { + "from": "network-route", + "to": "object-group", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "The route is part of part of a route-list that is modeled in an object-group." + }, + { + "from": "bgp-neighbor", + "to": "vrf", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A bgp-neighbor belongs to a vrf." + }, + { + "from": "port", + "to": "cable", + "label": "tosca.relationships.network.LinksTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A channel-interface terminates a channel-link." + }, + { + "from": "pserver", + "to": "project", + "label": "org.onap.relationships.inventory.PartOf", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The pserver is part of a project (ex, VPMO that ordered the equipment)." + }, + { + "from": "license", + "to": "chassis", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description": "A license belongs to a chassis." + }, + { + "from": "cloud-region", + "to": "policy", + "label": "org.onap.relationships.inventory.Implements", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "a cloud-region implements policies" + }, + { + "from": "port", + "to": "port", + "label": "org.onap.relationships.inventory.LinksTo", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A port LinksTo another port." + }, + { + "from": "card", + "to": "card-slot", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A card is located in a card-slot." + }, + { + "from": "aggregate-route", + "to": "vrf", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "An aggregate-route BelongsTo a vrf." + }, + { + "from": "pnf", + "to": "project", + "label": "org.onap.relationships.inventory.PartOf", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The pnf is part of a project (ex, VPMO that ordered the equipment)." + }, + { + "from": "vpn-binding", + "to": "aggregate-route", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A vpn-binding uses many aggregate routes" + }, + { + "from": "card", + "to": "hardware-catalog-item", + "label": "org.onap.relationships.inventory.IsA", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "The card is described by the hardware-catalog-item." + }, + { + "from": "profile", + "to": "pnf", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A profile (set of characteristics) applies to the pnf." + }, + { + "from": "cable", + "to": "complex", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A cable is located in a complex." + }, + { + "from": "pluggable-slot", + "to": "card", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A pluggable slot is located in a card." + }, + { + "from": "pnf", + "to": "policy", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A pnf uses policies" + }, + { + "from": "profile", + "to": "pdu", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "None", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "The profile (set of characteristics) applies to the pdu." + }, + { + "from": "profile", + "to": "l3-network", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A profile (set of characteristics) applies to the l3-network." + }, + { + "from": "bgp-group", + "to": "vrf", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A bgp-group belongs to a pnf." + }, + { + "from": "bgp-neighbor", + "to": "logical-link", + "label": "tosca.relationships.network.LinksTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A policy applies to a bgp-neighbor." + }, + { + "from": "generic-vnf", + "to": "bgp-neighbor", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "${direction}", + "delete-other-v": "${direction}", + "prevent-delete": "NONE", + "default": "true", + "description": "The bgp-neighbor associated to a generic-vnf." + }, + { + "from": "pluggable", + "to": "cable", + "label": "org.onap.relationships.inventory.PartOf", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A pluggable that is intergrated with a cable." + }, + { + "from": "relationship-component", + "to": "relationship-rule", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description": "Defines the traversal needed to reach the node of relationship-rule" + }, + { + "from": "vserver", + "to": "sw-component", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The sw-component associated to a vserver" + }, + { + "from": "ip-address-list", + "to": "object-group", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "profile", + "to": "pluggable", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "The profile (set of characteristics) applies to the pluggable." + }, + { + "from": "object-group", + "to": "pnf", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "cable", + "to": "hardware-catalog-item", + "label": "org.onap.relationships.inventory.IsA", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "The cable is this item from the hardware-catalog." + }, + { + "from": "activity", + "to": "p-interface", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The activity applies to a p-interface." + }, + { + "from": "vlan-characteristic", + "to": "vlan-tag", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "policy", + "to": "vpn-binding", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A policy uses vpn-bindings" + }, + { + "from": "community-list", + "to": "object-group", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "profile", + "to": "rack", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "The profile (set of characteristics) applies to the rack." + }, + { + "from": "contact", + "to": "pnf", + "label": "org.onap.relationships.inventory.Supports", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "The contact supports a pnf." + }, + { + "from": "l3-interface-ipv6-address-list", + "to": "p-interface", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A IPv6 address associated with a p-interface." + }, + { + "from": "configuration", + "to": "policy", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A configuration uses a policy" + }, + { + "from": "profile", + "to": "logical-link", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A profile (set of characteristics) applies to the logical-link." + }, + { + "from": "policy", + "to": "bgp-group", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A policy applies to a bgp-group." + }, + { + "from": "profile", + "to": "instance-group", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "A profile (set of characteristics) applies to the instance-group (as a vrrp group)." + }, + { + "from": "port-list", + "to": "object-group", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + }, + { + "from": "pluggable", + "to": "pluggable-slot", + "label": "org.onap.relationships.inventory.LocatedIn", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "A pluggable is located in a pluggable-slot." + }, + { + "from": "profile", + "to": "card", + "label": "org.onap.relationships.inventory.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "The profile (set of characteristics) applies to the card." + }, + { + "from": "cloud-region", + "to": "project", + "label": "org.onap.relationships.inventory.PartOf", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The cloud-region is part of a project (ex, project that built out the cloud region)." + }, + { + "from": "network-route", + "to": "subnet", + "label": "org.onap.relationships.inventory.MemberOf", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The route is part of part of a subnet." + },{ + "from": "l-interface", + "to": "next-hop", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The l-interface that is used by the next-hop." + },{ + "from": "network-route", + "to": "next-hop", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The network-route that is used by the next-hop." + },{ + "from": "rule", + "to": "next-hop", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The rule that is used by the next-hop. For CG-NAT these are the ACL policies." + },{ + "from": "vrf", + "to": "next-hop", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The vrfs that are used by the next-hop." + },{ + "from": "next-hop", + "to": "bfd", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "" + },{ + "from": "ip-address-list", + "to": "l3-interface-ipv4-address-list", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "This edge relates an object-group's ip-address-list through reference from DLP data to an ip-address from FCT in the l3-interface-ipv4-address-list of an R-Leaf's l-interface that is for VLAN 2" + },{ + "from": "ip-address-list", + "to": "l3-interface-ipv6-address-list", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "This edge relates an object-group's ip-address-list through reference from DLP data to an ip-address from FCT in the l3-interface-ipv6-address-list of an R-Leaf's l-interface that is for VLAN 2" + },{ + "from": "ip-address-list", + "to": "vip-ipv4-address-list", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "This edge relates an object-group's ip-address-list through reference from DLP data to an ip-address from FCT in the vip-ipv4-address-list of an R-Leaf's l-interface that is for VLAN 2" + },{ + "from": "ip-address-list", + "to": "vip-ipv6-address-list", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "!${direction}", + "default": "true", + "description": "This edge relates an object-group's ip-address-list through reference from DLP data to an ip-address from FCT in the vip-ipv6-address-list of an R-Leaf's l-interface that is for VLAN 2" + },{ + "from": "configuration", + "to": "network-route", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "Relates configuration to network-route for static routes." + },{ + "from": "l3-network", + "to": "network-route", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "Relates l3-network to network-route for static routes." + },{ + "from": "vrf", + "to": "network-route", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "${direction}", + "default": "true", + "description": "Relates vrf to network-route for static routes." + },{ + "from": "fqdn", + "to": "l3-interface-ipv4-address-list", + "label": "org.onap.relationships.inventory.network.AppliesTo", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The fqdn that applies to a l3-interface-ipv4-address-list." + },{ + "from": "fqdn", + "to": "l3-interface-ipv6-address-list", + "label": "org.onap.relationships.inventory.network.AppliesTo", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The fqdn that applies to a l3-interface-ipv6-address-list." + },{ + "from": "fqdn", + "to": "vip-ipv4-address-list", + "label": "org.onap.relationships.inventory.network.AppliesTo", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The fqdn that applies to a vip-ipv4-address-list." + },{ + "from": "fqdn", + "to": "vip-ipv6-address-list", + "label": "org.onap.relationships.inventory.network.AppliesTo", + "direction": "OUT", + "multiplicity": "ONE2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The fqdn that applies to a vip-ipv6-address-list." + },{ + "from": "fqdn", + "to": "generic-vnf", + "label": "org.onap.relationships.inventory.network.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The fqdn that applies to a generic-vnf." + },{ + "from": "fqdn", + "to": "fqdn", + "label": "org.onap.relationships.inventory.network.AppliesTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description": "The dns cname record that applies to an A-record (ipv4) and/or quad-A-record (ipv6)." + },{ + "from": "pnf", + "to": "cloud-region", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "false", + "description":"used for CSP pnf to cloud-region." + },{ + "from": "logical-link", + "to": "port", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"The port associated with a logical-link" + } + ] +} diff --git a/src/app/assets/configuration/aai/oxm.xml b/src/app/assets/configuration/aai/oxm.xml new file mode 100644 index 0000000..006159c --- /dev/null +++ b/src/app/assets/configuration/aai/oxm.xml @@ -0,0 +1,11559 @@ +<!-- + ============LICENSE_START======================================================= + org.openecomp.aai + ================================================================================ + Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= + --><xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.v23" xml-mapping-metadata-complete="true"> + <xml-schema element-form-default="QUALIFIED"> + <xml-ns namespace-uri="http://org.onap.aai.inventory/v23"/> + </xml-schema> + <java-types> + <java-type name="Inventory"> + <xml-root-element name="inventory"/> + <java-attributes> + <xml-element java-attribute="cloudInfrastructure" name="cloud-infrastructure" type="inventory.aai.onap.org.v23.CloudInfrastructure"/> + <xml-element java-attribute="business" name="business" type="inventory.aai.onap.org.v23.Business"/> + <xml-element java-attribute="serviceDesignAndCreation" name="service-design-and-creation" type="inventory.aai.onap.org.v23.ServiceDesignAndCreation"/> + <xml-element java-attribute="network" name="network" type="inventory.aai.onap.org.v23.Network"/> + <xml-element java-attribute="common" name="common" type="inventory.aai.onap.org.v23.Common"/> + </java-attributes> + </java-type> + + + <java-type name="CloudInfrastructure"> + <xml-properties> + <xml-property name="description" value="Namespace for cloud infrastructure."/> + </xml-properties> + <xml-root-element name="cloud-infrastructure"/> + <java-attributes> + <xml-element java-attribute="complexes" name="complexes" type="inventory.aai.onap.org.v23.Complexes"/> + <xml-element java-attribute="cloudRegions" name="cloud-regions" type="inventory.aai.onap.org.v23.CloudRegions"/> + <xml-element java-attribute="networkProfiles" name="network-profiles" type="inventory.aai.onap.org.v23.NetworkProfiles"/> + <xml-element java-attribute="pservers" name="pservers" type="inventory.aai.onap.org.v23.Pservers"/> + <xml-element java-attribute="endpoints" name="endpoints" type="inventory.aai.onap.org.v23.Endpoints"/> + <xml-element java-attribute="virtualDataCenters" name="virtual-data-centers" type="inventory.aai.onap.org.v23.VirtualDataCenters"/> + <xml-element java-attribute="operationalEnvironments" name="operational-environments" type="inventory.aai.onap.org.v23.OperationalEnvironments"/> + <xml-element java-attribute="geoRegions" name="geo-regions" type="inventory.aai.onap.org.v23.GeoRegions"/> + <xml-element java-attribute="networkTechnologies" name="network-technologies" type="inventory.aai.onap.org.v23.NetworkTechnologies"/> + </java-attributes> + </java-type> + + <java-type name="CloudRegions"> + <xml-root-element name="cloud-regions"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="cloudRegion" name="cloud-region" type="inventory.aai.onap.org.v23.CloudRegion"/> + </java-attributes> + <xml-properties> + <xml-property name="maximumDepth" value="0"/> + </xml-properties> + </java-type> + + <java-type name="CloudRegion"> + <xml-root-element name="cloud-region"/> + <java-attributes> + <xml-element java-attribute="cloudOwner" name="cloud-owner" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Identifies the vendor and cloud name, e.g., att-aic. First part of composite key should be formatted as vendor-cloudname"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="cloudRegionId" name="cloud-region-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Identifier used by the vendor for the region. Second part of composite key"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="cloudType" name="cloud-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of the cloud (e.g., openstack)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ownerDefinedType" name="owner-defined-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Cloud-owner defined type indicator (e.g., dcp, lcp)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="cloudRegionVersion" name="cloud-region-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Software version employed at the site. NOTE - THIS FIELD IS NOT KEPT UP TO DATE."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="identityUrl" name="identity-url" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL of the keystone identity service"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="cloudZone" name="cloud-zone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Zone where the cloud is homed. NOTE - THIS FIELD IS NOT CORRECTLY POPULATED."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="complexName" name="complex-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="complex name for cloud-region instance. NOTE - THIS FIELD IS NOT CORRECTLY POPULATED."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="sriovAutomation" name="sriov-automation" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Whether the cloud region supports (true) or does not support (false) SR-IOV automation."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="cloudRegionNumber" name="cloud-region-number" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Number that maps to the letter at the end of the cloud-region-id."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="cloudFunction" name="cloud-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Function of cloud-region."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="cloudRole" name="cloud-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role of cloud-region."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="opsNote" name="ops-note" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Notes to aid OPs in troubleshooting, such as attribute aliases or additional descriptions/instructions about an object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="cloudRegionNumberDefinition" name="cloud-region-number-definition" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The alias used for this cloud."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="status" name="status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Status of cloud-region."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="upgradeCycle" name="upgrade-cycle" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Upgrade cycle for the cloud region. For AIC regions upgrade cycle is designated by A,B,C etc."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationDisabled" name="orchestration-disabled" required="true" type="java.lang.Boolean" default-value="false"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Used to indicate whether orchestration is enabled for this cloud-region."/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Used to indicate whether or not cloud-region object is in maintenance mode."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="volumeGroups" name="volume-groups" type="inventory.aai.onap.org.v23.VolumeGroups"/> + <xml-element java-attribute="tenants" name="tenants" type="inventory.aai.onap.org.v23.Tenants"/> + <xml-element java-attribute="flavors" name="flavors" type="inventory.aai.onap.org.v23.Flavors"/> + <xml-element java-attribute="groupAssignments" name="group-assignments" type="inventory.aai.onap.org.v23.GroupAssignments"/> + <xml-element java-attribute="snapshots" name="snapshots" type="inventory.aai.onap.org.v23.Snapshots"/> + <xml-element java-attribute="images" name="images" type="inventory.aai.onap.org.v23.Images"/> + <xml-element java-attribute="dvsSwitches" name="dvs-switches" type="inventory.aai.onap.org.v23.DvsSwitches"/> + <xml-element java-attribute="oamNetworks" name="oam-networks" type="inventory.aai.onap.org.v23.OamNetworks"/> + <xml-element java-attribute="availabilityZones" name="availability-zones" type="inventory.aai.onap.org.v23.AvailabilityZones"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element container-type="java.util.ArrayList" java-attribute="vipIpv4AddressList" name="vip-ipv4-address-list" type="inventory.aai.onap.org.v23.VipIpv4AddressList"/> + <xml-element container-type="java.util.ArrayList" java-attribute="vipIpv6AddressList" name="vip-ipv6-address-list" type="inventory.aai.onap.org.v23.VipIpv6AddressList"/> + <xml-element java-attribute="vlanRanges" name="vlan-ranges" type="inventory.aai.onap.org.v23.VlanRanges"/> + <xml-element java-attribute="hostAggregates" name="host-aggregates" type="inventory.aai.onap.org.v23.HostAggregates"/> + <xml-element java-attribute="activities" name="activities" type="inventory.aai.onap.org.v23.Activities"/> + <xml-element java-attribute="validationAudits" name="validation-audits" type="inventory.aai.onap.org.v23.ValidationAudits"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="cloud-region designates an installation of a cloud cluster or region or instantiation. In AT&Ts AIC cloud, this could be an LCP or DCP. Cloud regions are uniquely identified by a composite key, cloud-owner + cloud-region-id. The format of the cloud-owner is vendor-cloudname and we will use att-aic for AT&T's AIC."/> + <xml-property name="indexedProps" value="cloud-owner,cloud-region-id,cloud-type,owner-defined-type,data-owner,data-source,data-source-version"/> + <xml-property name="nameProps" value="owner-defined-type"/> + <xml-property name="container" value="cloud-regions"/> + <xml-property name="namespace" value="cloud-infrastructure"/> + <xml-property name="uriTemplate" value="/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}"/> + <xml-property name="requiredProps" value="cloud-owner,cloud-region-id,orchestration-disabled,in-maint"/> + </xml-properties> + </java-type> + + <java-type name="HostAggregates"> + <xml-properties> + <xml-property name="description" value="Collection of HostAggregates."/> + </xml-properties> + <xml-root-element name="host-aggregates"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="hostAggregate" name="host-aggregate" type="inventory.aai.onap.org.v23.HostAggregate"/> + </java-attributes> + </java-type> + + <java-type name="HostAggregate"> + <xml-root-element name="host-aggregate"/> + <java-attributes> + <xml-element java-attribute="hostAggregateId" name="host-aggregate-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier for the host-aggregate."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="hostAggregateName" name="host-aggregate-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the host-aggregate."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="describes an hostAggregates"/> + <xml-property name="dependentOn" value="cloud-region"/> + <xml-property name="container" value="host-aggregates"/> + <xml-property name="uriTemplate" value="/host-aggregates/host-aggregate/{host-aggregate-id}"/> + <xml-property name="requiredProps" value="host-aggregate-id,host-aggregate-name"/> + <xml-property name="indexedProps" value="data-owner,data-source,data-source-version"/> + </xml-properties> + </java-type> + + <java-type name="VlanRanges"> + <xml-root-element name="vlan-ranges"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vlanRange" name="vlan-range" type="inventory.aai.onap.org.v23.VlanRange"/> + </java-attributes> + <xml-properties> + </xml-properties> + </java-type> + + <java-type name="VlanRange"> + <xml-root-element name="vlan-range"/> + <java-attributes> + <xml-element java-attribute="vlanRangeId" name="vlan-range-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="vlan id in range UUID."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdLower" name="vlan-id-lower" required="true" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="vlan id in range lower"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdUpper" name="vlan-id-upper" required="true" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="vlan id in range upper"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanType" name="vlan-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="vlan type"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanTags" name="vlan-tags" type="inventory.aai.onap.org.v23.VlanTags"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Definition of vlan range"/> + <xml-property name="indexedProps" value="vlan-range-id,vlan-type,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="cloud-region"/> + <xml-property name="container" value="vlan-ranges"/> + <xml-property name="uriTemplate" value="/vlan-ranges/vlan-range/{vlan-range-id}"/> + <xml-property name="requiredProps" value="vlan-range-id,vlan-id-lower,vlan-id-upper,vlan-type"/> + </xml-properties> + </java-type> + + <java-type name="VolumeGroups"> + <xml-properties> + <xml-property name="description" value="Collection of persistent block-level storage."/> + </xml-properties> + <xml-root-element name="volume-groups"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="volumeGroup" name="volume-group" type="inventory.aai.onap.org.v23.VolumeGroup"/> + </java-attributes> + </java-type> + + <java-type name="VolumeGroup"> + <xml-root-element name="volume-group"/> + <java-attributes> + <xml-element java-attribute="volumeGroupId" name="volume-group-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of volume-group."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="volumeGroupName" name="volume-group-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the volume group."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this volume-group"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded in service-specific ways and clients should expect changes to occur in the future to this field as ECOMP matures."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this volume-group"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelCustomizationId" name="model-customization-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="captures the id of all the configuration used to customize the resource for the service."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfModuleModelCustomizationId" name="vf-module-model-customization-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="helps relate the volume group to the vf-module whose components will require the volume group"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Persistent block-level storage."/> + <xml-property name="indexedProps" value="volume-group-name,vnf-type,heat-stack-id,volume-group-id,orchestration-status,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="cloud-region"/> + <xml-property name="container" value="volume-groups"/> + <xml-property name="uriTemplate" value="/volume-groups/volume-group/{volume-group-id}"/> + <xml-property name="requiredProps" value="volume-group-id,vnf-type"/> + </xml-properties> + </java-type> + + <java-type name="Complexes"> + <xml-properties> + <xml-property name="description" value="Collection of physical locations that can house cloud-regions."/> + </xml-properties> + <xml-root-element name="complexes"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="complex" name="complex" type="inventory.aai.onap.org.v23.Complex"/> + </java-attributes> + <xml-properties> + <xml-property name="maximumDepth" value="0"/> + </xml-properties> + </java-type> + + <java-type name="Complex"> + <xml-root-element name="complex"/> + <java-attributes> + <xml-element java-attribute="physicalLocationId" name="physical-location-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier for physical location, e.g., CLLI"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataCenterCode" name="data-center-code" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Data center code which can be an alternate way to identify a complex"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="complexName" name="complex-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Gamma complex name for LCP instance."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="identityUrl" name="identity-url" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL of the keystone identity service"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="physicalLocationType" name="physical-location-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type, e.g., central office, data center."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="timeZone" name="time-zone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The time zone where the complex is located."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="street1" name="street1" required="true" type="java.lang.String"/> + <xml-element java-attribute="street2" name="street2" type="java.lang.String"/> + <xml-element java-attribute="city" name="city" required="true" type="java.lang.String"/> + <xml-element java-attribute="state" name="state" type="java.lang.String"/> + <xml-element java-attribute="postalCode" name="postal-code" required="true" type="java.lang.String"/> + <xml-element java-attribute="country" name="country" required="true" type="java.lang.String"/> + <xml-element java-attribute="region" name="region" required="true" type="java.lang.String"/> + <xml-element java-attribute="latitude" name="latitude" type="java.lang.String"/> + <xml-element java-attribute="longitude" name="longitude" type="java.lang.String"/> + <xml-element java-attribute="elevation" name="elevation" type="java.lang.String"/> + <xml-element java-attribute="lata" name="lata" type="java.lang.String"/> + <xml-element java-attribute="racks" name="racks" type="inventory.aai.onap.org.v23.Racks"/> + <xml-element java-attribute="cables" name="cables" type="inventory.aai.onap.org.v23.Cables"/> + <xml-element java-attribute="ctagPools" name="ctag-pools" type="inventory.aai.onap.org.v23.CtagPools"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Collection of physical locations that can house cloud-regions."/> + <xml-property name="indexedProps" value="identity-url,data-center-code,complex-name,physical-location-id,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="physical-location-id"/> + <xml-property name="container" value="complexes"/> + <xml-property name="namespace" value="cloud-infrastructure"/> + <xml-property name="uriTemplate" value="/cloud-infrastructure/complexes/complex/{physical-location-id}"/> + <xml-property name="requiredProps" value="physical-location-id,physical-location-type,street1,city,postal-code,country,region"/> + </xml-properties> + </java-type> + + <java-type name="Racks"> + <xml-root-element name="racks"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="rack" name="rack" type="inventory.aai.onap.org.v23.Rack"/> + </java-attributes> + </java-type> + + <java-type name="Rack"> + <xml-root-element name="rack"/> + <java-attributes> + <xml-element java-attribute="rackName" name="rack-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="A unique name for the rack (within the location)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="rackType" name="rack-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The type of rack."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="rackLocation" name="rack-location" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The location of the rack within the building."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="rackPosition" name="rack-position" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The position of the rack (ex-floor-mounted)."/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="rackPowerDiversity" name="rack-power-diversity" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value=""/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="rackUnits" name="rack-units" type="inventory.aai.onap.org.v23.RackUnits"/> + <xml-element java-attribute="pdus" name="pdus" type="inventory.aai.onap.org.v23.Pdus"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Definition of rack"/> + <xml-property name="uniqueProps" value="rack-name"/> + <xml-property name="indexedProps" value="rack-name,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="complex"/> + <xml-property name="container" value="racks"/> + <xml-property name="uriTemplate" value="/racks/rack/{rack-name}"/> + <xml-property name="requiredProps" value="rack-name,rack-type,rack-location,rack-power-diversity"/> + </xml-properties> + </java-type> + + <java-type name="Cables"> + <xml-root-element name="cables"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="cable" name="cable" type="inventory.aai.onap.org.v23.Cable"/> + </java-attributes> + </java-type> + + <java-type name="Cable"> + <xml-root-element name="cable"/> + <java-attributes> + <xml-element java-attribute="cableName" name="cable-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="A unique name for the channel-link relative to the physical-link."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="cableType" name="cable-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The type of cable."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Definition of cable"/> + <xml-property name="indexedProps" value="cable-name,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="complex"/> + <xml-property name="container" value="cables"/> + <xml-property name="uriTemplate" value="/cables/cable/{cable-name}"/> + <xml-property name="requiredProps" value="cable-name,cable-type"/> + </xml-properties> + </java-type> + + <java-type name="RackUnits"> + <xml-root-element name="rack-units"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="rackUnit" name="rack-unit" type="inventory.aai.onap.org.v23.RackUnit"/> + </java-attributes> + </java-type> + + <java-type name="RackUnit"> + <xml-root-element name="rack-unit"/> + <java-attributes> + <xml-element java-attribute="rackUnitName" name="rack-unit-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="A unique name for the rack-unit (within the rack)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Definition of rack-unit"/> + <xml-property name="indexedProps" value="rack-unit-name,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="rack"/> + <xml-property name="container" value="rack-units"/> + <xml-property name="uriTemplate" value="/rack-units/rack-unit/{rack-unit-name}"/> + <xml-property name="requiredProps" value="rack-unit-name"/> + </xml-properties> + </java-type> + + <java-type name="Pdus"> + <xml-root-element name="pdus"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="pdu" name="pdu" type="inventory.aai.onap.org.v23.Pdu"/> + </java-attributes> + </java-type> + + <java-type name="Pdu"> + <xml-root-element name="pdu"/> + <java-attributes> + <xml-element java-attribute="pduName" name="pdu-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="A unique name for the power distribution unit."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="pduType" name="pdu-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The type of pdu."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Definition of pdu"/> + <xml-property name="uniqueProps" value="pdu-name"/> + <xml-property name="indexedProps" value="pdu-name,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="rack"/> + <xml-property name="container" value="pdus"/> + <xml-property name="uriTemplate" value="/pdus/pdu/{pdu-name}"/> + <xml-property name="requiredProps" value="pdu-name,pdu-type"/> + </xml-properties> + </java-type> + + <java-type name="CtagPools"> + <xml-root-element name="ctag-pools"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="ctagPool" name="ctag-pool" type="inventory.aai.onap.org.v23.CtagPool"/> + </java-attributes> + </java-type> + + <java-type name="CtagPool"> + <xml-root-element name="ctag-pool"/> + <java-attributes> + <xml-element java-attribute="targetPe" name="target-pe" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="The Target provider edge router"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="availabilityZoneName" name="availability-zone-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name of the availability zone"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ctagPoolPurpose" name="ctag-pool-purpose" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Describes what the intended purpose of this pool is."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ctagValues" name="ctag-values" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Comma separated list of ctags"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="A collection of C tags (vlan tags) grouped for a specific purpose."/> + <xml-property name="indexedProps" value="availability-zone-name,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="complex"/> + <xml-property name="container" value="ctag-pools"/> + <xml-property name="uriTemplate" value="/ctag-pools/ctag-pool/{target-pe}/{availability-zone-name}"/> + <xml-property name="requiredProps" value="target-pe,availability-zone-name,ctag-pool-purpose"/> + </xml-properties> + </java-type> + + <java-type name="Tenants"> + <xml-properties> + <xml-property name="description" value="Collection of openstack tenants."/> + </xml-properties> + <xml-root-element name="tenants"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="tenant" name="tenant" type="inventory.aai.onap.org.v23.Tenant"/> + </java-attributes> + <xml-properties> + <xml-property name="maximumDepth" value="0"/> + </xml-properties> + </java-type> + + <java-type name="Tenant"> + <xml-root-element name="tenant"/> + <java-attributes> + <xml-element java-attribute="tenantId" name="tenant-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id relative to the cloud-region."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="tenantName" name="tenant-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Readable name of tenant"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="tenantContext" name="tenant-context" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This field will store the tenant context."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="parentId" name="parent-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="tenant parent-id"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vservers" name="vservers" type="inventory.aai.onap.org.v23.Vservers"/> + <xml-element java-attribute="nosServers" name="nos-servers" type="inventory.aai.onap.org.v23.NosServers"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Openstack tenant"/> + <xml-property name="nameProps" value="tenant-name"/> + <xml-property name="indexedProps" value="tenant-name,tenant-id,tenant-context,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="cloud-region"/> + <xml-property name="container" value="tenants"/> + <xml-property name="uriTemplate" value="/tenants/tenant/{tenant-id}"/> + <xml-property name="requiredProps" value="tenant-id,tenant-name"/> + </xml-properties> + </java-type> + + <java-type name="NosServers"> + <xml-properties> + <xml-property name="description" value="nos-server is the execution environment that will have images, certain versions of VNOS, running on it."/> + </xml-properties> + <xml-root-element name="nos-servers"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="nosServer" name="nos-server" type="inventory.aai.onap.org.v23.NosServer"/> + </java-attributes> + </java-type> + + <java-type name="NosServer"> + <xml-root-element name="nos-server"/> + <java-attributes> + <xml-element java-attribute="nosServerId" name="nos-server-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier for this nos relative to its tenant"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nosServerName" name="nos-server-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of nos"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vendor" name="vendor" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="uCPE vendor"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems. Valid values can be found at (https://wiki.web.att.com/display/SPTIIRP/prov-status)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nosServerSelflink" name="nos-server-selflink" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details"/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This is the execution environment that will have images, certain versions of VNOS, running on it. | A&AI clients for this object are typically: DCAE-DTI/FM/PM; SDNC, (DMaaP-DCAE,...) |"/> + <xml-property name="indexedProps" value="nos-server-id,prov-status,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="tenant"/> + <xml-property name="nameProps" value="nos-server-name"/> + <xml-property name="container" value="nos-servers"/> + <xml-property name="uriTemplate" value="/nos-servers/nos-server/{nos-server-id}"/> + <xml-property name="requiredProps" value="nos-server-id,nos-server-name,vendor,nos-server-selflink,in-maint"/> + </xml-properties> + </java-type> + + <java-type name="Vservers"> + <xml-properties> + <xml-property name="description" value="Collection of virtual Servers, aka virtual machines or VMs."/> + </xml-properties> + <xml-root-element name="vservers"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vserver" name="vserver" type="inventory.aai.onap.org.v23.Vserver"/> + </java-attributes> + </java-type> + + <java-type name="Vserver"> + <xml-root-element name="vserver"/> + <java-attributes> + <xml-element java-attribute="vserverId" name="vserver-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier for this vserver relative to its tenant"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vserverName" name="vserver-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of vserver"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vserverName2" name="vserver-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternative name of vserver"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems. Valid values can be found at (https://wiki.web.att.com/display/SPTIIRP/prov-status)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vserverSelflink" name="vserver-selflink" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details"/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs."/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="isClosedLoopDisabled" name="is-closed-loop-disabled" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Used to indicate whether closed loop function is enabled on this node"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="numa" name="numa" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Non-uniform memory access optimization, helps prevent memory-bandwidth bottlenecks. Expected values - 1 or 2 identifying memory access"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="volumes" name="volumes" type="inventory.aai.onap.org.v23.Volumes"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v23.LInterfaces"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Virtual Servers, aka virtual machine or VM."/> + <xml-property name="nameProps" value="vserver-name"/> + <xml-property name="indexedProps" value="is-closed-loop-disabled,prov-status,vserver-name,vserver-id,vserver-name2,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="tenant"/> + <xml-property name="container" value="vservers"/> + <xml-property name="uriTemplate" value="/vservers/vserver/{vserver-id}"/> + <xml-property name="requiredProps" value="vserver-id,vserver-name,vserver-selflink,in-maint,is-closed-loop-disabled"/> + </xml-properties> + </java-type> + + <java-type name="LInterfaces"> + <xml-properties> + <xml-property name="description" value="Collection of logical interfaces."/> + </xml-properties> + <xml-root-element name="l-interfaces"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="lInterface" name="l-interface" type="inventory.aai.onap.org.v23.LInterface"/> + </java-attributes> + </java-type> + + <java-type name="LInterface"> + <xml-root-element name="l-interface"/> + <java-attributes> + <xml-element java-attribute="interfaceName" name="interface-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name given to the interface"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceRole" name="interface-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="E.g., CUSTOMER, UPLINK, etc."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="v6WanLinkIp" name="v6-wan-link-ip" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Questionably placed - v6 ip addr of this interface (is in vr-lan-interface from Mary B."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceId" name="interface-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ID of interface"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="macaddr" name="macaddr" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="MAC address for the interface"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkName" name="network-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the network"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementOption" name="management-option" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Whether A&AI should be managing this interface of not. Could have value like CUSTOMER"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceDescription" name="interface-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Human friendly text regarding this interface."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceType" name="interface-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="type to sub-classify the l-interface (ex, loopback)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="isPortMirrored" name="is-port-mirrored" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="boolean indicatating whether or not port is a mirrored."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Prov Status of the logical interface. Valid values can be found at (https://wiki.web.att.com/display/SPTIIRP/prov-status)."/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="isIpUnnumbered" name="is-ip-unnumbered" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Flag indicating the interface uses the IP Unnumbered configuration."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="allowedAddressPairs" name="allowed-address-pairs" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Freeform field for storing an ip address, list of ip addresses or a subnet block."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="priority" name="priority" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Priority used for fail-over. Valid values 1-1024, with 1 being the highest priority."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="opsNote" name="ops-note" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Notes to aid OPs in troubleshooting, such as attribute aliases or additional descriptions/instructions about an object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceFunction" name="interface-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The function performed by this Linterface"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="l2Multicasting" name="l2-multicasting" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Identifies l2-multicasting support on an l-interface. true indicates that l2-multicasting is supported; defaulted to false ."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlans" name="vlans" type="inventory.aai.onap.org.v23.Vlans"/> + <xml-element java-attribute="sriovVfs" name="sriov-vfs" type="inventory.aai.onap.org.v23.SriovVfs"/> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v23.LInterfaces"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv4AddressList" name="l3-interface-ipv4-address-list" type="inventory.aai.onap.org.v23.L3InterfaceIpv4AddressList"/> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv6AddressList" name="l3-interface-ipv6-address-list" type="inventory.aai.onap.org.v23.L3InterfaceIpv6AddressList"/> + <xml-element java-attribute="adminStatus" name="admin-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Administrative status of the interface. Valid values are 'up', 'down', or 'testing'."/> + </xml-properties> + </xml-element> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Logical interfaces, e.g., a vnic."/> + <xml-property name="indexedProps" value="macaddr,interface-id,interface-name,network-name,interface-type,interface-function,interface-role,prov-status,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="generic-vnf,newvce,p-interface,vserver,lag-interface,l-interface,pnf,pserver"/> + <xml-property name="nameProps" value="interface-type"/> + <xml-property name="container" value="l-interfaces"/> + <xml-property name="uriTemplate" value="/l-interfaces/l-interface/{interface-name}"/> + <xml-property name="requiredProps" value="interface-name,is-port-mirrored,in-maint,is-ip-unnumbered"/> + </xml-properties> + </java-type> + + <java-type name="SriovVfs"> + <xml-properties> + <xml-property name="description" value="Collection of SR-IOV Virtual Functions."/> + </xml-properties> + <xml-root-element name="sriov-vfs"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="sriovVf" name="sriov-vf" type="inventory.aai.onap.org.v23.SriovVf"/> + </java-attributes> + </java-type> + <java-type name="SriovVf"> + <xml-root-element name="sriov-vf"/> + <java-attributes> + <xml-element java-attribute="pciId" name="pci-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="PCI ID used to identify the sriov-vf"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfVlanFilter" name="vf-vlan-filter" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This metadata provides option to specify list of VLAN filters applied on VF to pass the traffic to VM."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfMacFilter" name="vf-mac-filter" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="When MAC filters are specified, VF-agent service configures VFs to do MAC level filtering before the traffic is passed to VM."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfVlanStrip" name="vf-vlan-strip" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="When this field is set to true, VF will configured to strip the outer TAG before the traffic is passed to VM."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfVlanAntiSpoofCheck" name="vf-vlan-anti-spoof-check" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option ensures anti VLAN spoof checks are done at the VF level to comply with security. The disable check will also be honored per the VNF needs for trusted VMs."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfMacAntiSpoofCheck" name="vf-mac-anti-spoof-check" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option ensures anti MAC spoof checks are done at the VF level to comply with security. The disable check will also be honored per the VNF needs for trusted VMs."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfMirrors" name="vf-mirrors" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This option defines the set of Mirror objects which essentially mirrors the traffic from source to set of collector VNF Ports."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfBroadcastAllow" name="vf-broadcast-allow" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option, if set to true, sets the VF in promiscuous mode and allows all broadcast traffic to reach the VM"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfUnknownMulticastAllow" name="vf-unknown-multicast-allow" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option, if set to true, sets the VF in promiscuous mode and allows unknown multicast traffic to reach the VM"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfUnknownUnicastAllow" name="vf-unknown-unicast-allow" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option, if set to true, sets the VF in promiscuous mode and allows unknown unicast traffic to reach the VM"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfInsertStag" name="vf-insert-stag" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option, if set to true, instructs to insert outer tag after traffic comes out of VM."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfLinkStatus" name="vf-link-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This option is used to set the link status. Valid values as of 1607 are on, off, and auto."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of the interface"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="SR-IOV Virtual Function (not to be confused with virtual network function)"/> + <xml-property name="indexedProps" value="pci-id,vf-vlan-filter,vf-mac-filter,vf-vlan-strip,neutron-network-id,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="l-interface"/> + <xml-property name="container" value="sriov-vfs"/> + <xml-property name="uriTemplate" value="/sriov-vfs/sriov-vf/{pci-id}"/> + <xml-property name="requiredProps" value="pci-id"/> + </xml-properties> + </java-type> + + <java-type name="L3InterfaceIpv4AddressList"> + <xml-root-element name="l3-interface-ipv4-address-list"/> + <java-attributes> + <xml-element java-attribute="l3InterfaceIpv4Address" name="l3-interface-ipv4-address" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="IP address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="l3InterfaceIpv4PrefixLength" name="l3-interface-ipv4-prefix-length" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Prefix length, 32 for single address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdInner" name="vlan-id-inner" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Inner VLAN tag"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Outer VLAN tag"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="isFloating" name="is-floating" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="Indicator of fixed or floating address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of the interface that address belongs to"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronSubnetId" name="neutron-subnet-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron id of subnet that address belongs to"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="opsNote" name="ops-note" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Notes to aid OPs in troubleshooting, such as attribute aliases or additional descriptions/instructions about an object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="IPv4 Address Range"/> + <xml-property name="indexedProps" value="l3-interface-ipv4-address,vlan-id-inner,neutron-network-id,neutron-subnet-id,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="vlan,l-interface,vnfc,cp,lag-interface,p-interface"/> + <xml-property name="uriTemplate" value="/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}"/> + <xml-property name="requiredProps" value="l3-interface-ipv4-address"/> + </xml-properties> + </java-type> + + <java-type name="Vlans"> + <xml-root-element name="vlans"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vlan" name="vlan" type="inventory.aai.onap.org.v23.Vlan"/> + </java-attributes> + </java-type> + + <java-type name="Vlan"> + <xml-root-element name="vlan"/> + <java-attributes> + <xml-element java-attribute="vlanInterface" name="vlan-interface" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="String that identifies the interface"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdInner" name="vlan-id-inner" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Inner VLAN tag"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Outer VLAN tag"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the numeric part of the speed"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the units corresponding to the speed"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanType" name="vlan-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The type of vlan (eg. vxlan)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanDescription" name="vlan-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to describe (the service associated with) the vlan"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="backdoorConnection" name="backdoor-connection" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Whether customer is going to use this VLAN for backdoor connection to another customer premise device."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpnKey" name="vpn-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This indicates the customers VPN ID associated with this vlan"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Status of a vnf's vlan interface, on which the customer circuit resides, mastered by SDN-C."/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Prov Status of the VLAN configuration related to a logical interface. Valid values can be found at (https://wiki.web.att.com/display/SPTIIRP/prov-status)."/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="isIpUnnumbered" name="is-ip-unnumbered" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Flag indicating the interface uses the IP Unnumbered configuration."/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="isPrivate" name="is-private" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Private VLAN indicator."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv4AddressList" name="l3-interface-ipv4-address-list" type="inventory.aai.onap.org.v23.L3InterfaceIpv4AddressList"/> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv6AddressList" name="l3-interface-ipv6-address-list" type="inventory.aai.onap.org.v23.L3InterfaceIpv6AddressList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Definition of vlan"/> + <xml-property name="indexedProps" value="vlan-interface,vlan-id-inner,vpn-key,orchestration-status,prov-status,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="l-interface"/> + <xml-property name="container" value="vlans"/> + <xml-property name="uriTemplate" value="/vlans/vlan/{vlan-interface}"/> + <xml-property name="requiredProps" value="vlan-interface,in-maint,is-ip-unnumbered,is-private"/> + </xml-properties> + </java-type> + + <java-type name="L3InterfaceIpv6AddressList"> + <xml-root-element name="l3-interface-ipv6-address-list"/> + <java-attributes> + <xml-element java-attribute="l3InterfaceIpv6Address" name="l3-interface-ipv6-address" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="IP address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="l3InterfaceIpv6PrefixLength" name="l3-interface-ipv6-prefix-length" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Prefix length, 128 for single address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdInner" name="vlan-id-inner" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Inner VLAN tag"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Outer VLAN tag"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="isFloating" name="is-floating" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="Indicator of fixed or floating address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of the interface that address belongs to"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronSubnetId" name="neutron-subnet-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron id of subnet that address belongs to"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="opsNote" name="ops-note" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Notes to aid OPs in troubleshooting, such as attribute aliases or additional descriptions/instructions about an object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="IPv6 Address Range"/> + <xml-property name="indexedProps" value="l3-interface-ipv6-address,vlan-id-inner,neutron-network-id,neutron-subnet-id,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="vlan,l-interface,vnfc,cp,lag-interface,p-interface"/> + <xml-property name="uriTemplate" value="/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}"/> + <xml-property name="requiredProps" value="l3-interface-ipv6-address"/> + </xml-properties> + </java-type> + + <java-type name="Volumes"> + <xml-properties> + <xml-property name="description" value="Collection of ephemeral Block storage volumes."/> + </xml-properties> + <xml-root-element name="volumes"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="volume" name="volume" type="inventory.aai.onap.org.v23.Volume"/> + </java-attributes> + </java-type> + + <java-type name="Volume"> + <xml-root-element name="volume"/> + <java-attributes> + <xml-element java-attribute="volumeId" name="volume-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of block storage volume relative to the vserver."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="volumeSelflink" name="volume-selflink" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Ephemeral Block storage volume."/> + <xml-property name="indexedProps" value="volume-id,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="vserver"/> + <xml-property name="container" value="volumes"/> + <xml-property name="uriTemplate" value="/volumes/volume/{volume-id}"/> + <xml-property name="requiredProps" value="volume-id,volume-selflink"/> + </xml-properties> + </java-type> + + <java-type name="Flavors"> + <xml-properties> + <xml-property name="description" value="Collection of openstack flavors."/> + </xml-properties> + <xml-root-element name="flavors"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="flavor" name="flavor" type="inventory.aai.onap.org.v23.Flavor"/> + </java-attributes> + </java-type> + + <java-type name="Flavor"> + <xml-root-element name="flavor"/> + <java-attributes> + <xml-element java-attribute="flavorId" name="flavor-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Flavor id, expected to be unique across cloud-region."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorName" name="flavor-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Flavor name"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorVcpus" name="flavor-vcpus" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Number of CPUs"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorRam" name="flavor-ram" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Amount of memory"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorDisk" name="flavor-disk" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Disk space"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorEphemeral" name="flavor-ephemeral" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Amount of ephemeral disk space"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorSwap" name="flavor-swap" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="amount of swap space allocation"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorIsPublic" name="flavor-is-public" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="whether flavor is available to all users or private to the tenant it was created in."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorSelflink" name="flavor-selflink" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorDisabled" name="flavor-disabled" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="Boolean as to whether this flavor is no longer enabled"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Openstack flavor."/> + <xml-property name="nameProps" value="flavor-name"/> + <xml-property name="indexedProps" value="flavor-name,flavor-id,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="cloud-region"/> + <xml-property name="container" value="flavors"/> + <xml-property name="uriTemplate" value="/flavors/flavor/{flavor-id}"/> + <xml-property name="requiredProps" value="flavor-id,flavor-name,flavor-selflink"/> + </xml-properties> + </java-type> + + <java-type name="Snapshots"> + <xml-properties> + <xml-property name="description" value="Collection of openstack snapshots"/> + </xml-properties> + <xml-root-element name="snapshots"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="snapshot" name="snapshot" type="inventory.aai.onap.org.v23.Snapshot"/> + </java-attributes> + </java-type> + + <java-type name="Snapshot"> + <xml-root-element name="snapshot"/> + <java-attributes> + <xml-element java-attribute="snapshotId" name="snapshot-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Snapshot id, this is the key UUID assoc associated in glance with the snapshots."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="snapshotName" name="snapshot-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Snapshot name"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="snapshotArchitecture" name="snapshot-architecture" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Operating system architecture"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="snapshotOsDistro" name="snapshot-os-distro" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The common name of the operating system distribution in lowercase"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="snapshotOsVersion" name="snapshot-os-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The operating system version as specified by the distributor."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="application" name="application" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The application that the image instantiates."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVendor" name="application-vendor" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The vendor of the application."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVersion" name="application-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The version of the application."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="snapshotSelflink" name="snapshot-selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="prevSnapshotId" name="prev-snapshot-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This field contains the UUID of the previous snapshot (if any)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Openstack snapshot"/> + <xml-property name="nameProps" value="snapshot-name"/> + <xml-property name="uniqueProps" value="snapshot-id"/> + <xml-property name="indexedProps" value="application,snapshot-name,application-vendor,snapshot-id,application-version,prev-snapshot-id,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="cloud-region"/> + <xml-property name="container" value="snapshots"/> + <xml-property name="uriTemplate" value="/snapshots/snapshot/{snapshot-id}"/> + <xml-property name="requiredProps" value="snapshot-id"/> + </xml-properties> + </java-type> + + <java-type name="GroupAssignments"> + <xml-properties> + <xml-property name="description" value="Collection of openstack group assignments"/> + </xml-properties> + <xml-root-element name="group-assignments"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="groupAssignment" name="group-assignment" type="inventory.aai.onap.org.v23.GroupAssignment"/> + </java-attributes> + </java-type> + + <java-type name="GroupAssignment"> + <xml-root-element name="group-assignment"/> + <java-attributes> + <xml-element java-attribute="groupId" name="group-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Group id, expected to be unique across cloud-region."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="groupType" name="group-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Group type - the type of group this instance refers to"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="groupName" name="group-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Group name - name assigned to the group"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="groupDescription" name="group-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Group description - description of the group"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This openstack object is used to store exclusivity groups (EG). | A&AI clients for this object are typically: (DMaaP-DCAE,...) |"/> + <xml-property name="nameProps" value="group-name"/> + <xml-property name="indexedProps" value="group-id,group-type,group-name,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="cloud-region"/> + <xml-property name="container" value="group-assignments"/> + <xml-property name="uriTemplate" value="/group-assignments/group-assignment/{group-id}"/> + <xml-property name="requiredProps" value="group-id,group-type,group-name"/> + </xml-properties> + </java-type> + + <java-type name="Images"> + <xml-properties> + <xml-property name="description" value="Collectio of Openstack images."/> + </xml-properties> + <xml-root-element name="images"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="image" name="image" type="inventory.aai.onap.org.v23.Image"/> + </java-attributes> + </java-type> + + <java-type name="Image"> + <xml-root-element name="image"/> + <java-attributes> + <xml-element java-attribute="imageId" name="image-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Image id, expected to be unique across cloud region"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="imageName" name="image-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Image name"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="imageArchitecture" name="image-architecture" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Operating system architecture."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="imageOsDistro" name="image-os-distro" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The common name of the operating system distribution in lowercase"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="imageOsVersion" name="image-os-version" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The operating system version as specified by the distributor."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="application" name="application" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The application that the image instantiates."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVendor" name="application-vendor" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The vendor of the application."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVersion" name="application-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The version of the application."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="imageSelflink" name="image-selflink" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="metadata" name="metadata" type="inventory.aai.onap.org.v23.Metadata"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Openstack image."/> + <xml-property name="nameProps" value="image-name"/> + <xml-property name="indexedProps" value="application,image-name,application-vendor,image-id,application-version,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="cloud-region"/> + <xml-property name="container" value="images"/> + <xml-property name="uriTemplate" value="/images/image/{image-id}"/> + <xml-property name="requiredProps" value="image-id,image-name,image-os-distro,image-os-version,image-selflink"/> + </xml-properties> + </java-type> + + <java-type name="Metadata"> + <xml-properties> + <xml-property name="description" value="| SE group | This object captures the collection of metadatum (key/value pairs) | A&AI clients for this object are typically: DCAE-CCS; MSO, SDNC, (DMaaP-DCAE,...) |"/> + </xml-properties> + <xml-root-element name="metadata"/> + <java-attributes> + + <xml-element container-type="java.util.ArrayList" java-attribute="metadatum" name="metadatum" type="inventory.aai.onap.org.v23.Metadatum"/> + </java-attributes> + </java-type> + + <java-type name="Metadatum"> + <xml-root-element name="metadatum"/> + <java-attributes> + <xml-element java-attribute="metaname" name="metaname" required="true" type="java.lang.String" xml-key="true"/> + <xml-element java-attribute="metaval" name="metaval" required="true" type="java.lang.String"/> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This object captures the collection of metadatum (key/value pairs) | A&AI clients for this object are typically: DCAE-CCS; MSO, SDNC, (DMaaP-DCAE,...) |"/> + <xml-property name="indexedProps" value="metaname,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="image,service-instance,connector,configuration,model-ver,profile"/> + <xml-property name="container" value="metadata"/> + <xml-property name="uriTemplate" value="/metadata/metadatum/{metaname}"/> + <xml-property name="requiredProps" value="metaname,metaval"/> + </xml-properties> + </java-type> + + <java-type name="DvsSwitches"> + <xml-properties> + <xml-property name="description" value="Collection of digital virtual switch metadata used for vmWare VCEs and GenericVnfs."/> + </xml-properties> + <xml-root-element name="dvs-switches"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="dvsSwitch" name="dvs-switch" type="inventory.aai.onap.org.v23.DvsSwitch"/> + </java-attributes> + </java-type> + + <java-type name="DvsSwitch"> + <xml-root-element name="dvs-switch"/> + <java-attributes> + <xml-element java-attribute="switchName" name="switch-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="DVS switch name"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vcenterUrl" name="vcenter-url" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL used to reach the vcenter"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Digital virtual switch metadata, used by SDN-C to configure VCEs. A&AI needs to receive this data from the PO deployment team and administer it using the provisioningTool.sh into A&AI. "/> + <xml-property name="indexedProps" value="vcenter-url,switch-name,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="cloud-region"/> + <xml-property name="container" value="dvs-switches"/> + <xml-property name="uriTemplate" value="/dvs-switches/dvs-switch/{switch-name}"/> + <xml-property name="requiredProps" value="switch-name,vcenter-url"/> + </xml-properties> + </java-type> + + <java-type name="NetworkProfiles"> + <xml-properties> + <xml-property name="description" value="Collection of network profiles"/> + </xml-properties> + <xml-root-element name="network-profiles"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="networkProfile" name="network-profile" type="inventory.aai.onap.org.v23.NetworkProfile"/> + </java-attributes> + </java-type> + + <java-type name="NetworkProfile"> + <xml-root-element name="network-profile"/> + <java-attributes> + <xml-element java-attribute="nmProfileName" name="nm-profile-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique name of network profile."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="communityString" name="community-string" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Encrypted SNMP community string"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This object captures the Network profile populated by SDN-GP for SNMP | A&AI clients for this object are typically: DCAE-DTI; SDNGP, AAI-PUT, (DMaaP-DCAE,...) |"/> + <xml-property name="indexedProps" value="nm-profile-name,data-owner,data-source,data-source-version"/> + <xml-property name="container" value="network-profiles"/> + <xml-property name="namespace" value="cloud-infrastructure"/> + <xml-property name="uriTemplate" value="/cloud-infrastructure/network-profiles/network-profile/{nm-profile-name}"/> + <xml-property name="requiredProps" value="nm-profile-name"/> + </xml-properties> + </java-type> + + <java-type name="Pservers"> + <xml-properties> + <xml-property name="description" value="Collection of compute hosts."/> + </xml-properties> + <xml-root-element name="pservers"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="pserver" name="pserver" type="inventory.aai.onap.org.v23.Pserver"/> + </java-attributes> + <xml-properties> + <xml-property name="maximumDepth" value="0"/> + </xml-properties> + </java-type> + + <java-type name="Pserver"> + <xml-root-element name="pserver"/> + <java-attributes> + <xml-element java-attribute="hostname" name="hostname" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Value from executing hostname on the compute node."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ptniiEquipName" name="ptnii-equip-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="PTNII name"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="numberOfCpus" name="number-of-cpus" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Number of cpus"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="diskInGigabytes" name="disk-in-gigabytes" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Disk size, in GBs"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ramInMegabytes" name="ram-in-megabytes" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="RAM size, in MBs"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipType" name="equip-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment type. Source of truth should define valid values."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipVendor" name="equip-vendor" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment vendor. Source of truth should define valid values."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipModel" name="equip-model" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment model. Source of truth should define valid values."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="fqdn" name="fqdn" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Fully-qualified domain name"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="pserverSelflink" name="pserver-selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to configure device, also used for troubleshooting and is IP used for traps generated by device."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serialNumber" name="serial-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Serial number, may be queried"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV4Loopback0" name="ipaddress-v4-loopback-0" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV4 Loopback 0 address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV6Loopback0" name="ipaddress-v6-loopback-0" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV6 Loopback 0 address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV4Aim" name="ipaddress-v4-aim" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV4 AIM address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV6Aim" name="ipaddress-v6-aim" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV6 AIM address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV6Oam" name="ipaddress-v6-oam" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV6 OAM address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="invStatus" name="inv-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="CANOPI's inventory status. Only set with values exactly as defined by CANOPI."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="pserverId" name="pserver-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ID of Pserver"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="internetTopology" name="internet-topology" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="internet topology of Pserver"/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="pserverName2" name="pserver-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="alternative pserver name"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="purpose" name="purpose" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="purpose of pserver"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Prov Status of this device (not under canopi control). Valid values can be found at (https://wiki.web.att.com/display/SPTIIRP/prov-status)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementOption" name="management-option" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicates who owns and or manages the device."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="hostProfile" name="host-profile" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The host profile that defines the configuration of the pserver."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="role" name="role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The role performed by the pserver."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="function" name="function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The function performed by the pserver."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="opsNote" name="ops-note" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Notes to aid OPs in troubleshooting, such as attribute aliases or additional descriptions/instructions about an object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="pInterfaces" name="p-interfaces" type="inventory.aai.onap.org.v23.PInterfaces"/> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v23.LInterfaces"/> + <xml-element java-attribute="lagInterfaces" name="lag-interfaces" type="inventory.aai.onap.org.v23.LagInterfaces"/> + <xml-element java-attribute="activities" name="activities" type="inventory.aai.onap.org.v23.Activities"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Compute host whose hostname must be unique and must exactly match what is sent as a relationship to a vserver."/> + <xml-property name="nameProps" value="pserver-name2,fqdn"/> + <xml-property name="indexedProps" value="hostname,pserver-id,pserver-name2,inv-status,fqdn,prov-status,ptnii-equip-name,data-owner,data-source,data-source-version"/> + <xml-property name="container" value="pservers"/> + <xml-property name="namespace" value="cloud-infrastructure"/> + <xml-property name="uriTemplate" value="/cloud-infrastructure/pservers/pserver/{hostname}"/> + <xml-property name="requiredProps" value="hostname,in-maint"/> + </xml-properties> + </java-type> + + <java-type name="PInterfaces"> + <xml-properties> + <xml-property name="description" value="Collection of physical interfaces."/> + </xml-properties> + <xml-root-element name="p-interfaces"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="pInterface" name="p-interface" type="inventory.aai.onap.org.v23.PInterface"/> + </java-attributes> + </java-type> + + <java-type name="PInterface"> + <xml-root-element name="p-interface"/> + <java-attributes> + <xml-element java-attribute="interfaceName" name="interface-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name that identifies the physical interface"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceName2" name="interface-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternate name that identifies the physical interface"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the numeric part of the speed"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the units corresponding to the speed"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="portDescription" name="port-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Nature of the services and connectivity on this port."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentIdentifier" name="equipment-identifier" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="CLEI or other specification for p-interface hardware."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceRole" name="interface-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role specification for p-interface hardware."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceType" name="interface-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicates the physical properties of the interface."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems. Valid values can be found at (https://wiki.web.att.com/display/SPTIIRP/prov-status)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="invStatus" name="inv-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="inventory status"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="opsNote" name="ops-note" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Notes to aid OPs in troubleshooting, such as attribute aliases or additional descriptions/instructions about an object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceFunction" name="interface-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The function performed by this pInterface"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="macaddr" name="macaddr" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="MAC address for the interface"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="sriovPfs" name="sriov-pfs" type="inventory.aai.onap.org.v23.SriovPfs"/> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v23.LInterfaces"/> + <xml-element java-attribute="activities" name="activities" type="inventory.aai.onap.org.v23.Activities"/> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv4AddressList" name="l3-interface-ipv4-address-list" type="inventory.aai.onap.org.v23.L3InterfaceIpv4AddressList"/> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv6AddressList" name="l3-interface-ipv6-address-list" type="inventory.aai.onap.org.v23.L3InterfaceIpv6AddressList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Physical interface (e.g., nic)"/> + <xml-property name="indexedProps" value="interface-name,prov-status,interface-function,interface-role,interface-name2,data-owner,data-source,data-source-version"/> + <xml-property name="uiEditableProps" value="prov-status,port-description"/> + <xml-property name="nameProps" value="prov-status"/> + <xml-property name="dependentOn" value="vpls-pe,pserver,pnf"/> + <xml-property name="container" value="p-interfaces"/> + <xml-property name="uriTemplate" value="/p-interfaces/p-interface/{interface-name}"/> + <xml-property name="requiredProps" value="interface-name,in-maint"/> + </xml-properties> + </java-type> + + <java-type name="LagInterfaces"> + <xml-properties> + <xml-property name="description" value="Collection of link aggregate interfaces."/> + </xml-properties> + <xml-root-element name="lag-interfaces"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="lagInterface" name="lag-interface" type="inventory.aai.onap.org.v23.LagInterface"/> + </java-attributes> + </java-type> + + <java-type name="LagInterface"> + <xml-root-element name="lag-interface"/> + <java-attributes> + <xml-element java-attribute="interfaceName" name="interface-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name that identifies the link aggregate interface"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceDescription" name="interface-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Human friendly text regarding this interface."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the numeric part of the speed"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the units corresponding to the speed"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceId" name="interface-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ID of interface"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceRole" name="interface-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role assigned to this Interface, should use values as defined in ECOMP Yang models."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems. Valid values can be found at (https://wiki.web.att.com/display/SPTIIRP/prov-status)."/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="lacpSystemId" name="lacp-system-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The system id used by the LACP protocol."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="opsNote" name="ops-note" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Notes to aid OPs in troubleshooting, such as attribute aliases or additional descriptions/instructions about an object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceFunction" name="interface-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The function performed by this Lag interface"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="minLinks" name="min-links" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Minimum links in service before a LAG should be taken out of service"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceType" name="interface-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to identify the type of lag-interface."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v23.LInterfaces"/> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv4AddressList" name="l3-interface-ipv4-address-list" type="inventory.aai.onap.org.v23.L3InterfaceIpv4AddressList"/> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv6AddressList" name="l3-interface-ipv6-address-list" type="inventory.aai.onap.org.v23.L3InterfaceIpv6AddressList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Link aggregate interface"/> + <xml-property name="indexedProps" value="interface-name,interface-id,interface-role,interface-function,prov-status,data-owner,data-source,data-source-version"/> + <xml-property name="uiEditableProps" value="prov-status"/> + <xml-property name="dependentOn" value="generic-vnf,pserver,vpls-pe,pnf"/> + <xml-property name="container" value="lag-interfaces"/> + <xml-property name="uriTemplate" value="/lag-interfaces/lag-interface/{interface-name}"/> + <xml-property name="requiredProps" value="interface-name,in-maint"/> + </xml-properties> + </java-type> + + <java-type name="Endpoints"> + <xml-properties> + <xml-property name="description" value="Collection of endpoints."/> + </xml-properties> + <xml-root-element name="endpoints"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="endpoint" name="endpoint" type="inventory.aai.onap.org.v23.Endpoint"/> + </java-attributes> + </java-type> + + <java-type name="Endpoint"> + <xml-root-element name="endpoint"/> + <java-attributes> + <xml-element java-attribute="endpointId" name="endpoint-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier for the endpoint."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="endpointName" name="endpoint-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the endpoint."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="endpointType" name="endpoint-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of the endpoint. Expected values are DNS, ETCD, Kubernetes, etc."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="endpointName2" name="endpoint-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternate name of the endpoint"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element container-type="java.util.ArrayList" java-attribute="ipAddressList" name="ip-address-list" type="inventory.aai.onap.org.v23.IpAddressList"/> + <xml-element container-type="java.util.ArrayList" java-attribute="portList" name="port-list" type="inventory.aai.onap.org.v23.PortList"/> + <xml-element container-type="java.util.ArrayList" java-attribute="selectorList" name="selector-list" type="inventory.aai.onap.org.v23.SelectorList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="describes an endpoints"/> + <xml-property name="namespace" value="cloud-infrastructure"/> + <xml-property name="container" value="endpoints"/> + <xml-property name="uriTemplate" value="/cloud-infrastructure/endpoints/endpoint/{endpoint-id}"/> + <xml-property name="requiredProps" value="endpoint-id"/> + <xml-property name="indexedProps" value="data-owner,data-source,data-source-version"/> + </xml-properties> + </java-type> + + <java-type name="Activities"> + <xml-properties> + <xml-property name="description" value="Collection of activities."/> + </xml-properties> + <xml-root-element name="activities"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="activity" name="activity" type="inventory.aai.onap.org.v23.Activity"/> + </java-attributes> + </java-type> + + <java-type name="Activity"> + <xml-root-element name="activity"/> + <java-attributes> + <xml-element java-attribute="activityId" name="activity-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id for the activity. (UUID)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="activityType" name="activity-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of activity (ex, provisioning)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="activityName" name="activity-name" required="false" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the activity."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="activityCreator" name="activity-creator" required="false" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Application that created the activity."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="activityDescription" name="activity-description" required="false" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Description of activity."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="activityTimeStamp" name="timestamp" required="false" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Date and Time activity is created."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="currentState" name="current-state" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Current state of the activity."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="reflectedState" name="reflected-state" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="State reflected by the database."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="activityRole" name="activity-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="activityFunction" name="activity-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Function"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="timestampLastUpdated" name="timestamp-last-updated" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Date/time last updated"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="timestampExpiration" name="timestamp-expiration" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Date/time expires"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="activityStates" name="activity-states" type="inventory.aai.onap.org.v23.ActivityStates"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="describes an activities"/> + <xml-property name="uniqueProps" value="activity-id"/> + <xml-property name="dependentOn" value="pserver,pnf,cloud-region,p-interface,network-range"/> + <xml-property name="container" value="activities"/> + <xml-property name="uriTemplate" value="/activities/activity/{activity-id}"/> + <xml-property name="requiredProps" value="activity-id,activity-type"/> + <xml-property name="indexedProps" value="data-owner,data-source,data-source-version"/> + </xml-properties> + </java-type> + + <java-type name="ActivityStates"> + <xml-properties> + <xml-property name="description" value="Collection of activity-states"/> + </xml-properties> + <xml-root-element name="activity-states"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="activityState" name="activity-state" type="inventory.aai.onap.org.v23.ActivityState"/> + </java-attributes> + </java-type> + + <java-type name="ActivityState"> + <xml-root-element name="activity-state"/> + <java-attributes> + <xml-element java-attribute="stateOrder" name="state-order" required="true" type="java.lang.Integer" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Order for the activity state."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="stateName" name="state-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the activity state (ex, NVT-PROV)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="stateView" name="state-view" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="View of the activity state."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="describes an activities"/> + <xml-property name="uniqueProps" value="state-order"/> + <xml-property name="dependentOn" value="activity"/> + <xml-property name="container" value="activity-states"/> + <xml-property name="uriTemplate" value="/activity-states/activity-state/{state-order}"/> + <xml-property name="requiredProps" value="state-order,state-name"/> + <xml-property name="indexedProps" value="data-owner,data-source,data-source-version"/> + </xml-properties> + </java-type> + + <java-type name="Vrfs"> + <xml-root-element name="vrfs"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vrf" name="vrf" type="inventory.aai.onap.org.v23.Vrf"/> + </java-attributes> + <xml-properties> + </xml-properties> + </java-type> + + <java-type name="Vrf"> + <xml-root-element name="vrf"/> + <java-attributes> + <xml-element java-attribute="vrfId" name="vrf-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="VRF UUID."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vrfName" name="vrf-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="VRF Name"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vrfDescription" name="vrf-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="VRF Description"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="routeDistinguisher" name="route-distinguisher" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Route Distinguisher"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vrfType" name="vrf-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The type of vrf (bridge-domain as an example)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vrfAddressFamily" name="vrf-address-family" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IP address family (v6/v4/both)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="opsNote" name="ops-note" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Notes to aid OPs in troubleshooting, such as attribute aliases or additional descriptions/instructions about an object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vrfRole" name="vrf-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for the use of this physical link"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vrfFunction" name="vrf-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The function performed by this Linterface"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vrfGroupName" name="vrf-group-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Bridge domain group name"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="bestExternal" name="best-external" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies best-external vrf, best-external=Y if the conditions are met. otherwise, best-external = N"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="maxPrefixV4" name="max-prefix-v4" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Max prefix for IPv4."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="maxPrefixV6" name="max-prefix-v6" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Max prefix for IPv6."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="maxPrefixThresholdV4" name="max-prefix-threshold-v4" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Max prefix threshold for IPv4."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="maxPrefixThresholdV6" name="max-prefix-threshold-v6" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Max prefix threshold for IPv6."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="labelModeV4" name="label-mode-v4" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Label mode for IPv4."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="labelModeV6" name="label-mode-v6" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Label mode for IPv6."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="maxPathsV4" name="max-paths-v4" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="stores maximum number of paths for IPv4."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="maxPathsV6" name="max-paths-v6" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="stores maximum number of paths for IPv6."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="bgpGroups" name="bgp-groups" type="inventory.aai.onap.org.v23.BgpGroups"/> + <xml-element java-attribute="bgpNeighbors" name="bgp-neighbors" type="inventory.aai.onap.org.v23.BgpNeighbors"/> + <xml-element java-attribute="aggregateRoutes" name="aggregate-routes" type="inventory.aai.onap.org.v23.AggregateRoutes"/> + <xml-element java-attribute="routeTargets" name="route-targets" type="inventory.aai.onap.org.v23.RouteTargets"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This is a technology that allows multiple instances of a routing table to co-exist within the same router at the same time.. VRFs are the same methods of network (L3) isolation/virtualization as VLANs for L2 virtualization. | A&AI clients for this object are typically: CDM/FCT, BICON, PINC/Autogen |"/> + <xml-property name="indexedProps" value="vrf-id,vrf-role,vrf-function,data-owner,data-source,data-source-version"/> + <xml-property name="nameProps" value="vrf-name"/> + <xml-property name="dependentOn" value="pnf"/> + <xml-property name="container" value="vrfs"/> + <xml-property name="uriTemplate" value="/vrfs/vrf/{vrf-id}"/> + <xml-property name="requiredProps" value="vrf-id,vrf-name"/> + </xml-properties> + </java-type> + + <java-type name="OamNetworks"> + <xml-properties> + <xml-property name="description" value="Collection of OAM networks, to be deprecated shortly. Do not use for new purposes. "/> + </xml-properties> + <xml-root-element name="oam-networks"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="oamNetwork" name="oam-network" type="inventory.aai.onap.org.v23.OamNetwork"/> + </java-attributes> + </java-type> + + <java-type name="OamNetwork"> + <xml-root-element name="oam-network"/> + <java-attributes> + <xml-element java-attribute="networkUuid" name="network-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID of the network. Unique across a cloud-region"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkName" name="network-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the network."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="cvlanTag" name="cvlan-tag" required="true" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="cvlan-id"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamGatewayAddress" name="ipv4-oam-gateway-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for VNF firewall rule so customer cannot send customer traffic over this oam network"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamGatewayAddressPrefixLength" name="ipv4-oam-gateway-address-prefix-length" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Used for VNF firewall rule so customer cannot send customer traffic over this oam network"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="OAM network, to be deprecated shortly. Do not use for new purposes. "/> + <xml-property name="nameProps" value="network-name"/> + <xml-property name="indexedProps" value="cvlan-tag,network-uuid,network-name,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="cloud-region"/> + <xml-property name="container" value="oam-networks"/> + <xml-property name="uriTemplate" value="/oam-networks/oam-network/{network-uuid}"/> + <xml-property name="requiredProps" value="network-uuid,network-name,cvlan-tag"/> + </xml-properties> + </java-type> + + <java-type name="ValidationAudits"> + <xml-properties> + <xml-property name="description" value="Collection of validation-audit"/> + </xml-properties> + <xml-root-element name="validation-audits"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="validationAudit" name="validation-audit" type="inventory.aai.onap.org.v23.ValidationAudit"/> + </java-attributes> + </java-type> + <java-type name="ValidationAudit"> + <xml-root-element name="validation-audit"/> + <java-attributes> + <xml-element java-attribute="validationId" name="validation-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Validation-Audit UUID"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="validationRequestId" name="validation-request-id" type="java.lang.String" > + <xml-properties> + <xml-property name="description" value="Request-id to retrieve data from client related to the specified audit"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="validationStatus" name="validation-status" type="java.lang.String" > + <xml-properties> + <xml-property name="description" value="Status of the audit"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="validationPhase" name="validation-phase" type="java.lang.String" > + <xml-properties> + <xml-property name="description" value="Phase in the lifecycle of the configuration"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="validation audit, value of validation status"/> + <xml-property name="indexedProps" value="validation-id,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="validation-id"/> + <xml-property name="dependentOn" value="cloud-region"/> + <xml-property name="container" value="validation-audits"/> + <xml-property name="uriTemplate" value="/validation-audits/validation-audit/{validation-id}"/> + <xml-property name="requiredProps" value="validation-id"/> + </xml-properties> + </java-type> + + <java-type name="AvailabilityZones"> + <xml-properties> + <xml-property name="description" value="Collection of availability zones"/> + </xml-properties> + <xml-root-element name="availability-zones"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="availabilityZone" name="availability-zone" type="inventory.aai.onap.org.v23.AvailabilityZone"/> + </java-attributes> + </java-type> + + <java-type name="AvailabilityZone"> + <xml-root-element name="availability-zone"/> + <java-attributes> + <xml-element java-attribute="availabilityZoneName" name="availability-zone-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name of the availability zone. Unique across a cloud region"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="hypervisorType" name="hypervisor-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of hypervisor. Source of truth should define valid values."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="State that indicates whether the availability zone should be used, etc. Source of truth should define valid values."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Availability zone, a collection of compute hosts/pservers"/> + <xml-property name="indexedProps" value="availability-zone-name,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="cloud-region"/> + <xml-property name="container" value="availability-zones"/> + <xml-property name="uriTemplate" value="/availability-zones/availability-zone/{availability-zone-name}"/> + <xml-property name="requiredProps" value="availability-zone-name,hypervisor-type"/> + </xml-properties> + </java-type> + + <java-type name="VirtualDataCenters"> + <xml-properties> + <xml-property name="description" value="Virtual organization of cloud infrastructure elements in a data center context"/> + </xml-properties> + <xml-root-element name="virtual-data-centers"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="virtualDataCenter" name="virtual-data-center" type="inventory.aai.onap.org.v23.VirtualDataCenter"/> + </java-attributes> + </java-type> + + <java-type name="VirtualDataCenter"> + <xml-root-element name="virtual-data-center"/> + <java-attributes> + <xml-element java-attribute="vdcId" name="vdc-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of the vdc"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vdcName" name="vdc-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the virtual data center"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This object captures virtual organization of cloud infrastructure elements in a data center context | A&AI clients for this object are typically: DCAE-CCS; SDNC |"/> + <xml-property name="nameProps" value="vdc-name"/> + <xml-property name="indexedProps" value="vdc-name,vdc-id,data-owner,data-source,data-source-version"/> + <xml-property name="container" value="virtual-data-centers"/> + <xml-property name="namespace" value="cloud-infrastructure"/> + <xml-property name="uriTemplate" value="/cloud-infrastructure/virtual-data-centers/virtual-data-center/{vdc-id}"/> + <xml-property name="requiredProps" value="vdc-id,vdc-name"/> + </xml-properties> + </java-type> + + <java-type name="Business"> + <xml-properties> + <xml-property name="description" value="Namespace for business related constructs"/> + </xml-properties> + <xml-root-element name="business"/> + <java-attributes> + <xml-element java-attribute="connectors" name="connectors" type="inventory.aai.onap.org.v23.Connectors"/> + <xml-element java-attribute="customers" name="customers" type="inventory.aai.onap.org.v23.Customers"/> + <xml-element java-attribute="linesOfBusiness" name="lines-of-business" type="inventory.aai.onap.org.v23.LinesOfBusiness"/> + <xml-element java-attribute="owningEntities" name="owning-entities" type="inventory.aai.onap.org.v23.OwningEntities"/> + <xml-element java-attribute="platforms" name="platforms" type="inventory.aai.onap.org.v23.Platforms"/> + <xml-element java-attribute="projects" name="projects" type="inventory.aai.onap.org.v23.Projects"/> + </java-attributes> + </java-type> + + <java-type name="Projects"> + <xml-properties> + <xml-property name="description" value="Collection of projects"/> + </xml-properties> + <xml-root-element name="projects"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="project" name="project" type="inventory.aai.onap.org.v23.Project"/> + </java-attributes> + </java-type> + + <java-type name="Project"> + <xml-root-element name="project"/> + <java-attributes> + <xml-element java-attribute="projectName" name="project-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name of the project deploying a service"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="projectType" name="project-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of project (ex, VPMO)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="projectState" name="project-state" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Current state of the project."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="description" name="description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Description of the project."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This object describes the project | A&AI clients for this object are typically: IDF, SO.BPMN, VID; MSO, (DMaaP-DCAE,...) |"/> + <xml-property name="indexedProps" value="project-name,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="project-name"/> + <xml-property name="container" value="projects"/> + <xml-property name="namespace" value="business"/> + <xml-property name="uriTemplate" value="/business/projects/project/{project-name}"/> + <xml-property name="requiredProps" value="project-name"/> + </xml-properties> + </java-type> + + <java-type name="Connectors"> + <xml-properties> + <xml-property name="description" value="Collection of resource instances used to connect a variety of disparate inventory widgets"/> + </xml-properties> + <xml-root-element name="connectors"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="connector" name="connector" type="inventory.aai.onap.org.v23.Connector"/> + </java-attributes> + </java-type> + + <java-type name="Connector"> + <xml-root-element name="connector"/> + <java-attributes> + <xml-element java-attribute="resourceInstanceId" name="resource-instance-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of resource instance."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-version-id"/> + <xml-property name="dbAlias" value="model-invariant-id-local"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-invariant-id"/> + <xml-property name="dbAlias" value="model-version-id-local"/> + <xml-property name="privateEdge" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="metadata" name="metadata" type="inventory.aai.onap.org.v23.Metadata"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This object captures the collection of resource instances to connect a variety of disparate inventory widgets | A&AI clients for this object are typically: (DMaaP-DCAE,...) |"/> + <xml-property name="indexedProps" value="resource-instance-id,model-invariant-id,model-version-id,widget-model-id,widget-model-version,data-owner,data-source,data-source-version"/> + <xml-property name="container" value="connectors"/> + <xml-property name="namespace" value="business"/> + <xml-property name="uriTemplate" value="/business/connectors/connector/{resource-instance-id}"/> + <xml-property name="requiredProps" value="resource-instance-id"/> + </xml-properties> + </java-type> + + <java-type name="Customers"> + <xml-properties> + <xml-property name="description" value="Collection of customer identifiers to provide linkage back to BSS information."/> + </xml-properties> + <xml-root-element name="customers"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="customer" name="customer" type="inventory.aai.onap.org.v23.Customer"/> + </java-attributes> + <xml-properties> + <xml-property name="maximumDepth" value="0"/> + </xml-properties> + </java-type> + + <java-type name="Customer"> + <xml-root-element name="customer"/> + <java-attributes> + <xml-element java-attribute="globalCustomerId" name="global-customer-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Global customer id used across ECOMP to uniquely identify customer."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="subscriberName" name="subscriber-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Subscriber name, an alternate way to retrieve a customer."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="subscriberType" name="subscriber-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Subscriber type, a way to provide VID with only the INFRA customers."/> + <xml-property name="defaultValue" value="CUST"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceSubscriptions" name="service-subscriptions" type="inventory.aai.onap.org.v23.ServiceSubscriptions"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="customer identifiers to provide linkage back to BSS information."/> + <xml-property name="nameProps" value="subscriber-name"/> + <xml-property name="indexedProps" value="subscriber-name,global-customer-id,subscriber-type,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="global-customer-id"/> + <xml-property name="container" value="customers"/> + <xml-property name="namespace" value="business"/> + <xml-property name="uriTemplate" value="/business/customers/customer/{global-customer-id}"/> + <xml-property name="requiredProps" value="global-customer-id,subscriber-name,subscriber-type"/> + </xml-properties> + </java-type> + + <java-type name="LinesOfBusiness"> + <xml-properties> + <xml-property name="description" value="Collection of lines-of-business"/> + </xml-properties> + <xml-root-element name="lines-of-business"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="lineOfBusiness" name="line-of-business" type="inventory.aai.onap.org.v23.LineOfBusiness"/> + </java-attributes> + </java-type> + + <java-type name="LineOfBusiness"> + <xml-root-element name="line-of-business"/> + <java-attributes> + <xml-element java-attribute="lineOfBusinessName" name="line-of-business-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name of the line-of-business (product)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="describes a line-of-business"/> + <xml-property name="indexedProps" value="line-of-business-name,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="line-of-business-name"/> + <xml-property name="container" value="lines-of-business"/> + <xml-property name="namespace" value="business"/> + <xml-property name="uriTemplate" value="/business/lines-of-business/line-of-business/{line-of-business-name}"/> + <xml-property name="requiredProps" value="line-of-business-name"/> + </xml-properties> + </java-type> + + <java-type name="OwningEntities"> + <xml-properties> + <xml-property name="description" value="Collection of owning-entities"/> + </xml-properties> + <xml-root-element name="owning-entities"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="owningEntity" name="owning-entity" type="inventory.aai.onap.org.v23.OwningEntity"/> + </java-attributes> + </java-type> + + <java-type name="OwningEntity"> + <xml-root-element name="owning-entity"/> + <java-attributes> + <xml-element java-attribute="owningEntityId" name="owning-entity-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID of an owning entity"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="owningEntityName" name="owning-entity-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Owning entity name"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="describes an owning-entity"/> + <xml-property name="indexedProps" value="owning-entity-id,owning-entity-name,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="owning-entity-id,owning-entity-name"/> + <xml-property name="container" value="owning-entities"/> + <xml-property name="namespace" value="business"/> + <xml-property name="uriTemplate" value="/business/owning-entities/owning-entity/{owning-entity-id}"/> + <xml-property name="requiredProps" value="owning-entity-id,owning-entity-name"/> + </xml-properties> + </java-type> + + <java-type name="Platforms"> + <xml-properties> + <xml-property name="description" value="Collection of platforms"/> + </xml-properties> + <xml-root-element name="platforms"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="platform" name="platform" type="inventory.aai.onap.org.v23.Platform"/> + </java-attributes> + </java-type> + + <java-type name="Platform"> + <xml-root-element name="platform"/> + <java-attributes> + <xml-element java-attribute="platformName" name="platform-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name of the platform"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="describes a platform"/> + <xml-property name="indexedProps" value="platform-name,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="platform-name"/> + <xml-property name="container" value="platforms"/> + <xml-property name="namespace" value="business"/> + <xml-property name="uriTemplate" value="/business/platforms/platform/{platform-name}"/> + <xml-property name="requiredProps" value="platform-name"/> + </xml-properties> + </java-type> + + <java-type name="ServiceSubscriptions"> + <xml-properties> + <xml-property name="description" value="Collection of objects that group service instances."/> + </xml-properties> + <xml-root-element name="service-subscriptions"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="serviceSubscription" name="service-subscription" type="inventory.aai.onap.org.v23.ServiceSubscription"/> + </java-attributes> + </java-type> + + <java-type name="ServiceSubscription"> + <xml-root-element name="service-subscription"/> + <java-attributes> + <xml-element java-attribute="serviceType" name="service-type" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Value defined by orchestration to identify this service across ECOMP."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="tempUbSubAccountId" name="temp-ub-sub-account-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This property will be deleted from A&AI in the near future. Only stop gap solution."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceInstances" name="service-instances" type="inventory.aai.onap.org.v23.ServiceInstances"> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Object that group service instances."/> + <xml-property name="indexedProps" value="service-type,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="customer"/> + <xml-property name="container" value="service-subscriptions"/> + <xml-property name="crossEntityReference" value="service-instance,service-type"/> + <xml-property name="uriTemplate" value="/service-subscriptions/service-subscription/{service-type}"/> + <xml-property name="requiredProps" value="service-type"/> + </xml-properties> + </java-type> + + <java-type name="ServiceInstances"> + <xml-properties> + <xml-property name="description" value="Collection of service instances"/> + </xml-properties> + <xml-root-element name="service-instances"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="serviceInstance" name="service-instance" type="inventory.aai.onap.org.v23.ServiceInstance"/> + </java-attributes> + </java-type> + + <java-type name="ServiceInstance"> + <xml-root-element name="service-instance"/> + <java-attributes> + <xml-element java-attribute="serviceInstanceId" name="service-instance-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Uniquely identifies this instance of a service"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceInstanceName" name="service-instance-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This field will store a name assigned to the service-instance."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceType" name="service-type" required="false" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing type of service."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceRole" name="service-role" required="false" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing the service role."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="environmentContext" name="environment-context" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This field will store the environment context assigned to the service-instance."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="workloadContext" name="workload-context" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This field will store the workload context assigned to the service-instance."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-version-id"/> + <xml-property name="dbAlias" value="model-invariant-id-local"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-invariant-id"/> + <xml-property name="dbAlias" value="model-version-id-local"/> + <xml-property name="privateEdge" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model."/> + <xml-property name="visibility" value="internal"/> + <xml-property name="dataCopy" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}#model-version"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="bandwidthTotal" name="bandwidth-total" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicates the total bandwidth to be used for this service."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="bandwidthUpWan1" name="bandwidth-up-wan1" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="indicates the upstream bandwidth this service will use on the WAN1 port of the physical device."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="bandwidthDownWan1" name="bandwidth-down-wan1" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="indicates the downstream bandwidth this service will use on the WAN1 port of the physical device."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="bandwidthUpWan2" name="bandwidth-up-wan2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="indicates the upstream bandwidth this service will use on the WAN2 port of the physical device."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="bandwidthDownWan2" name="bandwidth-down-wan2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="indicates the downstream bandwidth this service will use on the WAN2 port of the physical device."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vhnPortalUrl" name="vhn-portal-url" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL customers will use to access the vHN Portal."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceInstanceLocationId" name="service-instance-location-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="An identifier that customers assign to the location where this service is being used."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Path to the controller object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this service."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceFunction" name="service-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing function of the service."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="metadata" name="metadata" type="inventory.aai.onap.org.v23.Metadata"/> + <xml-element java-attribute="allottedResources" name="allotted-resources" type="inventory.aai.onap.org.v23.AllottedResources"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Instance of a service"/> + <xml-property name="indexedProps" value="service-instance-id,model-invariant-id,model-version-id,widget-model-id,widget-model-version,service-instance-name,service-instance-location-id,orchestration-status,environment-context,workload-context,data-owner,data-source,data-source-version"/> + <xml-property name="nameProps" value="service-instance-name"/> + <xml-property name="uniqueProps" value="service-instance-id"/> + <xml-property name="dependentOn" value="service-subscription"/> + <xml-property name="container" value="service-instances"/> + <xml-property name="uriTemplate" value="/service-instances/service-instance/{service-instance-id}"/> + <xml-property name="requiredProps" value="service-instance-id"/> + </xml-properties> + </java-type> + + <java-type name="ServiceDesignAndCreation"> + <xml-properties> + <xml-property name="description" value="Namespace for objects managed by ASDC"/> + </xml-properties> + <xml-root-element name="service-design-and-creation"/> + <java-attributes> + <xml-element java-attribute="vnfImages" name="vnf-images" type="inventory.aai.onap.org.v23.VnfImages"/> + <xml-element java-attribute="services" name="services" type="inventory.aai.onap.org.v23.Services"/> + <xml-element java-attribute="serviceCapabilities" name="service-capabilities" type="inventory.aai.onap.org.v23.ServiceCapabilities"/> + <xml-element java-attribute="models" name="models" type="inventory.aai.onap.org.v23.Models"/> + <xml-element java-attribute="namedQueries" name="named-queries" type="inventory.aai.onap.org.v23.NamedQueries"/> + </java-attributes> + </java-type> + + <java-type name="VnfImages"> + <xml-properties> + <xml-property name="description" value="Collection of image objects that pertain to a VNF that doesn't have associated vservers. This is a kludge."/> + </xml-properties> + <xml-root-element name="vnf-images"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vnfImage" name="vnf-image" type="inventory.aai.onap.org.v23.VnfImage"/> + </java-attributes> + </java-type> + + <java-type name="VnfImage"> + <xml-root-element name="vnf-image"/> + <java-attributes> + <xml-element java-attribute="vnfImageUuid" name="vnf-image-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of this asset"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="application" name="application" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The application that the image instantiates."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVendor" name="application-vendor" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The vendor of the application."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVersion" name="application-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The version of the application."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Image object that pertain to a VNF that doesn't have associated vservers. This is a kludge."/> + <xml-property name="indexedProps" value="application,vnf-image-uuid,application-vendor,application-version,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="vnf-image-uuid"/> + <xml-property name="container" value="vnf-images"/> + <xml-property name="namespace" value="service-design-and-creation"/> + <xml-property name="uriTemplate" value="/service-design-and-creation/vnf-images/vnf-image/{vnf-image-uuid}"/> + <xml-property name="requiredProps" value="vnf-image-uuid,application,application-vendor"/> + </xml-properties> + </java-type> + + <java-type name="Services"> + <xml-properties> + <xml-property name="description" value="Collection of service model definitions. Likely to be deprecated in favor of models from ASDC."/> + </xml-properties> + <xml-root-element name="services"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="service" name="service" type="inventory.aai.onap.org.v23.Service"/> + </java-attributes> + </java-type> + + <java-type name="Service"> + <xml-root-element name="service"/> + <java-attributes> + <xml-element java-attribute="serviceId" name="service-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="This gets defined by others to provide a unique ID for the service, we accept what is sent."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceDescription" name="service-description" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Description of the service"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceSelflink" name="service-selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceVersion" name="service-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="service version"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Stand-in for service model definitions. Likely to be deprecated in favor of models from ASDC. Does not strictly map to ASDC services."/> + <xml-property name="indexedProps" value="service-description,service-id,data-owner,data-source,data-source-version"/> + <xml-property name="container" value="services"/> + <xml-property name="namespace" value="service-design-and-creation"/> + <xml-property name="uriTemplate" value="/service-design-and-creation/services/service/{service-id}"/> + <xml-property name="requiredProps" value="service-id,service-description"/> + </xml-properties> + </java-type> + + <java-type name="ServiceCapabilities"> + <xml-properties> + <xml-property name="description" value="Collection of service capabilities."/> + </xml-properties> + <xml-root-element name="service-capabilities"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="serviceCapability" name="service-capability" type="inventory.aai.onap.org.v23.ServiceCapability"/> + </java-attributes> + </java-type> + + <java-type name="ServiceCapability"> + <xml-root-element name="service-capability"/> + <java-attributes> + <xml-element java-attribute="serviceType" name="service-type" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="This gets defined by others to provide a unique ID for the service, we accept what is sent."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded in service-specific ways and clients should expect changes to occur in the future to this field as ECOMP matures."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Early definition of server/resource pairings, likely to be replaced by models. No new use should be made of this."/> + <xml-property name="indexedProps" value="service-type,vnf-type,data-owner,data-source,data-source-version"/> + <xml-property name="container" value="service-capabilities"/> + <xml-property name="namespace" value="service-design-and-creation"/> + <xml-property name="uriTemplate" value="/service-design-and-creation/service-capabilities/service-capability/{service-type}/{vnf-type}"/> + <xml-property name="requiredProps" value="service-type,vnf-type"/> + </xml-properties> + </java-type> + + <java-type name="Network"> + <xml-properties> + <xml-property name="description" value="Namespace for network inventory resources."/> + </xml-properties> + <xml-root-element name="network"/> + <java-attributes> + <xml-element java-attribute="logicalLinks" name="logical-links" type="inventory.aai.onap.org.v23.LogicalLinks"/> + <xml-element java-attribute="sitePairSets" name="site-pair-sets" type="inventory.aai.onap.org.v23.SitePairSets"/> + <xml-element java-attribute="vpnBindings" name="vpn-bindings" type="inventory.aai.onap.org.v23.VpnBindings"/> + <xml-element java-attribute="vplsPes" name="vpls-pes" type="inventory.aai.onap.org.v23.VplsPes"/> + <xml-element java-attribute="multicastConfigurations" name="multicast-configurations" type="inventory.aai.onap.org.v23.MulticastConfigurations"/> + <xml-element java-attribute="vces" name="vces" type="inventory.aai.onap.org.v23.Vces"/> + <xml-element java-attribute="vnfcs" name="vnfcs" type="inventory.aai.onap.org.v23.Vnfcs"/> + <xml-element java-attribute="l3Networks" name="l3-networks" type="inventory.aai.onap.org.v23.L3Networks"/> + <xml-element java-attribute="networkPolicies" name="network-policies" type="inventory.aai.onap.org.v23.NetworkPolicies"/> + <xml-element java-attribute="genericVnfs" name="generic-vnfs" type="inventory.aai.onap.org.v23.GenericVnfs"/> + <xml-element java-attribute="lagLinks" name="lag-links" type="inventory.aai.onap.org.v23.LagLinks"/> + <xml-element java-attribute="newvces" name="newvces" type="inventory.aai.onap.org.v23.Newvces"/> + <xml-element java-attribute="pnfs" name="pnfs" type="inventory.aai.onap.org.v23.Pnfs"/> + <xml-element java-attribute="chassies" name="chassies" type="inventory.aai.onap.org.v23.Chassies"/> + <xml-element java-attribute="physicalLinks" name="physical-links" type="inventory.aai.onap.org.v23.PhysicalLinks"/> + <xml-element java-attribute="ipsecConfigurations" name="ipsec-configurations" type="inventory.aai.onap.org.v23.IpsecConfigurations"/> + <xml-element java-attribute="routeTableReferences" name="route-table-references" type="inventory.aai.onap.org.v23.RouteTableReferences"/> + <xml-element java-attribute="instanceGroups" name="instance-groups" type="inventory.aai.onap.org.v23.InstanceGroups"/> + <xml-element java-attribute="zones" name="zones" type="inventory.aai.onap.org.v23.Zones"/> + <xml-element java-attribute="autonomousSystems" name="autonomous-systems" type="inventory.aai.onap.org.v23.AutonomousSystems"/> + <xml-element java-attribute="networkRanges" name="network-ranges" type="inventory.aai.onap.org.v23.NetworkRanges"/> + <xml-element java-attribute="mappings" name="mappings" type="inventory.aai.onap.org.v23.Mappings"/> + <xml-element java-attribute="hwComponents" name="hw-components" type="inventory.aai.onap.org.v23.HwComponents"/> + <xml-element java-attribute="swComponents" name="sw-components" type="inventory.aai.onap.org.v23.SwComponents"/> + <xml-element java-attribute="networkRoutes" name="network-routes" type="inventory.aai.onap.org.v23.NetworkRoutes"/> + <xml-element java-attribute="configurations" name="configurations" type="inventory.aai.onap.org.v23.Configurations"/> + <xml-element java-attribute="forwardingPaths" name="forwarding-paths" type="inventory.aai.onap.org.v23.ForwardingPaths"/> + <xml-element java-attribute="collections" name="collections" type="inventory.aai.onap.org.v23.Collections"/> + <xml-element java-attribute="nextHops" name="next-hops" type="inventory.aai.onap.org.v23.NextHops"/> + <xml-element java-attribute="bfds" name="bfds" type="inventory.aai.onap.org.v23.Bfds"/> + <xml-element java-attribute="fqdns" name="fqdns" type="inventory.aai.onap.org.v23.Fqdns"/> + </java-attributes> + </java-type> + <java-type name="Configurations"> + <xml-properties> + <xml-property name="description" value="Collection of configurations"/> + </xml-properties> + <xml-root-element name="configurations"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="configuration" name="configuration" type="inventory.aai.onap.org.v23.Configuration"/> + </java-attributes> + </java-type> + + <java-type name="Configuration"> + <xml-root-element name="configuration"/> + <java-attributes> + <xml-element java-attribute="configurationId" name="configuration-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID assigned to configuration."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementOption" name="management-option" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicates the entity that will manage this feature. Could be an organization or the name of the application as well."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="configurationName" name="configuration-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the configuration."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="configurationType" name="configuration-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="port-mirroring-configuration."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="configurationSubType" name="configuration-sub-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="vprobe, pprobe."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-version-id"/> + <xml-property name="dbAlias" value="model-invariant-id-local"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-invariant-id"/> + <xml-property name="dbAlias" value="model-version-id-local"/> + <xml-property name="privateEdge" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of the configuration."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for whether the resource is considered operational."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="configurationSelflink" name="configuration-selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details from SDN-GC."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelCustomizationId" name="model-customization-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="id of the configuration used to customize the resource"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="tunnelBandwidth" name="tunnel-bandwidth" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="DHV Site Effective Bandwidth"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vendorAllowedMaxBandwidth" name="vendor-allowed-max-bandwidth" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Velocloud Nominal Throughput - VNT"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="configPolicyName" name="config-policy-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to capture the name of the fabric configuration policy that was used to generate the payload sent to PINC for fabric configuration."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="configurationRole" name="configuration-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to categorize the configuration."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="configurationFunction" name="configuration-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to categorize the configuration."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="primaryRole" name="primary-role" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="Used by some configurations to identify if it's filling a primary role."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationVersion" name="orchestration-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to categorize the configuration."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="metadata" name="metadata" type="inventory.aai.onap.org.v23.Metadata"/> + <xml-element java-attribute="forwarderEvcs" name="forwarder-evcs" type="inventory.aai.onap.org.v23.ForwarderEvcs"/> + <xml-element java-attribute="evcs" name="evcs" type="inventory.aai.onap.org.v23.Evcs"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This object captures the generic configuration | A&AI clients for this object are typically: CVASS, DCAE-CCS, PINC, SDNC, SO.BPMN, (DMaaP-DCAE,...) |"/> + <xml-property name="indexedProps" value="configuration-id,configuration-name,configuration-type,model-invariant-id,model-version-id,orchestration-status,configuration-role,configuration-function,orchestration-version,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="configuration-id"/> + <xml-property name="container" value="configurations"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/configurations/configuration/{configuration-id}"/> + <xml-property name="requiredProps" value="configuration-id,configuration-type"/> + </xml-properties> + </java-type> + + <java-type name="LogicalLinks"> + <xml-properties> + <xml-property name="description" value="Collection of logical connections"/> + </xml-properties> + <xml-root-element name="logical-links"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="logicalLink" name="logical-link" type="inventory.aai.onap.org.v23.LogicalLink"/> + </java-attributes> + </java-type> + + <java-type name="LogicalLink"> + <xml-root-element name="logical-link"/> + <java-attributes> + <xml-element java-attribute="linkName" name="link-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="e.g., evc-name, or vnf-nameA_interface-nameA_vnf-nameZ_interface-nameZ"/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="linkType" name="link-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of logical link, e.g., evc"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the numeric part of the speed"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the units corresponding to the speed"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipVersion" name="ip-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v4, v6, or ds for dual stack (should be att-ip-version)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="routingProtocol" name="routing-protocol" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="For example, static or BGP"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-version-id"/> + <xml-property name="dbAlias" value="model-invariant-id-local"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-invariant-id"/> + <xml-property name="dbAlias" value="model-version-id-local"/> + <xml-property name="privateEdge" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indication of operational status of the logical link."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this VNF by BAU Service Assurance systems. Valid values can be found at (https://wiki.web.att.com/display/SPTIIRP/prov-status)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="linkRole" name="link-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indication of the network use of the logical link."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="linkName2" name="link-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alias or alternate name (CLCI or D1 name)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="linkId" name="link-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="UUID of the logical-link, SDNC generates this."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="circuitId" name="circuit-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Circuit id"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="purpose" name="purpose" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Reason for this entity, role it is playing"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="linkDescription" name="link-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="A description for the logical-link."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="segmentId" name="segment-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="A segment-id assigned to the logical-link (ex, esi for ethernet segments)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="linkFunction" name="link-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The function performed by this logical link"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Logical links generally connect l-interfaces but are used to express logical connectivity between two points"/> + <xml-property name="indexedProps" value="link-name,model-invariant-id,model-version-id,widget-model-id,widget-model-version,link-id,prov-status,circuit-id,link-function,link-type,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="link-id"/> + <xml-property name="container" value="logical-links"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/logical-links/logical-link/{link-name}"/> + <xml-property name="requiredProps" value="link-name,in-maint,link-type"/> + </xml-properties> + </java-type> + + <java-type name="SitePairSets"> + <xml-properties> + <xml-property name="description" value="Collection of sets of instances for probes related to generic-vnf"/> + </xml-properties> + <xml-root-element name="site-pair-sets"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="sitePairSet" name="site-pair-set" type="inventory.aai.onap.org.v23.SitePairSet"/> + </java-attributes> + </java-type> + + <java-type name="SitePairSet"> + <xml-root-element name="site-pair-set"/> + <java-attributes> + <xml-element java-attribute="sitePairSetId" name="site-pair-set-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of site pair set."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="routingInstances" name="routing-instances" type="inventory.aai.onap.org.v23.RoutingInstances"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Set of instances for probes used to measure service level agreements"/> + <xml-property name="indexedProps" value="site-pair-set-id,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="site-pair-set-id"/> + <xml-property name="container" value="site-pair-sets"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/site-pair-sets/site-pair-set/{site-pair-set-id}"/> + <xml-property name="requiredProps" value="site-pair-set-id"/> + </xml-properties> + </java-type> + + <java-type name="RoutingInstances"> + <xml-properties> + <xml-property name="description" value="set of probes related to generic-vnf routing instance"/> + </xml-properties> + <xml-root-element name="routing-instances"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="routingInstance" name="routing-instance" type="inventory.aai.onap.org.v23.RoutingInstance"/> + </java-attributes> + </java-type> + + <java-type name="RoutingInstance"> + <xml-root-element name="routing-instance"/> + <java-attributes> + <xml-element java-attribute="routingInstanceId" name="routing-instance-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of routing instance"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="rpmOwner" name="rpm-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="rpm owner"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="sitePairs" name="site-pairs" type="inventory.aai.onap.org.v23.SitePairs"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This object is a collection of routing tables, interfaces, and routing protocol parameters. | A&AI clients for this object are typically: SDNC, (DMaaP-DCAE,...) |"/> + <xml-property name="indexedProps" value="routing-instance-id,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="site-pair-set"/> + <xml-property name="container" value="routing-instances"/> + <xml-property name="uriTemplate" value="/routing-instances/routing-instance/{routing-instance-id}"/> + </xml-properties> + </java-type> + + <java-type name="SitePairs"> + <xml-properties> + <xml-property name="description" value="probe within a set"/> + </xml-properties> + <xml-root-element name="site-pairs"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="sitePair" name="site-pair" type="inventory.aai.onap.org.v23.SitePair"/> + </java-attributes> + </java-type> + + <java-type name="SitePair"> + <xml-root-element name="site-pair"/> + <java-attributes> + <xml-element java-attribute="sitePairId" name="site-pair-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="unique identifier of probe"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="sourceIp" name="source-ip" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Prefix address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="destinationIp" name="destination-ip" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Prefix address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipVersion" name="ip-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ip version, v4, v6"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="destinationHostname" name="destination-hostname" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Hostname of the destination equipment to which SLAs are measured against."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="destinationEquipType" name="destination-equip-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The type of destinatination equipment. Could be Router, UCPE, etc."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="classesOfService" name="classes-of-service" type="inventory.aai.onap.org.v23.ClassesOfService"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="site-pair-id,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="site-pair-id"/> + <xml-property name="dependentOn" value="routing-instance"/> + <xml-property name="container" value="site-pairs"/> + <xml-property name="uriTemplate" value="/site-pairs/site-pair/{site-pair-id}"/> + </xml-properties> + </java-type> + + <java-type name="ClassesOfService"> + <xml-properties> + <xml-property name="description" value="class-of-service of probe"/> + </xml-properties> + <xml-root-element name="classes-of-service"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="classOfService" name="class-of-service" type="inventory.aai.onap.org.v23.ClassOfService"/> + </java-attributes> + </java-type> + + <java-type name="ClassOfService"> + <xml-root-element name="class-of-service"/> + <java-attributes> + <xml-element java-attribute="cos" name="cos" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="unique identifier of probe"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="probeId" name="probe-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="identifier of probe"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="probeType" name="probe-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="type of probe"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This object captures data and voice protocols to differentiate the types of payloads contained in the packet being transmitted. | A&AI clients for this object are typically: (DMaaP-DCAE,...) |"/> + <xml-property name="indexedProps" value="cos,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="site-pair"/> + <xml-property name="container" value="classes-of-service"/> + <xml-property name="uriTemplate" value="/classes-of-service/class-of-service/{cos}"/> + </xml-properties> + </java-type> + + <java-type name="VpnBindings"> + <xml-root-element name="vpn-bindings"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vpnBinding" name="vpn-binding" type="inventory.aai.onap.org.v23.VpnBinding"/> + </java-attributes> + </java-type> + + <java-type name="VpnBinding"> + <xml-root-element name="vpn-binding"/> + <java-attributes> + <xml-element java-attribute="vpnId" name="vpn-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="VPN ID, globally unique within A&AI"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpnName" name="vpn-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="VPN Name"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpnPlatform" name="vpn-platform" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the platform associated with the VPN example AVPN, Mobility"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpnType" name="vpn-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of the vpn, should be taken from enumerated/valid values"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpnRegion" name="vpn-region" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="region of customer vpn"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="customerVpnId" name="customer-vpn-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="id for this customer vpn"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="routeDistinguisher" name="route-distinguisher" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to distinguish the distinct VPN routes of separate customers who connect to the provider in an MPLS network."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="maxPrefixV4" name="max-prefix-v4" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Max prefix for IPv4."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="maxPrefixV6" name="max-prefix-v6" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Max prefix for IPv6."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="maxPrefixThreshold" name="max-prefix-threshold" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Max prefix threshold."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="labelModeV4" name="label-mode-v4" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Label mode for IPv4."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="labelModeV6" name="label-mode-v6" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Label mode for IPv6."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpnDescription" name="vpn-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The description of the vpn."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vxlanNetworkId" name="vxlan-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="A VNI associated with the VPN."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="opsNote" name="ops-note" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Notes to aid OPs in troubleshooting, such as attribute aliases or additional descriptions/instructions about an object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="maxPath" name="max-path" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="A variable BGP max AS path length."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="maxPathsV4" name="max-paths-v4" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="stores maximum number of paths for IPv4."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="maxPathsV6" name="max-paths-v6" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="stores maximum number of paths for IPv6."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="routeTargets" name="route-targets" type="inventory.aai.onap.org.v23.RouteTargets"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"> + <xml-properties> + <xml-property name="description" value="l3-networks relate to vpn-bindings"/> + </xml-properties> + </xml-element> + </java-attributes> + <xml-properties> + <xml-property name="description" value="VPN binding"/> + <xml-property name="nameProps" value="vpn-name,vpn-type"/> + <xml-property name="indexedProps" value="vpn-name,vpn-id,vpn-type,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="vpn-id"/> + <xml-property name="container" value="vpn-bindings"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/vpn-bindings/vpn-binding/{vpn-id}"/> + <xml-property name="requiredProps" value="vpn-id,vpn-name"/> + </xml-properties> + </java-type> + + <java-type name="VplsPes"> + <xml-properties> + <xml-property name="description" value="Collection of VPLS Provider Edge routers"/> + </xml-properties> + <xml-root-element name="vpls-pes"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vplsPe" name="vpls-pe" type="inventory.aai.onap.org.v23.VplsPe"/> + </java-attributes> + </java-type> + + <java-type name="VplsPe"> + <xml-root-element name="vpls-pe"/> + <java-attributes> + <xml-element java-attribute="equipmentName" name="equipment-name" required="true" type="java.lang.String" xml-key="true"/> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this VNF by BAU Service Assurance systems. Valid values can be found at (https://wiki.web.att.com/display/SPTIIRP/prov-status)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Address tail-f uses to configure generic-vnf, also used for troubleshooting and is IP used for traps generated by GenericVnf (v4-loopback0-ip-address)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentRole" name="equipment-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Client should send valid enumerated value, e.g., VPLS-PE."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Temporary location for stag to get to VCE"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="pInterfaces" name="p-interfaces" type="inventory.aai.onap.org.v23.PInterfaces"/> + <xml-element java-attribute="lagInterfaces" name="lag-interfaces" type="inventory.aai.onap.org.v23.LagInterfaces"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="VPLS Provider Edge routers."/> + <xml-property name="indexedProps" value="prov-status,equipment-name,data-owner,data-source,data-source-version"/> + <xml-property name="container" value="vpls-pes"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/vpls-pes/vpls-pe/{equipment-name}"/> + <xml-property name="requiredProps" value="equipment-name"/> + </xml-properties> + </java-type> + + <java-type name="MulticastConfigurations"> + <xml-properties> + <xml-property name="description" value="multicast configuration of generic-vnf ip-address"/> + </xml-properties> + <xml-root-element name="multicast-configurations"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="multicastConfiguration" name="multicast-configuration" type="inventory.aai.onap.org.v23.MulticastConfiguration"/> + </java-attributes> + </java-type> + + <java-type name="MulticastConfiguration"> + <xml-root-element name="multicast-configuration"/> + <java-attributes> + <xml-element java-attribute="multicastConfigurationId" name="multicast-configuration-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of multicast configuration."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="multicastProtocol" name="multicast-protocol" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="protocol of multicast configuration"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="rpType" name="rp-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="rp type of multicast configuration"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This object groups different VLANs that are on different logical interfaces on the same VNF. Multicast is the delivery of information to a group of destinations simultaneously, using the most efficient strategy to deliver messages over each link of the network only once, and create copies only when the links to the destinations split. | A&AI clients for this object are typically: SDNC, (DMaaP-DCAE,...) |"/> + <xml-property name="indexedProps" value="multicast-configuration-id,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="multicast-configuration-id"/> + <xml-property name="container" value="multicast-configurations"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/multicast-configurations/multicast-configuration/{multicast-configuration-id}"/> + </xml-properties> + </java-type> + + <java-type name="Vces"> + <xml-properties> + <xml-property name="description" value="Collection of Virtual Customer Edge Routers, used specifically for Gamma. This object is deprecated."/> + </xml-properties> + <xml-root-element name="vces"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vce" name="vce" type="inventory.aai.onap.org.v23.Vce"/> + </java-attributes> + </java-type> + + <java-type name="Vce"> + <xml-root-element name="vce"/> + <java-attributes> + <xml-element java-attribute="vnfId" name="vnf-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of VNF. This is unique across the graph."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName" name="vnf-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of VNF."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName2" name="vnf-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternate name of VNF."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded in service-specific ways and clients should expect changes to occur in the future to this field as ECOMP matures."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceId" name="service-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique identifier of service, does not strictly map to ASDC services, SOON TO BE DEPRECATED."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="regionalResourceZone" name="regional-resource-zone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Regional way of organizing pservers, source of truth should define values"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems. Valid values can be found at (https://wiki.web.att.com/display/SPTIIRP/prov-status)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for whether the resource is considered operational"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKey" name="license-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="OBSOLETE - do not use"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentRole" name="equipment-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Network role being played by this VNF"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpeId" name="vpe-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique ID of VPE connected to this VCE."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="v6VceWanAddress" name="v6-vce-wan-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Valid v6 IP address for the WAN Link on this router. Implied length of /64."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Address tail-f uses to configure vce, also used for troubleshooting and is IP used for traps generated by VCE."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4Loopback0Address" name="ipv4-loopback0-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Loopback0 address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="entitlementResourceUuid" name="entitlement-resource-uuid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="OBSOLETE - see child relationships"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="portGroups" name="port-groups" type="inventory.aai.onap.org.v23.PortGroups"/> + <xml-element java-attribute="licenses" name="licenses" type="inventory.aai.onap.org.v23.Licenses"/> + <xml-element java-attribute="entitlements" name="entitlements" type="inventory.aai.onap.org.v23.Entitlements"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Virtual Customer Edge Router, used specifically for Gamma. This object is deprecated."/> + <xml-property name="nameProps" value="vnf-name"/> + <xml-property name="indexedProps" value="vnf-name,vnf-name2,vnf-type,heat-stack-id,vnf-id,regional-resource-zone,vpe-id,prov-status,service-id,orchestration-status,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="vnf-id"/> + <xml-property name="container" value="vces"/> + <xml-property name="namespace" value="network"/> + <xml-property name="extends" value="vnf"/> + <xml-property name="uriTemplate" value="/network/vces/vce/{vnf-id}"/> + <xml-property name="requiredProps" value="vnf-id,vnf-name,vnf-type"/> + </xml-properties> + </java-type> + + <java-type name="PortGroups"> + <xml-root-element name="port-groups"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="portGroup" name="port-group" type="inventory.aai.onap.org.v23.PortGroup"/> + </java-attributes> + </java-type> + + <java-type name="PortGroup"> + <xml-root-element name="port-group"/> + <java-attributes> + <xml-element java-attribute="interfaceId" name="interface-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of the interface"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of this Interface"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkName" name="neutron-network-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network name of this Interface"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceRole" name="interface-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role assigned to this Interface, should use values as defined in ECOMP Yang models."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="portGroupId" name="port-group-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique ID for port group in vmware"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="portGroupName" name="port-group-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Likely to duplicate value of neutron network name"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="switchName" name="switch-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="DVS or standard switch name (should be non-null for port groups associated with DVS)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="cvlanTags" name="cvlan-tags" type="inventory.aai.onap.org.v23.CvlanTags"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Used to capture the network interfaces of this VCE"/> + <xml-property name="nameProps" value="port-group-name"/> + <xml-property name="indexedProps" value="port-group-id,heat-stack-id,interface-id,switch-name,interface-role,orchestration-status,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="vce"/> + <xml-property name="container" value="port-groups"/> + <xml-property name="uriTemplate" value="/port-groups/port-group/{interface-id}"/> + <xml-property name="requiredProps" value="interface-id,orchestration-status"/> + </xml-properties> + </java-type> + + <java-type name="CvlanTags"> + <xml-root-element name="cvlan-tags"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="cvlanTagEntry" name="cvlan-tag-entry" type="inventory.aai.onap.org.v23.CvlanTagEntry"/> + </java-attributes> + </java-type> + + <java-type name="CvlanTagEntry"> + <xml-root-element name="cvlan-tag-entry"/> + <java-attributes> + <xml-element java-attribute="cvlanTag" name="cvlan-tag" required="true" type="java.lang.Long" xml-key="true"> + <xml-properties> + <xml-property name="description" value="See mis-na-virtualization-platform.yang"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="dependentOn" value="port-group"/> + <xml-property name="indexedProps" value="cvlan-tag,data-owner,data-source,data-source-version"/> + <xml-property name="container" value="cvlan-tags"/> + <xml-property name="uriTemplate" value="/cvlan-tags/cvlan-tag/{cvlan-tag}"/> + </xml-properties> + </java-type> + + + <java-type name="Vnfcs"> + <xml-properties> + <xml-property name="description" value="virtual network components associated with a vserver from application controller."/> + </xml-properties> + <xml-root-element name="vnfcs"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vnfc" name="vnfc" type="inventory.aai.onap.org.v23.Vnfc"/> + </java-attributes> + </java-type> + + <java-type name="Vnfc"> + <xml-root-element name="vnfc"/> + <java-attributes> + <xml-element java-attribute="vnfcName" name="vnfc-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of vnfc."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nfcNamingCode" name="nfc-naming-code" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Short code that is used in naming instances of the item being modeled"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nfcFunction" name="nfc-function" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="English description of function that the specific resource deployment is providing. Assigned as part of the customization of a resource in a service"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="prov status of this vnfc. Valid values can be found at (https://wiki.web.att.com/display/SPTIIRP/prov-status)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by APP-C"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV4OamVip" name="ipaddress-v4-oam-vip" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Oam V4 vip address of this vnfc"/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true)"/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="isClosedLoopDisabled" name="is-closed-loop-disabled" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="used to indicate whether closed loop function is enabled on this node"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="groupNotation" name="group-notation" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Group notation of VNFC"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-version-id"/> + <xml-property name="dbAlias" value="model-invariant-id-local"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-invariant-id"/> + <xml-property name="dbAlias" value="model-version-id-local"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelCustomizationId" name="model-customization-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="captures the id of all the configuration used to customize the resource for the service."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="cps" name="cps" type="inventory.aai.onap.org.v23.Cps"/> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv4AddressList" name="l3-interface-ipv4-address-list" type="inventory.aai.onap.org.v23.L3InterfaceIpv4AddressList"/> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv6AddressList" name="l3-interface-ipv6-address-list" type="inventory.aai.onap.org.v23.L3InterfaceIpv6AddressList"/> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="vnfc-name,prov-status,nfc-function,nfc-naming-code,ipaddress-v4-oam-vip,is-closed-loop-disabled,group-notation,model-invariant-id,model-version-id,orchestration-status,data-owner,data-source,data-source-version"/> + <xml-property name="container" value="vnfcs"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/vnfcs/vnfc/{vnfc-name}"/> + </xml-properties> + </java-type> + + <java-type name="L3Networks"> + <xml-root-element name="l3-networks"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="l3Network" name="l3-network" type="inventory.aai.onap.org.v23.L3Network"/> + </java-attributes> + </java-type> + + <java-type name="L3Network"> + <xml-root-element name="l3-network"/> + <java-attributes> + <xml-element java-attribute="networkId" name="network-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Network ID, should be uuid. Unique across A&AI."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkName" name="network-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the network, governed by some naming convention.."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkType" name="network-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of the network - who defines these values?"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkRole" name="network-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role the network plans - who defines these values?"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkTechnology" name="network-technology" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Network technology - who defines these values?"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="description" name="description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="text used for documentation"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of this Interface"/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="isBoundToVpn" name="is-bound-to-vpn" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Set to true if bound to VPN"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceId" name="service-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique identifier of service from ASDC. Does not strictly map to ASDC services. SOON TO BE DEPRECATED"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkRoleInstance" name="network-role-instance" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="network role instance"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="contrailNetworkFqdn" name="contrail-network-fqdn" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Contrail FQDN for the network"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-version-id"/> + <xml-property name="dbAlias" value="model-invariant-id-local"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-invariant-id"/> + <xml-property name="dbAlias" value="model-version-id-local"/> + <xml-property name="privateEdge" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model."/> + <xml-property name="visibility" value="internal"/> + <xml-property name="dataCopy" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}#model-version"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelCustomizationId" name="model-customization-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="captures the id of all the configuration used to customize the resource for the service."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="physicalNetworkName" name="physical-network-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name associated with the physical network."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="isProviderNetwork" name="is-provider-network" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="boolean indicatating whether or not network is a provider network."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="isSharedNetwork" name="is-shared-network" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="boolean indicatating whether or not network is a shared network."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="isExternalNetwork" name="is-external-network" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="boolean indicatating whether or not network is an external network."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Path to the controller object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for whether the resource is considered operational."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="isTrunked" name="is-trunked" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="Trunked network indication."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="opsNote" name="ops-note" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Notes to aid OPs in troubleshooting, such as attribute aliases or additional descriptions/instructions about an object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkFunction" name="network-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The function performed by this l3 network"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="subnets" name="subnets" type="inventory.aai.onap.org.v23.Subnets"/> + <xml-element java-attribute="ctagAssignments" name="ctag-assignments" type="inventory.aai.onap.org.v23.CtagAssignments"/> + <xml-element java-attribute="segmentationAssignments" name="segmentation-assignments" type="inventory.aai.onap.org.v23.SegmentationAssignments"/> + <xml-element java-attribute="aggregateRoutes" name="aggregate-routes" type="inventory.aai.onap.org.v23.AggregateRoutes"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"> + <xml-properties> + <xml-property name="description" value="Relates to tenant (or is it a child of tenant), complex, service, vpn-binding"/> + </xml-properties> + </xml-element> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Generic network definition"/> + <xml-property name="nameProps" value="network-name"/> + <xml-property name="indexedProps" value="heat-stack-id,service-id,network-id,network-name,model-invariant-id,model-version-id,widget-model-id,widget-model-version,contrail-network-fqdn,network-role,network-function,orchestration-status,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="network-id"/> + <xml-property name="container" value="l3-networks"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/l3-networks/l3-network/{network-id}"/> + <xml-property name="requiredProps" value="network-id,is-bound-to-vpn,is-provider-network,is-shared-network,is-external-network"/> + </xml-properties> + </java-type> + <java-type name="NetworkPolicies"> + <xml-root-element name="network-policies"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="networkPolicy" name="network-policy" type="inventory.aai.onap.org.v23.NetworkPolicy"/> + </java-attributes> + </java-type> + <java-type name="NetworkPolicy"> + <xml-root-element name="network-policy"/> + <java-attributes> + <xml-element java-attribute="networkPolicyId" name="network-policy-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID representing unique key to this instance"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkPolicyFqdn" name="network-policy-fqdn" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Contrail FQDN for the policy"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ID for the openStack Heat instance"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This object captures the set of conditions, constraints, and settings that allow you to designate who is authorized to connect to the network and the circumstances under which they can or cannot connect. Provides Contrail FQDN for policy. | A&AI clients for this object are typically: SDNC, AAI-tools, (DMaaP-DCAE,...) |"/> + <xml-property name="nameProps" value="network-policy-fqdn"/> + <xml-property name="indexedProps" value="network-policy-id,network-policy-fqdn,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="network-policy-id"/> + <xml-property name="container" value="network-policies"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/network-policies/network-policy/{network-policy-id}"/> + </xml-properties> + </java-type> + <java-type name="CtagAssignments"> + <xml-root-element name="ctag-assignments"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="ctagAssignment" name="ctag-assignment" type="inventory.aai.onap.org.v23.CtagAssignment"/> + </java-attributes> + </java-type> + + <java-type name="CtagAssignment"> + <xml-root-element name="ctag-assignment"/> + <java-attributes> + <xml-element java-attribute="vlanIdInner" name="vlan-id-inner" required="true" type="java.lang.Long" xml-key="true"> + <xml-properties> + <xml-property name="description" value="id."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="vlan-id-inner,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="l3-network"/> + <xml-property name="container" value="ctag-assignments"/> + <xml-property name="uriTemplate" value="/ctag-assignments/ctag-assignment/{vlan-id-inner}"/> + </xml-properties> + </java-type> + + <java-type name="Subnets"> + <xml-root-element name="subnets"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="subnet" name="subnet" type="inventory.aai.onap.org.v23.Subnet"/> + </java-attributes> + </java-type> + + <java-type name="Subnet"> + <xml-root-element name="subnet"/> + <java-attributes> + <xml-element java-attribute="subnetId" name="subnet-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Subnet ID, should be UUID."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="subnetName" name="subnet-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name associated with the subnet."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronSubnetId" name="neutron-subnet-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron id of this subnet"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="gatewayAddress" name="gateway-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="gateway ip address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkStartAddress" name="network-start-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="network start address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="cidrMask" name="cidr-mask" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="cidr mask"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipVersion" name="ip-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ip version"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="description" name="description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="text used for documentation"/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="dhcpEnabled" name="dhcp-enabled" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="dhcp enabled"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dhcpStart" name="dhcp-start" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the start address reserved for use by dhcp"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dhcpEnd" name="dhcp-end" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the last address reserved for use by dhcp"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="subnetRole" name="subnet-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="role of the subnet, referenced when assigning IPs"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="subnetModel" name="subnet-model" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="subnet model BGP, VRPP"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="opsNote" name="ops-note" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Notes to aid OPs in troubleshooting, such as attribute aliases or additional descriptions/instructions about an object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="subnetType" name="subnet-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Subtype used to categorize this physical link"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="subnetFunction" name="subnet-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The function performed by this Linterface"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipAssignmentDirection" name="ip-assignment-direction" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ip address assignment direction of the subnet"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="subnetSequence" name="subnet-sequence" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="sequence of the subnet"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="hostRoutes" name="host-routes" type="inventory.aai.onap.org.v23.HostRoutes"/> + <xml-element container-type="java.util.ArrayList" java-attribute="ipAddressList" name="ip-address-list" type="inventory.aai.onap.org.v23.IpAddressList"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="bgpNeighbors" name="bgp-neighbors" type="inventory.aai.onap.org.v23.BgpNeighbors"/> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="subnet-id,subnet-name,subnet-type,subnet-function,orchestration-status,data-owner,data-source,data-source-version"/> + <xml-property name="nameProps" value="subnet-name"/> + <xml-property name="uniqueProps" value="subnet-id"/> + <xml-property name="dependentOn" value="l3-network,zone"/> + <xml-property name="container" value="subnets"/> + <xml-property name="uriTemplate" value="/subnets/subnet/{subnet-id}"/> + <xml-property name="requiredProps" value="subnet-id"/> + </xml-properties> + </java-type> + + <java-type name="GenericVnfs"> + <xml-properties> + <xml-property name="description" value="Collection of VNFs"/> + </xml-properties> + <xml-root-element name="generic-vnfs"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="genericVnf" name="generic-vnf" type="inventory.aai.onap.org.v23.GenericVnf"/> + </java-attributes> + <xml-properties> + <xml-property name="maximumDepth" value="0"/> + </xml-properties> + </java-type> + + <java-type name="GenericVnf"> + <xml-root-element name="generic-vnf"/> + <java-attributes> + <xml-element java-attribute="vnfId" name="vnf-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of VNF. This is unique across the graph."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName" name="vnf-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of VNF."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName2" name="vnf-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternate name of VNF."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded in service-specific ways and clients should expect changes to occur in the future to this field as ECOMP matures."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceId" name="service-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique identifier of service, does not necessarily map to ASDC service models. SOON TO BE DEPRECATED"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="regionalResourceZone" name="regional-resource-zone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Regional way of organizing pservers, source of truth should define values"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems. Valid values can be found at (https://wiki.web.att.com/display/SPTIIRP/prov-status)."/> + <xml-property name="suggestibleOnSearch" value="true"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for whether the resource is considered operational. Valid values are in-service-path and out-of-service-path."/> + <xml-property name="suggestibleOnSearch" value="true"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKey" name="license-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="OBSOLETE - do not use"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentRole" name="equipment-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Client should send valid enumerated value"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, used by MSO."/> + <xml-property name="suggestibleOnSearch" value="true"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementOption" name="management-option" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="identifier of managed by ATT or customer"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Address tail-f uses to configure generic-vnf, also used for troubleshooting and is IP used for traps generated by generic-vnf."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4Loopback0Address" name="ipv4-loopback0-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v4 Loopback0 address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nmLanV6Address" name="nm-lan-v6-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v6 Loopback address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementV6Address" name="management-v6-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v6 management address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vcpu" name="vcpu" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="number of vcpus ordered for this instance of VNF, used for VNFs with no vservers/flavors, to be used only by uCPE"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vcpuUnits" name="vcpu-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="units associated with vcpu, used for VNFs with no vservers/flavors, to be used only by uCPE"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vmemory" name="vmemory" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="number of GB of memory ordered for this instance of VNF, used for VNFs with no vservers/flavors, to be used only by uCPE"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vmemoryUnits" name="vmemory-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="units associated with vmemory, used for VNFs with no vservers/flavors, to be used only by uCPE"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vdisk" name="vdisk" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="number of vdisks ordered for this instance of VNF, used for VNFs with no vservers/flavors, to be used only uCPE"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vdiskUnits" name="vdisk-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="units associated with vdisk, used for VNFs with no vservers/flavors, to be used only by uCPE"/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs."/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="isClosedLoopDisabled" name="is-closed-loop-disabled" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="used to indicate whether closed loop function is enabled on this node"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="summaryStatus" name="summary-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="details regarding the generic-vnf operation, PLEASE DISCONTINUE USE OF THIS FIELD."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="encryptedAccessFlag" name="encrypted-access-flag" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="indicates whether generic-vnf access uses SSH"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="entitlementAssignmentGroupUuid" name="entitlement-assignment-group-uuid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="UUID of the Entitlement group used for licensing VNFs, OBSOLETE - See child relationships."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="entitlementResourceUuid" name="entitlement-resource-uuid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="UUID of the specific entitlement resource. OBSOLETE - See child relationships."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseAssignmentGroupUuid" name="license-assignment-group-uuid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="UUID of the license assignment group. OBSOLETE - See child relationships."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKeyUuid" name="license-key-uuid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="UUID of the actual license resource. OBSOLETE - See child relationships."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-version-id"/> + <xml-property name="dbAlias" value="model-invariant-id-local"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-invariant-id"/> + <xml-property name="dbAlias" value="model-version-id-local"/> + <xml-property name="privateEdge" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model."/> + <xml-property name="visibility" value="internal"/> + <xml-property name="dataCopy" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}#model-version"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelCustomizationId" name="model-customization-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="captures the id of all the configuration used to customize the resource for the service."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="asNumber" name="as-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="as-number of the VNF"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="regionalResourceSubzone" name="regional-resource-subzone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="represents sub zone of the rr plane"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nfType" name="nf-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Generic description of the type of NF"/> + <xml-property name="suggestibleOnSearch" value="true"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nfFunction" name="nf-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="English description of Network function that the specific VNF deployment is providing"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nfRole" name="nf-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="role in the network that this model will be providing"/> + <xml-property name="suggestibleOnSearch" value="true"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nfNamingCode" name="nf-naming-code" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="string assigned to this model used for naming purposes"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Path to the controller object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamGatewayAddress" name="ipv4-oam-gateway-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Gateway address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamGatewayAddressPrefixLength" name="ipv4-oam-gateway-address-prefix-length" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Prefix length for oam-address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Temporary location for S-TAG to get to VCE"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nmProfileName" name="nm-profile-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Network Management profile of this VNF"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="softwareVersion" name="software-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="VNF instance specific software version"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationId" name="application-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="vnf application-id"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v23.LInterfaces"/> + <xml-element java-attribute="lagInterfaces" name="lag-interfaces" type="inventory.aai.onap.org.v23.LagInterfaces"/> + <xml-element java-attribute="vfModules" name="vf-modules" type="inventory.aai.onap.org.v23.VfModules"/> + <xml-element java-attribute="licenses" name="licenses" type="inventory.aai.onap.org.v23.Licenses"/> + <xml-element java-attribute="bgpGroups" name="bgp-groups" type="inventory.aai.onap.org.v23.BgpGroups"/> + <xml-element java-attribute="bgpNeighbors" name="bgp-neighbors" type="inventory.aai.onap.org.v23.BgpNeighbors"/> + <xml-element java-attribute="entitlements" name="entitlements" type="inventory.aai.onap.org.v23.Entitlements"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="General purpose VNF"/> + <xml-property name="nameProps" value="vnf-name"/> + <xml-property name="indexedProps" value="is-closed-loop-disabled,vnf-name2,vnf-type,heat-stack-id,vnf-name,vnf-id,regional-resource-zone,prov-status,service-id,model-invariant-id,model-version-id,widget-model-id,widget-model-version,nf-type,nf-function,nf-naming-code,nf-role,nm-profile-name,orchestration-status,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="vnf-id"/> + <xml-property name="container" value="generic-vnfs"/> + <xml-property name="namespace" value="network"/> + <xml-property name="extends" value="vnf"/> + <xml-property name="containsSuggestibleProps" value="true"/> + <xml-property name="suggestionAliases" value="VNFs"/> + <xml-property name="uriTemplate" value="/network/generic-vnfs/generic-vnf/{vnf-id}"/> + <xml-property name="requiredProps" value="vnf-id,vnf-type,in-maint,is-closed-loop-disabled"/> + </xml-properties> + </java-type> + + <java-type name="VfModules"> + <xml-properties> + <xml-property name="description" value="Collection of vf-modules, a deployment unit of VNFCs"/> + </xml-properties> + <xml-root-element name="vf-modules"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vfModule" name="vf-module" type="inventory.aai.onap.org.v23.VfModule"/> + </java-attributes> + </java-type> + + <java-type name="VfModule"> + <xml-root-element name="vf-module"/> + <java-attributes> + <xml-element java-attribute="vfModuleId" name="vf-module-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of vf-module."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfModuleName" name="vf-module-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of vf-module"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="orchestration status of this vf-module, mastered by MSO"/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="isBaseVfModule" name="is-base-vf-module" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="used to indicate whether or not this object is base vf module"/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="automatedAssignment" name="automated-assignment" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Indicates whether vf-module assignment was done via automation or manually"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-version-id"/> + <xml-property name="dbAlias" value="model-invariant-id-local"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-invariant-id"/> + <xml-property name="dbAlias" value="model-version-id-local"/> + <xml-property name="privateEdge" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model."/> + <xml-property name="visibility" value="internal"/> + <xml-property name="dataCopy" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}#model-version"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelCustomizationId" name="model-customization-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="captures the id of all the configuration used to customize the resource for the service."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="contrailServiceInstanceFqdn" name="contrail-service-instance-fqdn" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the Contrail unique ID for a service-instance"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="moduleIndex" name="module-index" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="the index will track the number of modules of a given type that have been deployed in a VNF, starting with 0, and always choosing the lowest available digit"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Path to the controller object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="a deployment unit of VNFCs"/> + <xml-property name="indexedProps" value="vf-module-id,vf-module-name,heat-stack-id,model-invariant-id,model-version-id,widget-model-id,widget-model-version,contrail-service-instance-fqdn,orchestration-status,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="generic-vnf"/> + <xml-property name="container" value="vf-modules"/> + <xml-property name="uriTemplate" value="/vf-modules/vf-module/{vf-module-id}"/> + <xml-property name="requiredProps" value="vf-module-id,is-base-vf-module,automated-assignment"/> + </xml-properties> + </java-type> + + + <java-type name="LagLinks"> + <xml-properties> + <xml-property name="description" value="Collection of link aggregation connections"/> + </xml-properties> + <xml-root-element name="lag-links"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="lagLink" name="lag-link" type="inventory.aai.onap.org.v23.LagLink"/> + </java-attributes> + </java-type> + + <java-type name="LagLink"> + <xml-root-element name="lag-link"/> + <java-attributes> + <xml-element java-attribute="linkName" name="link-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Alphabetical concatenation of lag-interface names"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="LAG links can connect lag-interfaces"/> + <xml-property name="indexedProps" value="link-name,data-owner,data-source,data-source-version"/> + <xml-property name="container" value="lag-links"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/lag-links/lag-link/{link-name}"/> + <xml-property name="requiredProps" value="link-name"/> + </xml-properties> + </java-type> + + <java-type name="Newvces"> + <xml-properties> + <xml-property name="description" value="This object fills in the gaps from vce that were incorporated into generic-vnf. This object will be retired with vce."/> + </xml-properties> + <xml-root-element name="newvces"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="newvce" name="newvce" type="inventory.aai.onap.org.v23.Newvce"/> + </java-attributes> + </java-type> + + <java-type name="Newvce"> + <xml-root-element name="newvce"/> + <java-attributes> + <xml-element java-attribute="vnfId2" name="vnf-id2" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of VNF, can't use same attribute name right now until we promote this new object"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName" name="vnf-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of VNF."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName2" name="vnf-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternate name of VNF."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded in service-specific ways and clients should expect changes to occur in the future to this field as ECOMP matures."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this VNF by BAU Service Assurance systems. Valid values can be found at (https://wiki.web.att.com/display/SPTIIRP/prov-status)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for whether the resource is considered operational"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKey" name="license-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="OBSOLETE - do not use"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Address tail-f uses to configure generic-vnf, also used for troubleshooting and is IP used for traps generated by GenericVnf (v4-loopback0-ip-address)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentRole" name="equipment-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Client should send valid enumerated value."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4Loopback0Address" name="ipv4-loopback0-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v4 Loopback0 address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v23.LInterfaces"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="This object fills in the gaps from vce that were incorporated into generic-vnf. This object will be retired with vce."/> + <xml-property name="nameProps" value="vnf-name"/> + <xml-property name="indexedProps" value="vnf-name,vnf-name2,vnf-type,heat-stack-id,prov-status,vnf-id2,orchestration-status,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="vnf-id2"/> + <xml-property name="container" value="newvces"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/newvces/newvce/{vnf-id2}"/> + <xml-property name="requiredProps" value="vnf-id2,vnf-name,vnf-type"/> + </xml-properties> + </java-type> + + <java-type name="Pnfs"> + <xml-properties> + <xml-property name="description" value="Collection of Physical Network Functions."/> + </xml-properties> + <xml-root-element name="pnfs"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="pnf" name="pnf" type="inventory.aai.onap.org.v23.Pnf"/> + </java-attributes> + <xml-properties> + <xml-property name="maximumDepth" value="0"/> + </xml-properties> + </java-type> + + <java-type name="Pnf"> + <xml-root-element name="pnf"/> + <java-attributes> + <xml-element java-attribute="pnfName" name="pnf-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="unique name of Physical Network Function."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="pnfName2" name="pnf-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="name of Physical Network Function."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="pnfName2Source" name="pnf-name2-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="source of name2"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="pnfId" name="pnf-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="id of pnf"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nfNamingCode" name="nf-naming-code" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Naming code for network function"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkOperatingSystem" name="network-operating-system" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Network operating system used on the device."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nfFunction" name="nf-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The function performed by the pnf."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipType" name="equip-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment type. Source of truth should define valid values."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipVendor" name="equip-vendor" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment vendor. Source of truth should define valid values."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipModel" name="equip-model" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment model. Source of truth should define valid values."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementOption" name="management-option" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="identifier of managed by ATT or customer"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this pnf"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV4Oam" name="ipaddress-v4-oam" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ipv4-oam-address with new naming convention for IP addresses"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="swVersion" name="sw-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="sw-version is the version of SW for the hosted application on the PNF."/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="frameId" name="frame-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ID of the physical frame (relay rack) where pnf is installed."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serialNumber" name="serial-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Serial number of the device"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV4Loopback0" name="ipaddress-v4-loopback-0" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV4 Loopback 0 address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV6Loopback0" name="ipaddress-v6-loopback-0" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV6 Loopback 0 address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV4Aim" name="ipaddress-v4-aim" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV4 AIM address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV6Aim" name="ipaddress-v6-aim" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV6 AIM address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV6Oam" name="ipaddress-v6-oam" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV6 OAM address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="invStatus" name="inv-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="CANOPI's inventory status. Only set with values exactly as defined by CANOPI."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="spareEquipmentIndicator" name="spare-equipment-indicator" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Flag for identifying spare equipment"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Prov Status of this device (not under canopi control). Valid values can be found at (https://wiki.web.att.com/display/SPTIIRP/prov-status)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nfRole" name="nf-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Nf Role is the role performed by this instance in the network."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The ASDC model id for this resource model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-version-id"/> + <xml-property name="dbAlias" value="model-invariant-id-local"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The ASDC model version for this resource model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-invariant-id"/> + <xml-property name="dbAlias" value="model-version-id-local"/> + <xml-property name="privateEdge" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="opsNote" name="ops-note" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Notes to aid OPs in troubleshooting, such as attribute aliases or additional descriptions/instructions about an object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="configValidationRequestId" name="config-validation-request-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Contains the value of the request id to the most recent configuration file/validation report for this PNF."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="configValidationStatus" name="config-validation-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Status of latest configuration attempt represented by the config-url."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nfType" name="nf-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Subtype used to categorize this pnf"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="commonBaseIndicator" name="common-base-indicator" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicates the PNF/R-Leaf was built with the VNF agnostic common base"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentClli" name="equipment-clli" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="11-character equipment CLLI."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="phoneNumber" name="phone-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the POTS phone number used to connect to a pnf out-of-band via dial-up."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="pInterfaces" name="p-interfaces" type="inventory.aai.onap.org.v23.PInterfaces"/> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v23.LInterfaces"/> + <xml-element java-attribute="lagInterfaces" name="lag-interfaces" type="inventory.aai.onap.org.v23.LagInterfaces"/> + <xml-element java-attribute="activities" name="activities" type="inventory.aai.onap.org.v23.Activities"/> + <xml-element java-attribute="vrfs" name="vrfs" type="inventory.aai.onap.org.v23.Vrfs"/> + <xml-element java-attribute="bgpGroups" name="bgp-groups" type="inventory.aai.onap.org.v23.BgpGroups"/> + <xml-element java-attribute="bgpNeighbors" name="bgp-neighbors" type="inventory.aai.onap.org.v23.BgpNeighbors"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="PNF represents a physical network function. typically equipment used in the D1 world. in 1607, this will be populated by SDN-C to represent a premises router that a uCPE connects to. But this can be used to represent any physical device that is not an AIC node or uCPE."/> + <xml-property name="indexedProps" value="pnf-name,orchestration-status,inv-status,model-invariant-id,model-version-id,nf-type,nf-role,prov-status,nf-naming-code,equipment-clli,phone-number,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="pnf-name"/> + <xml-property name="container" value="pnfs"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/pnfs/pnf/{pnf-name}"/> + <xml-property name="requiredProps" value="pnf-name,in-maint"/> + </xml-properties> + </java-type> + + <java-type name="Chassies"> + <xml-root-element name="chassies"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="chassis" name="chassis" type="inventory.aai.onap.org.v23.Chassis"/> + </java-attributes> + </java-type> + + <java-type name="Chassis"> + <xml-root-element name="chassis"/> + <java-attributes> + <xml-element java-attribute="chassisName" name="chassis-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="A globally unique name for the chassis."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="chassisType" name="chassis-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The type of chassis.."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="chassisRole" name="chassis-role" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The role of the chassis relative to the pnf/pserver.."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="operatingSystem" name="operating-system" required="false" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Operating system of the hardware."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serialNumber" name="serial-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The serial number of the chassis.."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="assetTag" name="asset-tag" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The asset tag of the chassis."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="chassisDescription" name="chassis-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Description of the chassis."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="partNumber" name="part-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Part number for this chassis."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this chassis."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipModel" name="equip-model" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment model."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipVendor" name="equip-vendor" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment vendor. Source of truth should define valid values."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipIdentifier" name="equip-identifier" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="CLEI or other specification for chassis hardware."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="slotNumber" name="slot-number" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Slot number associated with this chassis."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="adminState" name="admin-state" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Reflects the admin-state of the device."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ports" name="ports" type="inventory.aai.onap.org.v23.Ports"/> + <xml-element java-attribute="cardSlots" name="card-slots" type="inventory.aai.onap.org.v23.CardSlots"/> + <xml-element java-attribute="pluggableSlots" name="pluggable-slots" type="inventory.aai.onap.org.v23.PluggableSlots"/> + <xml-element java-attribute="licenses" name="licenses" type="inventory.aai.onap.org.v23.Licenses"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Definition of chassis"/> + <xml-property name="uniqueProps" value="chassis-name"/> + <xml-property name="indexedProps" value="chassis-name,part-number,orchestration-status,equip-model,equip-vendor,equip-identifier,data-owner,data-source,data-source-version"/> + <xml-property name="container" value="chassies"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/chassies/chassis/{chassis-name}"/> + <xml-property name="requiredProps" value="chassis-name,chassis-type,chassis-role"/> + </xml-properties> + </java-type> + + <java-type name="Ports"> + <xml-root-element name="ports"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="port" name="port" type="inventory.aai.onap.org.v23.Port"/> + </java-attributes> + </java-type> + + <java-type name="Port"> + <xml-root-element name="port"/> + <java-attributes> + <xml-element java-attribute="portName" name="port-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="A unique name for the port relative to the containing hardware."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="portType" name="port-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The type of port."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="portRole" name="port-role" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The role of the port."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The numeric value for the speed of the port."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The units for the speed of the port."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="xcvrType" name="xcvr-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of transceiver that creates this port."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipIdentifier" name="equip-identifier" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="clei-code or other similar identifier"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="partNumber" name="part-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="part number"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="portStart" name="port-start" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Port range start"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="portEnd" name="port-end" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Port range end"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Definition of port"/> + <xml-property name="indexedProps" value="port-name,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="chassis,pluggable,card"/> + <xml-property name="container" value="ports"/> + <xml-property name="uriTemplate" value="/ports/port/{port-name}"/> + <xml-property name="requiredProps" value="port-name,port-type,port-role,speed-value,speed-units"/> + </xml-properties> + </java-type> + + <java-type name="CardSlots"> + <xml-root-element name="card-slots"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="cardSlot" name="card-slot" type="inventory.aai.onap.org.v23.CardSlot"/> + </java-attributes> + <xml-properties> + </xml-properties> + </java-type> + + <java-type name="CardSlot"> + <xml-root-element name="card-slot"/> + <java-attributes> + <xml-element java-attribute="slotName" name="slot-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="The name of the card-slot (unique relative to the chassis)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="cards" name="cards" type="inventory.aai.onap.org.v23.Cards"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Definition of card-slot"/> + <xml-property name="indexedProps" value="slot-name,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="chassis"/> + <xml-property name="container" value="card-slots"/> + <xml-property name="uriTemplate" value="/card-slots/card-slot/{slot-name}"/> + <xml-property name="requiredProps" value="slot-name"/> + </xml-properties> + </java-type> + + <java-type name="Cards"> + <xml-root-element name="cards"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="card" name="card" type="inventory.aai.onap.org.v23.Card"/> + </java-attributes> + </java-type> + + <java-type name="Card"> + <xml-root-element name="card"/> + <java-attributes> + <xml-element java-attribute="cardType" name="card-type" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="The type of card."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="ports" name="ports" type="inventory.aai.onap.org.v23.Ports"/> + <xml-element java-attribute="pluggableSlots" name="pluggable-slots" type="inventory.aai.onap.org.v23.PluggableSlots"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Definition of card"/> + <xml-property name="indexedProps" value="card-type,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="card-slot"/> + <xml-property name="container" value="cards"/> + <xml-property name="uriTemplate" value="/cards/card/{card-type}"/> + <xml-property name="requiredProps" value="card-type"/> + </xml-properties> + </java-type> + + <java-type name="PluggableSlots"> + <xml-root-element name="pluggable-slots"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="pluggableSlot" name="pluggable-slot" type="inventory.aai.onap.org.v23.PluggableSlot"/> + </java-attributes> + <xml-properties> + </xml-properties> + </java-type> + + <java-type name="PluggableSlot"> + <xml-root-element name="pluggable-slot"/> + <java-attributes> + <xml-element java-attribute="slotName" name="slot-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="The name of the pluggable-slot. (unique relative to the chassis or card)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="pluggables" name="pluggables" type="inventory.aai.onap.org.v23.Pluggables"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Definition of card-slot"/> + <xml-property name="indexedProps" value="slot-name,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="chassis,card"/> + <xml-property name="container" value="pluggable-slots"/> + <xml-property name="uriTemplate" value="/pluggable-slots/pluggable-slot/{slot-name}"/> + <xml-property name="requiredProps" value="slot-name"/> + </xml-properties> + </java-type> + + <java-type name="Pluggables"> + <xml-root-element name="pluggables"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="pluggable" name="pluggable" type="inventory.aai.onap.org.v23.Pluggable"/> + </java-attributes> + </java-type> + + <java-type name="Pluggable"> + <xml-root-element name="pluggable"/> + <java-attributes> + <xml-element java-attribute="pluggableType" name="pluggable-type" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="The type of pluggable."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="partNumber" name="part-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Part number for this pluggable."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipIdentifier" name="equip-identifier" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="CLEI or other specification for pluggable hardware."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="ports" name="ports" type="inventory.aai.onap.org.v23.Ports"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Definition of pluggable"/> + <xml-property name="indexedProps" value="pluggable-type,part-number,equip-identifier,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="pluggable-slot"/> + <xml-property name="container" value="pluggables"/> + <xml-property name="uriTemplate" value="/pluggables/pluggable/{pluggable-type}"/> + <xml-property name="requiredProps" value="pluggable-type"/> + </xml-properties> + </java-type> + + <java-type name="PhysicalLinks"> + <xml-properties> + <xml-property name="description" value="Collection of physical connections, typically between p-interfaces"/> + </xml-properties> + <xml-root-element name="physical-links"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="physicalLink" name="physical-link" type="inventory.aai.onap.org.v23.PhysicalLink"/> + </java-attributes> + <xml-properties> + <xml-property name="maximumDepth" value="0"/> + </xml-properties> + </java-type> + + <java-type name="PhysicalLink"> + <xml-root-element name="physical-link"/> + <java-attributes> + <xml-element java-attribute="linkName" name="link-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="e.g., hostnameA_p-connection_nameA_hostnameZ+p_connection-nameZ"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the numeric part of the speed"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the units corresponding to the speed"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="circuitId" name="circuit-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Circuit it"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dualMode" name="dual-mode" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Dual access mode (e.g., primary, secondary"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementOption" name="management-option" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="To provide information on who manages this circuit. A&AI or 3rd party transport provider"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceProviderName" name="service-provider-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the service Provider on this link."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceProviderBandwidthUpValue" name="service-provider-bandwidth-up-value" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Upstream Bandwidth value agreed with the service provider"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceProviderBandwidthUpUnits" name="service-provider-bandwidth-up-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Units for the upstream BW value"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceProviderBandwidthDownValue" name="service-provider-bandwidth-down-value" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Downstream Bandwidth value agreed with the service provider"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceProviderBandwidthDownUnits" name="service-provider-bandwidth-down-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Units for downstream BW value"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="linkFunction" name="link-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The function performed by this physical link"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="linkRole" name="link-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for the use of this physical link"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="linkType" name="link-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Subtype used to categorize this physical link"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Collection of physical connections, typically between p-interfaces"/> + <xml-property name="indexedProps" value="circuit-id,link-name,link-function,link-role,link-type,data-owner,data-source,data-source-version"/> + <xml-property name="alternateKeys1" value="circuit-id"/> + <xml-property name="container" value="physical-links"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/physical-links/physical-link/{link-name}"/> + <xml-property name="requiredProps" value="link-name"/> + </xml-properties> + </java-type> + + <java-type name="VigServers"> + <xml-root-element name="vig-servers"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vigServer" name="vig-server" type="inventory.aai.onap.org.v23.VigServer"/> + </java-attributes> + </java-type> + + <java-type name="VigServer"> + <xml-root-element name="vig-server"/> + <java-attributes> + <xml-element java-attribute="vigAddressType" name="vig-address-type" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="indicates whether the VIG is for AVPN or INTERNET"/> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="ipaddressV4Vig" name="ipaddress-v4-vig" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v4 IP of the vig server"/> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="ipaddressV6Vig" name="ipaddress-v6-vig" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v6 IP of the vig server"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This object captures information about a vig server used for IPSec-configuration. Populated by SDN-C | A&AI clients for this object are typically: SDNC, (DMaaP-DCAE,...) |"/> + <xml-property name="indexedProps" value="vig-address-type,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="ipsec-configuration"/> + <xml-property name="container" value="vig-servers"/> + <xml-property name="uriTemplate" value="/vig-servers/vig-server/{vig-address-type}"/> + <xml-property name="requiredProps" value="vig-address-type"/> + </xml-properties> + </java-type> + + <java-type name="IpsecConfigurations"> + <xml-root-element name="ipsec-configurations"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="ipsecConfiguration" name="ipsec-configuration" type="inventory.aai.onap.org.v23.IpsecConfiguration"/> + </java-attributes> + </java-type> + + <java-type name="IpsecConfiguration"> + <xml-root-element name="ipsec-configuration"/> + <java-attributes> + <xml-element java-attribute="ipsecConfigurationId" name="ipsec-configuration-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID of this configuration"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="requestedVigAddressType" name="requested-vig-address-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicate the type of VIG server like AVPN, INTERNET, BOTH"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="requestedEncryptionStrength" name="requested-encryption-strength" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Encryption values like 3des-cbc, des-cbc, aes-128-cbc, aes-192-cbc, aes-265-cbc"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="requestedDmzType" name="requested-dmz-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ATT can offer a shared DMZ or a DMZ specific to a customer"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="sharedDmzNetworkAddress" name="shared-dmz-network-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Network address of shared DMZ"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="requestedCustomerName" name="requested-customer-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="If the DMZ is a custom DMZ, this field will indicate the customer information"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikeVersion" name="ike-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="can be 1 or 2"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1Authentication" name="ikev1-authentication" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Contains values like md5, sha1, sha256, sha384"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1Encryption" name="ikev1-encryption" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Encyption values like 3des-cbc, des-cbc, aes-128-cbc, aes-192-cbc, aes-265-cbc"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1DhGroup" name="ikev1-dh-group" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Diffie-Hellman group like DH-GROUP2, DH-GROUP5, DH-GROUP14"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1AmGroupId" name="ikev1-am-group-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Group name defined in VIG for clients using aggressive mode"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1AmPassword" name="ikev1-am-password" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="pre-shared key for the above group name "/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1SaLifetime" name="ikev1-sa-lifetime" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Lifetime for IKEv1 SA"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipsecAuthentication" name="ipsec-authentication" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="md5, sha1, sha256, sha384"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipsecEncryption" name="ipsec-encryption" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="3des-cbc, des-cbc, aes-128-cbc, aes-192-cbc, aes-265-cbc"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipsecSaLifetime" name="ipsec-sa-lifetime" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Life time for IPSec SA"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipsecPfs" name="ipsec-pfs" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="enable PFS or not"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="xauthUserId" name="xauth-userid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="user ID for xAuth, sm-user,ucpeHostName,nmteHostName"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="xauthUserPassword" name="xauth-user-password" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Encrypted using the Juniper $9$ algorithm"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dpdInterval" name="dpd-interval" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The time between DPD probe"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dpdFrequency" name="dpd-frequency" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Maximum number of DPD before claiming the tunnel is down"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="vigServers" name="vig-servers" type="inventory.aai.onap.org.v23.VigServers"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="IPSec configuration node will contain various configuration data for the NMTE VNF. This node will have an edge to the generic-vnf (vnf type = TE). Starting 1607, this data will be populated by SDN-C"/> + <xml-property name="indexedProps" value="ipsec-configuration-id,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="ipsec-configuration-id"/> + <xml-property name="container" value="ipsec-configurations"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/ipsec-configurations/ipsec-configuration/{ipsec-configuration-id}"/> + <xml-property name="requiredProps" value="ipsec-configuration-id"/> + </xml-properties> + </java-type> + + <java-type name="Models"> + <xml-properties> + <xml-property name="description" value="Collection of subgraph definitions provided by ASDC to describe the inventory assets and their connections related to ASDC models"/> + </xml-properties> + <xml-root-element name="models"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="model" name="model" type="inventory.aai.onap.org.v23.Model"/> + </java-attributes> + </java-type> + + <java-type name="Model"> + <xml-root-element name="model"/> + <xml-properties> + <xml-property name="description" value="Subgraph definition provided by ASDC to describe an inventory asset and its connections related to ASDC models, independent of version"/> + <xml-property name="nameProps" value="model-type"/> + <xml-property name="indexedProps" value="model-invariant-id,model-type,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="model-invariant-id"/> + <xml-property name="container" value="models"/> + <xml-property name="namespace" value="service-design-and-creation"/> + <xml-property name="uriTemplate" value="/service-design-and-creation/models/model/{model-invariant-id}"/> + <xml-property name="requiredProps" value="model-invariant-id,model-type"/> + </xml-properties> + <java-attributes> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier corresponding to the main definition of a model in ASDC"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelType" name="model-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of the model, e.g., service, resource, widget, etc."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVers" name="model-vers" type="inventory.aai.onap.org.v23.ModelVers"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + </java-type> + + + <java-type name="ModelVers"> + <xml-root-element name="model-vers"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="modelVer" name="model-ver" type="inventory.aai.onap.org.v23.ModelVer"/> + </java-attributes> + </java-type> + + <java-type name="ModelVer"> + <xml-root-element name="model-ver"/> + <xml-properties> + <xml-property name="description" value="Subgraph definition provided by ASDC to describe a specific version of an inventory asset and its connections related to ASDC models"/> + <xml-property name="nameProps" value="model-name"/> + <xml-property name="indexedProps" value="model-version-id,model-name,model-version,distribution-status,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="model-version-id"/> + <xml-property name="dependentOn" value="model"/> + <xml-property name="container" value="model-vers"/> + <xml-property name="uriTemplate" value="/model-vers/model-ver/{model-version-id}"/> + <xml-property name="requiredProps" value="model-version-id,model-name,model-version"/> + </xml-properties> + <java-attributes> + <xml-element java-attribute="modelVersionId" name="model-version-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier corresponding to one version of a model in ASDC"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelName" name="model-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the model, which can change from version to version."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersion" name="model-version" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Version"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="distributionStatus" name="distribution-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Distribution Status"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelDescription" name="model-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Description"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelElements" name="model-elements" type="inventory.aai.onap.org.v23.ModelElements"/> + <xml-element java-attribute="metadata" name="metadata" type="inventory.aai.onap.org.v23.Metadata"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + </java-type> + + <java-type name="ModelElements"> + <xml-root-element name="model-elements"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="modelElement" name="model-element" type="inventory.aai.onap.org.v23.ModelElement"/> + </java-attributes> + </java-type> + + <java-type name="ModelElement"> + <xml-properties> + <xml-property name="description" value="Defines how other models combine to make up a higher-level model."/> + <xml-property name="uniqueProps" value="model-element-uuid"/> + <xml-property name="indexedProps" value="model-element-uuid,data-owner,data-source,data-source-version"/> + <xml-property name="allowDirectRead" value="true"/> + <xml-property name="dependentOn" value="element-choice-set,model-element,model-ver"/> + <xml-property name="allowDirectWrite" value="false"/> + <xml-property name="container" value="model-elements"/> + <xml-property name="uriTemplate" value="/model-elements/model-element/{model-element-uuid}"/> + <xml-property name="requiredProps" value="model-element-uuid,new-data-del-flag,cardinality"/> + </xml-properties> + <xml-root-element name="model-element"/> + <java-attributes> + <xml-element java-attribute="modelElementUuid" name="model-element-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="newDataDelFlag" name="new-data-del-flag" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicates whether this element was created as part of instantiation from this model"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="cardinality" name="cardinality" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="How many of this type of element are required/allowed"/> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="linkagePoints" name="linkage-points" type="java.lang.String"> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelElements" name="model-elements" type="inventory.aai.onap.org.v23.ModelElements"> + <xml-properties> + <xml-property name="description" value="Defines how other models combine to make up a higher-level model"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelConstraints" name="model-constraints" type="inventory.aai.onap.org.v23.ModelConstraints"> + <xml-properties> + <xml-property name="description" value="Describes new constraints on this model element that are not part of that model's definition"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + </java-type> + + <java-type name="ModelConstraints"> + <xml-root-element name="model-constraints"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="modelConstraint" name="model-constraint" type="inventory.aai.onap.org.v23.ModelConstraint"/> + </java-attributes> + </java-type> + + <java-type name="ModelConstraint"> + <xml-properties> + <xml-property name="description" value="This is how we would capture constraints defining allowed sets of elements."/> + <xml-property name="uniqueProps" value="model-constraint-uuid"/> + <xml-property name="indexedProps" value="model-constraint-uuid,data-owner,data-source,data-source-version"/> + <xml-property name="allowDirectRead" value="true"/> + <xml-property name="allowDirectWrite" value="false"/> + <xml-property name="dependentOn" value="model-element"/> + <xml-property name="container" value="model-constraints"/> + <xml-property name="uriTemplate" value="/model-constraints/model-constraint/{model-constraint-uuid}"/> + <xml-property name="requiredProps" value="model-constraint-uuid,constrained-element-set-uuid-to-replace"/> + </xml-properties> + <xml-root-element name="model-constraint"/> + <java-attributes> + <xml-element java-attribute="modelConstraintUuid" name="model-constraint-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="constrainedElementSetUuidToReplace" name="constrained-element-set-uuid-to-replace" required="true" type="java.lang.String"/> + <xml-element java-attribute="constrainedElementSets" name="constrained-element-sets" type="inventory.aai.onap.org.v23.ConstrainedElementSets"/> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + + <java-type name="ConstrainedElementSets"> + <xml-root-element name="constrained-element-sets"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="constrainedElementSet" name="constrained-element-set" type="inventory.aai.onap.org.v23.ConstrainedElementSet"/> + </java-attributes> + </java-type> + + <java-type name="ConstrainedElementSet"> + <xml-properties> + <xml-property name="description" value="This is how we would capture constraints defining allowed sets of elements."/> + <xml-property name="uniqueProps" value="constrained-element-set-uuid"/> + <xml-property name="indexedProps" value="constrained-element-set-uuid,data-owner,data-source,data-source-version"/> + <xml-property name="allowDirectRead" value="true"/> + <xml-property name="dependentOn" value="model-constraint,model-element"/> + <xml-property name="allowDirectWrite" value="false"/> + <xml-property name="container" value="constrained-element-sets"/> + <xml-property name="uriTemplate" value="/constrained-element-sets/constrained-element-set/{constrained-element-set-uuid}"/> + <xml-property name="requiredProps" value="constrained-element-set-uuid,constraint-type,check-type"/> + </xml-properties> + <xml-root-element name="constrained-element-set"/> + <java-attributes> + <xml-element java-attribute="constrainedElementSetUuid" name="constrained-element-set-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="constraintType" name="constraint-type" required="true" type="java.lang.String"/> + <xml-element java-attribute="checkType" name="check-type" required="true" type="java.lang.String"/> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"/> + <xml-element java-attribute="elementChoiceSets" name="element-choice-sets" type="inventory.aai.onap.org.v23.ElementChoiceSets"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + </java-type> + + <java-type name="ElementChoiceSets"> + <xml-root-element name="element-choice-sets"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="elementChoiceSet" name="element-choice-set" type="inventory.aai.onap.org.v23.ElementChoiceSet"/> + </java-attributes> + </java-type> + + <java-type name="ElementChoiceSet"> + <xml-properties> + <xml-property name="description" value="This is how we would capture constraints defining allowed sets of elements."/> + <xml-property name="uniqueProps" value="element-choice-set-uuid"/> + <xml-property name="indexedProps" value="element-choice-set-uuid,data-owner,data-source,data-source-version"/> + <xml-property name="allowDirectRead" value="true"/> + <xml-property name="dependentOn" value="constrained-element-set"/> + <xml-property name="allowDirectWrite" value="false"/> + <xml-property name="container" value="element-choice-sets"/> + <xml-property name="uriTemplate" value="/element-choice-sets/element-choice-set/{element-choice-set-uuid}"/> + <xml-property name="requiredProps" value="element-choice-set-uuid,element-choice-set-name"/> + </xml-properties> + <xml-root-element name="element-choice-set"/> + <java-attributes> + <xml-element java-attribute="elementChoiceSetUuid" name="element-choice-set-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="elementChoiceSetName" name="element-choice-set-name" required="true" type="java.lang.String"/> + <xml-element java-attribute="cardinality" name="cardinality" type="java.lang.String"/> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"/> + <xml-element java-attribute="modelElements" name="model-elements" type="inventory.aai.onap.org.v23.ModelElements"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + </java-type> + + <java-type name="OverloadedModel"> + <xml-root-element name="overloaded-model"/> + <xml-properties> + <xml-property name="description" value="| SE group | This object allows for legacy POST of old-style and new-style models | A&AI clients for this object are typically: (DMaaP-DCAE,...) |"/> + <xml-property name="requiredProps" value="model-invariant-id,model-name-version-id,model-type,model-name,model-id,model-version"/> + </xml-properties> + <java-attributes> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier corresponding to the main definition of a model in ASDC"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelNameVersionId" name="model-name-version-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier corresponding to one version of a model in ASDC"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelType" name="model-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of the model, e.g., service, resource, widget, etc."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelName" name="model-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the model, which can change from version to version."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelId" name="model-id" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Invariant unique ID which does not change from version to version"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersion" name="model-version" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Version"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelDescription" name="model-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Description"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVers" name="model-vers" type="inventory.aai.onap.org.v23.ModelVers"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + </java-type> + + <java-type name="RouteTableReferences"> + <xml-properties> + <xml-property name="description" value="Collection of openstack route table references"/> + </xml-properties> + <xml-root-element name="route-table-references"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="routeTableReference" name="route-table-reference" type="inventory.aai.onap.org.v23.RouteTableReference"/> + </java-attributes> + </java-type> + + <java-type name="RouteTableReference"> + <xml-root-element name="route-table-reference"/> + <java-attributes> + <xml-element java-attribute="routeTableReferenceId" name="route-table-reference-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Route Table Reference id, UUID assigned to this instance."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="routeTableReferenceFqdn" name="route-table-reference-fqdn" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="FQDN entry in the route table."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Concurrency value"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + + <xml-properties> + <xml-property name="description" value="| SE group | This object captures the openstack route table reference. | A&AI clients for this object are typically: (DMaaP-DCAE,...) |"/> + <xml-property name="nameProps" value="route-table-reference-fqdn"/> + <xml-property name="uniqueProps" value="route-table-reference-id"/> + <xml-property name="indexedProps" value="route-table-reference-id,route-table-reference-fqdn,data-owner,data-source,data-source-version"/> + <xml-property name="container" value="route-table-references"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/route-table-references/route-table-reference/{route-table-reference-id}"/> + <xml-property name="requiredProps" value="route-table-reference-id,route-table-reference-fqdn"/> + </xml-properties> + </java-type> + + <java-type name="InstanceGroups"> + <xml-properties> + <xml-property name="description" value="Collection of openstack route table references"/> + </xml-properties> + <xml-root-element name="instance-groups"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="instanceGroup" name="instance-group" type="inventory.aai.onap.org.v23.InstanceGroup"/> + </java-attributes> + </java-type> + + <java-type name="InstanceGroup"> + <xml-root-element name="instance-group"/> + <java-attributes> + + <xml-element java-attribute="id" name="id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Instance Group ID, UUID assigned to this instance."/> + </xml-properties> + </xml-element> + + <xml-element java-attribute="instanceGroupRole" name="instance-group-role" required="false" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="role of the instance group."/> + </xml-properties> + </xml-element> + + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" required="false" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ASDC model id for this resource or service model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-version-id"/> + <xml-property name="dbAlias" value="model-invariant-id-local"/> + </xml-properties> + </xml-element> + + <xml-element java-attribute="modelVersionId" name="model-version-id" required="false" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ASDC model version uid for this resource model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-invariant-id"/> + <xml-property name="dbAlias" value="model-version-id-local"/> + <xml-property name="privateEdge" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="description" name="description" required="false" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Descriptive text to help identify the usage of this instance-group"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="instanceGroupType" name="instance-group-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Only valid value today is lower case ha for high availability"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Concurrency value"/> + </xml-properties> + </xml-element> + + <xml-element java-attribute="instanceGroupName" name="instance-group-name" required="false" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Instance-Group Name."/> + </xml-properties> + </xml-element> + + <xml-element java-attribute="instanceGroupFunction" name="instance-group-function" required="false" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Instance-Group Function"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="instanceGroupNumber" name="instance-group-number" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Number used to identify an instance-group"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="priorityNumber" name="priority-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to identify the primary and secondary priority"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + + <xml-properties> + <xml-property name="description" value="| SE group | This object is used for grouping instances. | A&AI clients for this object are typically: AUTOGEN, CONDUCTOR, CVAAS, DCAE-CCS, GEOLINK, NLS, PINC, SO.BPMN; GEOLINK, NBO, SDN-GC, (DMaaP-DCAE,...) | "/> + <xml-property name="nameProps" value="description,instance-group-name"/> + <xml-property name="indexedProps" value="id,model-invariant-id,model-version-id,data-owner,data-source,data-source-version"/> + <xml-property name="container" value="instance-groups"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/instance-groups/instance-group/{id}"/> + <xml-property name="requiredProps" value="id,instance-group-type"/> + </xml-properties> + </java-type> + + + <java-type name="SegmentationAssignments"> + <xml-properties> + <xml-property name="description" value="Collection of openstack segmentation assignments"/> + </xml-properties> + <xml-root-element name="segmentation-assignments"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="segmentationAssignment" name="segmentation-assignment" type="inventory.aai.onap.org.v23.SegmentationAssignment"/> + </java-attributes> + </java-type> + + <java-type name="SegmentationAssignment"> + <xml-root-element name="segmentation-assignment"/> + <java-attributes> + <xml-element java-attribute="segmentationId" name="segmentation-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Route Table Reference id, UUID assigned to this instance."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Concurrency value"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This object captures the openstack segmentation assignment. | A&AI clients for this object are typically: SDNC, (DMaaP-DCAE,...) |"/> + <xml-property name="indexedProps" value="segmentation-id,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="l3-network"/> + <xml-property name="container" value="segmentation-assignments"/> + <xml-property name="uriTemplate" value="/segmentation-assignments/segmentation-assignment/{segmentation-id}"/> + <xml-property name="requiredProps" value="segmentation-id"/> + </xml-properties> + </java-type> + + <java-type name="AllottedResources"> + <xml-properties> + <xml-property name="description" value="This object is used to store slices of services being offered"/> + </xml-properties> + <xml-root-element name="allotted-resources"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="allottedResource" name="allotted-resource" type="inventory.aai.onap.org.v23.AllottedResource"/> + </java-attributes> + </java-type> + + <java-type name="AllottedResource"> + <xml-root-element name="allotted-resource"/> + <java-attributes> + <xml-element java-attribute="id" name="id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Allotted Resource id UUID assigned to this instance."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="description" name="description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The descriptive information assigned to this allotted resource instance"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Link back to more information in the controller"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-version-id"/> + <xml-property name="dbAlias" value="model-invariant-id-local"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model."/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-invariant-id"/> + <xml-property name="dbAlias" value="model-version-id-local"/> + <xml-property name="privateEdge" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Concurrency value"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for whether the resource is considered operational"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="type" name="type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Generic description of the type of allotted resource."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="role" name="role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="role in the network that this resource will be providing."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="tunnelXconnects" name="tunnel-xconnects" type="inventory.aai.onap.org.v23.TunnelXconnects"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + + <xml-properties> + <xml-property name="description" value="Represents a slice or partial piece of a resource that gets separately allotted"/> + <xml-property name="nameProps" value="description"/> + <xml-property name="indexedProps" value="id,model-invariant-id,model-version-id,type,role,orchestration-status,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="service-instance"/> + <xml-property name="container" value="allotted-resources"/> + <!-- <xml-property name="namespace" value="network" /> --> + <xml-property name="uriTemplate" value="/allotted-resources/allotted-resource/{id}"/> + <xml-property name="requiredProps" value="id"/> + </xml-properties> + </java-type> + + <java-type name="TunnelXconnects"> + <xml-properties> + <xml-property name="description" value="This object is used to store the specific tunnel cross connect aspects of an allotted resource"/> + </xml-properties> + <xml-root-element name="tunnel-xconnects"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="tunnelXconnect" name="tunnel-xconnect" type="inventory.aai.onap.org.v23.TunnelXconnect"/> + </java-attributes> + </java-type> + + <java-type name="TunnelXconnect"> + <xml-root-element name="tunnel-xconnect"/> + <java-attributes> + <xml-element java-attribute="id" name="id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Allotted Resource id UUID assigned to this instance."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Concurrency value"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + + <xml-properties> + <xml-property name="description" value="Represents the specifics of a tunnel cross connect piece of a resource that gets separately allotted"/> + <xml-property name="indexedProps" value="id,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="allotted-resource"/> + <xml-property name="container" value="tunnel-xconnects"/> + <!-- <xml-property name="namespace" value="network" /> --> + <xml-property name="uriTemplate" value="/tunnel-xconnects/tunnel-xconnect/{id}"/> + <xml-property name="requiredProps" value="id"/> + </xml-properties> + </java-type> + + <java-type name="BgpGroups"> + <xml-root-element name="bgp-groups"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="bgpGroup" name="bgp-group" type="inventory.aai.onap.org.v23.BgpGroup"/> + </java-attributes> + <xml-properties> + </xml-properties> + </java-type> + + <java-type name="BgpGroup"> + <xml-root-element name="bgp-group"/> + <java-attributes> + <xml-element java-attribute="bgpGroupId" name="bgp-group-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="bgpGroupName" name="bgp-group-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="name of bgp-group"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="bgpGroupType" name="bgp-group-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="type of bgp-group"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="bgpGroupRole" name="bgp-group-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="role of bgp-group"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="bgpGroupFunction" name="bgp-group-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="function of bgp-group"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="localAs" name="local-as" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="local a-s number type of vrf (bridge-domain as an example)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="localAddress" name="local-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="local address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="peerAs" name="peer-as" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="peer a-s number"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="peerAddress" name="peer-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="peer address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="description" name="description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="description of bgp-group"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="opsNote" name="ops-note" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Notes to aid OPs in troubleshooting, such as attribute aliases or additional descriptions/instructions about an object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="addressFamilies" name="address-families" type="inventory.aai.onap.org.v23.AddressFamilies"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Definition of bgp-group"/> + <xml-property name="indexedProps" value="bgp-group-id,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="pnf,vrf,generic-vnf"/> + <xml-property name="nameProps" value="bgp-group-id,bgp-group-name"/> + <xml-property name="container" value="bgp-groups"/> + <xml-property name="uriTemplate" value="/bgp-groups/bgp-group/{bgp-group-id}"/> + <xml-property name="requiredProps" value="bgp-group-id,bgp-group-name"/> + </xml-properties> + </java-type> + + <java-type name="BgpNeighbors"> + <xml-root-element name="bgp-neighbors"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="bgpNeighbor" name="bgp-neighbor" type="inventory.aai.onap.org.v23.BgpNeighbor"/> + </java-attributes> + <xml-properties> + </xml-properties> + </java-type> + + <java-type name="BgpNeighbor"> + <xml-root-element name="bgp-neighbor"/> + <java-attributes> + <xml-element java-attribute="bgpNeighborId" name="bgp-neighbor-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="bgpNeighborType" name="bgp-neighbor-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="name of bgp-group"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="bgpNeighborRole" name="bgp-neighbor-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="type of bgp-group"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="bgpNeighborFunction" name="bgp-neighbor-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="role of bgp-group"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="localAs" name="local-as" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="local a-s number type of vrf (bridge-domain as an example)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="localAddress" name="local-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="local address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="peerAs" name="peer-as" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="peer a-s number"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="peerAddress" name="peer-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="peer address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="description" name="description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="description of bgp-group"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="opsNote" name="ops-note" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Notes to aid OPs in troubleshooting, such as attribute aliases or additional descriptions/instructions about an object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="provisioning status. Valid values can be found at (https://wiki.web.att.com/display/SPTIIRP/prov-status)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="peerHostname" name="peer-hostname" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="hostname of the peer"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="addressFamilies" name="address-families" type="inventory.aai.onap.org.v23.AddressFamilies"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Definition of bgp-neighbor"/> + <xml-property name="indexedProps" value="bgp-neighbor-id,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="pnf,vrf,subnet,generic-vnf"/> + <xml-property name="nameProps" value="bgp-neighbor-id"/> + <xml-property name="container" value="bgp-neighbors"/> + <xml-property name="uriTemplate" value="/bgp-neighbors/bgp-neighbor/{bgp-neighbor-id}"/> + <xml-property name="requiredProps" value="bgp-neighbor-id,bgp-neighbor-type"/> + </xml-properties> + </java-type> + + <java-type name="AddressFamilies"> + <xml-root-element name="address-families"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="addressFamily" name="address-family" type="inventory.aai.onap.org.v23.AddressFamily"/> + </java-attributes> + <xml-properties> + </xml-properties> + </java-type> + + <java-type name="AddressFamily"> + <xml-root-element name="address-family"/> + <java-attributes> + <xml-element java-attribute="addressFamilyId" name="address-family-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="address family UUID."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="afType" name="af-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="address family type (aka afi)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="afSubtype" name="af-subtype" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="address family subtype (aka safi)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="afRole" name="af-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="role of address-family"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="afFunction" name="af-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="function of address-family"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="maxPrefixV4" name="max-prefix-v4" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Max prefix for IPv4"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="maxPrefixV6" name="max-prefix-v6" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Max prefix for IPv6"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="maxPrefixThreshold" name="max-prefix-threshold" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Max prefix threshold"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Definition of address family"/> + <xml-property name="indexedProps" value="address-family-id,af-type,data-owner,data-source,data-source-version"/> + <xml-property name="nameProps" value="address-family-id,af-type"/> + <xml-property name="dependentOn" value="bgp-group,bgp-neighbor"/> + <xml-property name="container" value="address-families"/> + <xml-property name="uriTemplate" value="/address-families/address-family/{address-family-id}"/> + <xml-property name="requiredProps" value="address-family-id,af-type"/> + </xml-properties> + </java-type> + + <java-type name="Entitlements"> + <xml-properties> + <xml-property name="description" value="Entitlements, keyed by group-uuid and resource-uuid, related to license management"/> + </xml-properties> + <xml-root-element name="entitlements"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="entitlement" name="entitlement" type="inventory.aai.onap.org.v23.Entitlement"/> + </java-attributes> + </java-type> + + <java-type name="Entitlement"> + <xml-root-element name="entitlement"/> + <java-attributes> + <xml-element java-attribute="groupUuid" name="group-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID for the entitlement group the resource comes from, should be uuid."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceUuid" name="resource-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of an entitlement resource. "/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Concurrency value"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Metadata for entitlement group."/> + <xml-property name="indexedProps" value="group-uuid,resource-uuid,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="generic-vnf,vce"/> + <xml-property name="container" value="entitlements"/> + <xml-property name="uriTemplate" value="/entitlements/entitlement/{group-uuid}/{resource-uuid}"/> + <xml-property name="requiredProps" value="group-uuid,resource-uuid"/> + </xml-properties> + </java-type> + + + <java-type name="Licenses"> + <xml-properties> + <xml-property name="description" value="Licenses to be allocated across resources, keyed by group-uuid and resource-uuid, related to license management"/> + </xml-properties> + <xml-root-element name="licenses"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="license" name="license" type="inventory.aai.onap.org.v23.License"/> + </java-attributes> + </java-type> + + <java-type name="License"> + <xml-root-element name="license"/> + <java-attributes> + <xml-element java-attribute="groupUuid" name="group-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID for the license group the resource belongs to, should be uuid."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceUuid" name="resource-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of a license resource. "/> + </xml-properties> + </xml-element> + <xml-element java-attribute="projectNumber" name="project-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to store CFAS or other project numbers."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="orderNumber" name="order-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Order number."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="receiptDate" name="receipt-date" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Date of receipt."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Concurrency value"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Metadata for license group."/> + <xml-property name="indexedProps" value="group-uuid,resource-uuid,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="chassis,generic-vnf,vce"/> + <xml-property name="container" value="licenses"/> + <xml-property name="uriTemplate" value="/licenses/license/{group-uuid}/{resource-uuid}"/> + <xml-property name="requiredProps" value="group-uuid,resource-uuid"/> + </xml-properties> + </java-type> + + <java-type name="Vnf"> + <xml-root-element name="vnf"/> + <java-attributes> + <xml-element java-attribute="vnfId" name="vnf-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of VNF. This is unique across the graph."/> + </xml-properties> + </xml-element> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Abstract vnf class"/> + <xml-property name="indexedProps" value="vnf-id"/> + <xml-property name="uniqueProps" value="vnf-id"/> + <xml-property name="inheritors" value="vce,generic-vnf"/> + <xml-property name="abstract" value="true"/> + <xml-property name="requiredProps" value="vnf-id"/> + </xml-properties> + </java-type> + + <java-type name="Zones"> + <xml-properties> + <xml-property name="description" value="Collection of zones"/> + </xml-properties> + <xml-root-element name="zones"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="zone" name="zone" type="inventory.aai.onap.org.v23.Zone"/> + </java-attributes> + </java-type> + + <java-type name="Zone"> + <xml-root-element name="zone"/> + <java-attributes> + <xml-element java-attribute="zoneId" name="zone-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Code assigned by AIC to the zone"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="zoneName" name="zone-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="English name associated with the zone"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="zoneType" name="zone-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The type of zone (ex. AIC or NC)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="designType" name="design-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Design of zone [Medium/Large…]"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="zoneContext" name="zone-context" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Context of zone [production/test]"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="status" name="status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Status of a zone."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="zoneRole" name="zone-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role of a zone."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="zoneFunction" name="zone-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Function of a zone."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Concurrency value"/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Used to indicate whether or not zone object is in maintenance mode."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="subnets" name="subnet" type="inventory.aai.onap.org.v23.Subnets"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This object captures the grouping of assets in a location homing to the same connections into the CBB. Multiple complexes, cloud-regions are located in a zone. zone-id is a 4 alphanumeric char string. | A&AI clients for this object are typically: AUTOGEN, CDM/NLS, CVAAS, DCAE-CCS, PINC, SDN-O, VID, IDF, (DMaaP-DCAE,...) |"/> + <xml-property name="nameProps" value="zone-name"/> + <xml-property name="indexedProps" value="zone-id,design-type,zone-context,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="zone-id"/> + <xml-property name="container" value="zones"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/zones/zone/{zone-id}"/> + <xml-property name="requiredProps" value="zone-id,zone-name,design-type,zone-context,in-maint"/> + </xml-properties> + </java-type> + + <java-type name="AutonomousSystems"> + <xml-properties> + <xml-property name="description" value="Collection of Autonomous Systems"/> + </xml-properties> + <xml-root-element name="autonomous-systems"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="autonomousSystem" name="autonomous-system" type="inventory.aai.onap.org.v23.AutonomousSystem"/> + </java-attributes> + </java-type> + + <java-type name="AutonomousSystem"> + <xml-root-element name="autonomous-system"/> + <java-attributes> + <xml-element java-attribute="autonomousSystemId" name="autonomous-system-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="autonomousSystemNumber" name="autonomous-system-number" required="true" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="asn in the range of 0 to 9223372036854775807"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="autonomousSystemType" name="autonomous-system-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="type (global vs. local)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="autonomousSystemRegion" name="autonomous-system-region" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="geographic region"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="autonomousSystemRole" name="autonomous-system-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="role of autonomous system"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Concurrency value"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Description of Autonomous System"/> + <xml-property name="nameProps" value="autonomous-system-id,autonomous-system-number"/> + <xml-property name="indexedProps" value="autonomous-system-id,autonomous-system-number,autonomous-system-type,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="autonomous-system-id"/> + <xml-property name="container" value="autonomous-systems"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/autonomous-systems/autonomous-system/{autonomous-system-id}"/> + <xml-property name="requiredProps" value="autonomous-system-id,autonomous-system-number,autonomous-system-type"/> + </xml-properties> + </java-type> + + <java-type name="NetworkRanges"> + <xml-properties> + <xml-property name="description" value="Collection of Network Ranges"/> + </xml-properties> + <xml-root-element name="network-ranges"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="networkRange" name="network-range" type="inventory.aai.onap.org.v23.NetworkRange"/> + </java-attributes> + </java-type> + <!-- Comments to trigger build --> + <java-type name="NetworkRange"> + <xml-root-element name="network-range"/> + <java-attributes> + <xml-element java-attribute="networkRangeId" name="network-range-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkRangeName" name="network-range-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="name"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkRangeType" name="network-range-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="type (ex, esi, vni, vni-rt, lacp-id)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkRangeRole" name="network-range-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="role of network-range"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkRangeFunction" name="network-range-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="descriptive function"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="startRange" name="start-range" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="starting range for simple network ranges."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="endRange" name="end-range" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="end range for simple network ranges."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="lastAssigned" name="last-assigned" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="last assigned value for simple network ranges"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="rangeFormat" name="range-format" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Format Decimal, Hexadecimal, etc."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="rangePrefix" name="range-prefix" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Prefix of network range."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Concurrency value"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="activities" name="activities" type="inventory.aai.onap.org.v23.Activities"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Description of Network Range"/> + <xml-property name="nameProps" value="network-range-name,network-range-type"/> + <xml-property name="indexedProps" value="network-range-id,network-range-name,data-owner,data-source,data-source-version"/> + <xml-property name="container" value="network-ranges"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/network-ranges/network-range/{network-range-id}"/> + <xml-property name="requiredProps" value="network-range-id,network-range-name,network-range-type"/> + </xml-properties> + </java-type> + + <java-type name="Mappings"> + <xml-properties> + <xml-property name="description" value="Collection of mappings."/> + </xml-properties> + <xml-root-element name="mappings"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="mapping" name="mapping" type="inventory.aai.onap.org.v23.Mapping"/> + </java-attributes> + </java-type> + + <java-type name="Mapping"> + <xml-root-element name="mapping"/> + <java-attributes> + <xml-element java-attribute="mappingId" name="mapping-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Key for mapping object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="mappingName" name="mapping-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of mapping"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="mappingType" name="mapping-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of mapping."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="mappingRole" name="mapping-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role of mapping"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="mappingFunction" name="mapping-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Function of mapping"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="mappingNumber" name="mapping-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Number of mapping"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="location1" name="location-1" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Location 1"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="location2" name="location-2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Location 2"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="mappingGroupId" name="mapping-group-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Non-unique ID for grouping mappings"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Provision status for the mapping object. Valid values can be found at (https://wiki.web.att.com/display/SPTIIRP/prov-status)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="homedLocation" name="homed-location" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Location the object is homed to"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="plannedLocation" name="planned-location" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Location the object is planned for"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="General mechanism for mapping between instances; cg-nat."/> + <xml-property name="indexedProps" value="mapping-id,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="mapping-id"/> + <xml-property name="container" value="mappings"/> + <xml-property name="namespace" value="network"/> + <xml-property name="uriTemplate" value="/network/mappings/mapping/{mapping-id}"/> + <xml-property name="requiredProps" value="mapping-id"/> + </xml-properties> + </java-type> + + <java-type name="HwComponents"> + <xml-root-element name="hw-components"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="hwComponent" name="hw-component" type="inventory.aai.onap.org.v23.HwComponent"/> + </java-attributes> + <xml-properties> + </xml-properties> + </java-type> + + <java-type name="HwComponent"> + <xml-root-element name="hw-component"/> + <java-attributes> + <xml-element java-attribute="hwComponentId" name="hw-component-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="hwComponentName" name="hw-component-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of hardware component"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="hwComponentType" name="hw-component-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of hardware component"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="hwComponentRole" name="hw-component-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role of hardware component"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="hwComponentFunction" name="hw-component-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Function of hardware component"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="create/update/delete the hw-component node"/> + <xml-property name="indexedProps" value="hw-component-id,data-owner,data-source,data-source-version"/> + <xml-property name="uriTemplate" value="/network/hw-components/hw-component/{hw-component-id}"/> + <xml-property name="requiredProps" value="hw-component-id"/> + <xml-property name="namespace" value="network"/> + <xml-property name="container" value="hw-components"/> + </xml-properties> + </java-type> + + <java-type name="SwComponents"> + <xml-root-element name="sw-components"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="swComponent" name="sw-component" type="inventory.aai.onap.org.v23.SwComponent"/> + </java-attributes> + <xml-properties> + </xml-properties> + </java-type> + + <java-type name="SwComponent"> + <xml-root-element name="sw-component"/> + <java-attributes> + <xml-element java-attribute="swComponentId" name="sw-component-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="swComponentName" name="sw-component-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of software component"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="swComponentType" name="sw-component-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of software component"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="swComponentRole" name="sw-component-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role of software component"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="swComponentFunction" name="sw-component-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Function of software component"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="create/update/delete the sw-component node"/> + <xml-property name="indexedProps" value="sw-component-id,data-owner,data-source,data-source-version"/> + <xml-property name="uriTemplate" value="/network/sw-components/sw-component/{sw-component-id}"/> + <xml-property name="requiredProps" value="sw-component-id"/> + <xml-property name="namespace" value="network"/> + <xml-property name="container" value="sw-components"/> + </xml-properties> + </java-type> + + <java-type name="NetworkRoutes"> + <xml-root-element name="network-routes"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="networkRoute" name="network-route" type="inventory.aai.onap.org.v23.NetworkRoute"/> + </java-attributes> + <xml-properties> + </xml-properties> + </java-type> + + <java-type name="NetworkRoute"> + <xml-root-element name="network-route"/> + <java-attributes> + <xml-element java-attribute="routeId" name="route-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="unique identifier example uuid."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="type" name="type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="used to categorize this object in conjunction with role & function. The most generic category."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="role" name="role" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="used to categorize this object in conjunction with type & function."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="function" name="function" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="used to categorize this object in conjunction with type & role. The most specific category."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipAddress" name="ip-address" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ip address that of the specific network-route."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="prefixLength" name="prefix-length" required="true" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="ip-address prefix length."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nextHop" name="next-hop" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Could be ip-address, hostname, or service-instance."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nextHopType" name="next-hop-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Should be ip-address, hostname, or service-instance to match next-hop."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="metric" name="metric" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Value that is assigned to an IP route for a particular network interface that identifies the cost that is associated with using that route."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="addressFamily" name="address-family" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="whether the route address is ipv4, ipv6."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="This object represents a network route. For instance, host-route, static-route."/> + <xml-property name="indexedProps" value="route-id,type,role,function,ip-address,prefix-length,next-hop,data-owner,data-source,data-source-version"/> + <xml-property name="uriTemplate" value="/network/network-routes/network-route/{route-id}"/> + <xml-property name="requiredProps" value="route-id,type,role,function,ip-address,prefix-length,address-family"/> + <xml-property name="namespace" value="network"/> + <xml-property name="container" value="network-routes"/> + </xml-properties> + </java-type> + + <java-type name="NextHops"> + <xml-root-element name="next-hops"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="nextHop" name="next-hop" type="inventory.aai.onap.org.v23.NextHop"/> + </java-attributes> + <xml-properties> + </xml-properties> + </java-type> + + <java-type name="NextHop"> + <xml-root-element name="next-hop"/> + <java-attributes> + <xml-element java-attribute="nextHopId" name="next-hop-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nextHopType" name="next-hop-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to categorize this object in conjunction with role & function. The most generic category."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nextHopRole" name="next-hop-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to categorize this object in conjunction with type & function."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nextHopFunction" name="next-hop-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to categorize this object in conjunction with type & role. The most specific category."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="sequence" name="sequence" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Sequence number."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="addressFamily" name="address-family" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Ipv4 or Ipv6."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipAddress" name="ip-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Next hop ip-address."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="metric" name="metric" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Cost that is associated with using the route."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Is among the series of routers that are connected together in a network and is the next possible destination for a data packet."/> + <xml-property name="indexedProps" value="next-hop-id,data-owner,data-source,data-source-version"/> + <xml-property name="namespace" value="network"/> + <xml-property name="container" value="next-hops"/> + <xml-property name="uriTemplate" value="/network/next-hops/next-hop/{next-hop-id}"/> + <xml-property name="uniqueProps" value="next-hop-id"/> + <xml-property name="requiredProps" value="next-hop-id,next-hop-type"/> + </xml-properties> + </java-type> + + <java-type name="Bfds"> + <xml-root-element name="bfds"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="bfd" name="bfd" type="inventory.aai.onap.org.v23.Bfd"/> + </java-attributes> + <xml-properties> + </xml-properties> + </java-type> + + <java-type name="Bfd"> + <xml-root-element name="bfd"/> + <java-attributes> + <xml-element java-attribute="bfdId" name="bfd-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="bfdType" name="bfd-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to categorize this object in conjunction with role & function. The most generic category."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="bfdRole" name="bfd-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to categorize this object in conjunction with type & function."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="bfdFunction" name="bfd-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to categorize this object in conjunction with type & role. The most specific category."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="bfdKeepAlive" name="bfd-keep-alive" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="bfd keep-alive parameter"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="bfdTimeout" name="bfd-timeout" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="bfd timeout parameter"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="BFD (Bidirectional Forwarding Detection) is a protocol for detecting link failures.The BFD object is for persisting attributes for the links that have BFD enabled."/> + <xml-property name="indexedProps" value="bfd-id,data-owner,data-source,data-source-version"/> + <xml-property name="namespace" value="network"/> + <xml-property name="container" value="bfds"/> + <xml-property name="uriTemplate" value="/network/bfds/bfd/{bfd-id}"/> + <xml-property name="uniqueProps" value="bfd-id"/> + <xml-property name="requiredProps" value="bfd-id,bfd-type"/> + <xml-property name="nameProps" value="bfd-id"/> + </xml-properties> + </java-type> + + <java-type name="Fqdns"> + <xml-root-element name="fqdns"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="fqdn" name="fqdn" type="inventory.aai.onap.org.v23.Fqdn"/> + </java-attributes> + <xml-properties> + </xml-properties> + </java-type> + + <java-type name="Fqdn"> + <xml-root-element name="fqdn"/> + <java-attributes> + <xml-element java-attribute="fqdn" name="fqdn" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Fully qualified domain name."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="fqdnType" name="fqdn-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to categorize this object in conjunction with role & function. The most generic category."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="fqdnRole" name="fqdn-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to categorize this object in conjunction with type & function."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="fqdnFunction" name="fqdn-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to categorize this object in conjunction with type & role. The most specific category."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dnsDomain" name="dns-domain" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Domain name."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="A fully qualified domain name (FQDN) is the complete domain name for a specific computer, or host, on the internet."/> + <xml-property name="requiredProps" value="fqdn,dns-domain"/> + <xml-property name="indexedProps" value="fqdn,data-owner,data-source,data-source-version"/> + <xml-property name="namespace" value="network"/> + <xml-property name="container" value="fqdns"/> + <xml-property name="uriTemplate" value="/network/fqdns/fqdn/{fqdn}"/> + </xml-properties> + </java-type> + + <java-type name="RouteTargets"> + <xml-properties> + <xml-property name="description" value="Collection of route target information"/> + </xml-properties> + <xml-root-element name="route-targets"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="routeTarget" name="route-target" type="inventory.aai.onap.org.v23.RouteTarget"/> + </java-attributes> + </java-type> + <java-type name="RouteTarget"> + <xml-root-element name="route-target"/> + <java-attributes> + <xml-element java-attribute="globalRouteTarget" name="global-route-target" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Number used to identify an RT, globally unique in the network"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="routeTargetRole" name="route-target-role" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Role assigned to this route target"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This object captures the Route target information | A&AI clients for this object are typically: CDM/FCT, PINC; BICON, (DMaaP-DCAE,...) |"/> + <xml-property name="container" value="route-targets"/> + <xml-property name="dependentOn" value="vpn-binding,vrf"/> + <xml-property name="canBeLinked" value="true"/> + <xml-property name="uriTemplate" value="/route-targets/route-target/{global-route-target}/{route-target-role}"/> + <xml-property name="requiredProps" value="global-route-target,route-target-role"/> + <xml-property name="indexedProps" value="data-owner,data-source,data-source-version"/> + </xml-properties> + </java-type> + + <java-type name="SriovPfs"> + <xml-properties> + <xml-property name="description" value="Collection of SR-IOV Physical Functions."/> + </xml-properties> + <xml-root-element name="sriov-pfs"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="sriovPf" name="sriov-pf" type="inventory.aai.onap.org.v23.SriovPf"/> + </java-attributes> + </java-type> + <java-type name="SriovPf"> + <xml-root-element name="sriov-pf"/> + <java-attributes> + <xml-element java-attribute="pfPciId" name="pf-pci-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Identifier for the sriov-pf"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="SR-IOV Physical Function"/> + <xml-property name="indexedProps" value="pf-pci-id,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="p-interface"/> + <xml-property name="container" value="sriov-pfs"/> + <xml-property name="uriTemplate" value="/sriov-pfs/sriov-pf/{pf-pci-id}"/> + <xml-property name="requiredProps" value="pf-pci-id"/> + </xml-properties> + </java-type> + + <java-type name="HostRoutes"> + <xml-root-element name="host-routes"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="hostRoute" name="host-route" type="inventory.aai.onap.org.v23.HostRoute"/> + </java-attributes> + </java-type> + <java-type name="HostRoute"> + <xml-root-element name="host-route"/> + <java-attributes> + <xml-element java-attribute="hostRouteId" name="host-route-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="host-route id"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="routePrefix" name="route-prefix" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="subnet prefix"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nextHop" name="next-hop" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Could be ip-address, hostname, or service-instance"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nextHopType" name="next-hop-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Should be ip-address, hostname, or service-instance to match next-hop"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="metric" name="metric" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Value that is assigned to an IP route for a particular network interface that identifies the cost that is associated with using that route."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This object is configured to route packets to a specific host. Host routes are automatically added to the routing table for all IPv4 and IPv6 addresses that are configured on the router. The purpose of a host route is to create a corresponding CEF entry as a receive entry so that the packets destined to this IP address can be processed by the router itself. | A&AI clients for this object are typically: SDNC, (DMaaP-DCAE,...) |"/> + <xml-property name="indexedProps" value="host-route-id,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="subnet"/> + <xml-property name="container" value="host-routes"/> + <xml-property name="uriTemplate" value="/host-routes/host-route/{host-route-id}"/> + </xml-properties> + </java-type> + + <java-type name="VipIpv4AddressList"> + <xml-root-element name="vip-ipv4-address-list"/> + <java-attributes> + <xml-element java-attribute="vipIpv4Address" name="vip-ipv4-address" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="IP address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vipIpv4PrefixLength" name="vip-ipv4-prefix-length" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Prefix length, 32 for single address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdInner" name="vlan-id-inner" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Inner VLAN tag"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Outer VLAN tag"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="isFloating" name="is-floating" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="Indicator of fixed or floating address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of the interface that address belongs to"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronSubnetId" name="neutron-subnet-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron id of subnet that address belongs to"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="opsNote" name="ops-note" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Notes to aid OPs in troubleshooting, such as attribute aliases or additional descriptions/instructions about an object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="IPv4 Address Range"/> + <xml-property name="indexedProps" value="vip-ipv4-address,vlan-id-inner,neutron-network-id,neutron-subnet-id,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="cloud-region"/> + <xml-property name="uriTemplate" value="/vip-ipv4-address-list/{vip-ipv4-address}"/> + <xml-property name="requiredProps" value="vip-ipv4-address"/> + </xml-properties> + </java-type> + + <java-type name="VipIpv6AddressList"> + <xml-root-element name="vip-ipv6-address-list"/> + <java-attributes> + <xml-element java-attribute="vipIpv6Address" name="vip-ipv6-address" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="IP address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vipIpv6PrefixLength" name="vip-ipv6-prefix-length" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Prefix length, 128 for single address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdInner" name="vlan-id-inner" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Inner VLAN tag"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Outer VLAN tag"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="isFloating" name="is-floating" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="Indicator of fixed or floating address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of the interface that address belongs to"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronSubnetId" name="neutron-subnet-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron id of subnet that address belongs to"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="opsNote" name="ops-note" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Notes to aid OPs in troubleshooting, such as attribute aliases or additional descriptions/instructions about an object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="IPv6 Address Range"/> + <xml-property name="indexedProps" value="vip-ipv6-address,vlan-id-inner,neutron-network-id,neutron-subnet-id,data-owner,data-source,data-source-version"/> + <xml-property name="dependentOn" value="cloud-region"/> + <xml-property name="uriTemplate" value="/vip-ipv6-address-list/{vip-ipv6-address}"/> + <xml-property name="requiredProps" value="vip-ipv6-address"/> + </xml-properties> + </java-type> + + <java-type name="OperationalEnvironments"> + <xml-properties> + <xml-property name="description" value="a logical partition of the cloud which allows to have multiple environments in the production AIC."/> + </xml-properties> + <xml-root-element name="operational-environments"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="operationalEnvironment" name="operational-environment" type="inventory.aai.onap.org.v23.OperationalEnvironment"/> + </java-attributes> + <xml-properties> + <xml-property name="maximumDepth" value="0"/> + </xml-properties> + </java-type> + + <java-type name="OperationalEnvironment"> + <xml-root-element name="operational-environment"/> + <java-attributes> + <xml-element java-attribute="operationalEnvironmentId" name="operational-environment-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID of an operational environment"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalEnvironmentName" name="operational-environment-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Operational Environment name"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalEnvironmentType" name="operational-environment-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Operational Environment Type."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalEnvironmentStatus" name="operational-environment-status" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Status"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="tenantContext" name="tenant-context" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Tenant Context."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="workloadContext" name="workload-context" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Workload Context."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This is the logical partition of the cloud which allows to have multiple environments in the production AIC. Node was introduced to support Tenant Isolation capability to establish operational environments that allows different virtual network functions to be loaded on the same cloud infrastructure but kept physically and logically separate. Operation-environment is a logical partition of the cloud which allows to have multiple environments in the production AIC. | A&AI clients for this object are typically: VID, ASDC MSO, BICON, (DMaaP-DCAE,...) |"/> + <xml-property name="indexedProps" value="operational-environment-id,data-owner,data-source,data-source-version"/> + <xml-property name="nameProps" value="operational-environment-name"/> + <xml-property name="uniqueProps" value="operational-environment-id"/> + <xml-property name="container" value="operational-environments"/> + <xml-property name="namespace" value="cloud-infrastructure"/> + <xml-property name="uriTemplate" value="/cloud-infrastructure/operational-environments/operational-environment/{operational-environment-id}"/> + <xml-property name="requiredProps" value="operational-environment-id,operational-environment-name,operational-environment-type,operational-environment-status,tenant-context,workload-context"/> + </xml-properties> + </java-type> + + <java-type name="ForwardingPaths"> + <xml-root-element name="forwarding-paths"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="forwardingPath" name="forwarding-path" type="inventory.aai.onap.org.v23.ForwardingPath"/> + </java-attributes> + </java-type> + + <java-type name="ForwardingPath"> + <xml-root-element name="forwarding-path"/> + <xml-properties> + <xml-property name="namespace" value="network"/> + <xml-property name="indexedProps" value="forwarding-path-id,forwarding-path-name,data-owner,data-source,data-source-version"/> + <xml-property name="description" value="| SE group | This object captures the sequenced forwarding path between interfaces of services or resources | A&AI clients for this object are typically: DCAE-CCS, IDF, (DMaaP-DCAE,...) |"/> + <xml-property name="container" value="forwarding-paths"/> + <xml-property name="nameProps" value="forwarding-path-name"/> + <xml-property name="uniqueProps" value="forwarding-path-id"/> + <xml-property name="uriTemplate" value="/network/forwarding-paths/forwarding-path/{forwarding-path-id}"/> + <xml-property name="requiredProps" value="forwarding-path-id,forwarding-path-name"/> + </xml-properties> + <java-attributes> + <xml-element java-attribute="forwardingPathId" name="forwarding-path-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of this FP"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="forwardingPathName" name="forwarding-path-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the FP"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the self link for this FP"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="forwarders" name="forwarders" type="inventory.aai.onap.org.v23.Forwarders"/> + </java-attributes> + </java-type> + + <java-type name="Forwarders"> + <xml-root-element name="forwarders"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="forwarder" name="forwarder" type="inventory.aai.onap.org.v23.Forwarder"/> + </java-attributes> + </java-type> + + <java-type name="Forwarder"> + <xml-root-element name="forwarder"/> + <xml-properties> + <xml-property name="indexedProps" value="sequence,data-owner,data-source,data-source-version"/> + <xml-property name="description" value="| SE group | This object captures the sequenced segment of forwarding path | A&AI clients for this object are typically: DCAE-CCS, (DMaaP-DCAE,...) |"/> + <xml-property name="container" value="forwarders"/> + <xml-property name="dependentOn" value="forwarding-path"/> + <xml-property name="uriTemplate" value="/forwarders/forwarder/{sequence}"/> + <xml-property name="requiredProps" value="sequence"/> + </xml-properties> + <java-attributes> + <xml-element java-attribute="sequence" name="sequence" required="true" type="java.lang.Integer" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of this segmentation"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="forwarderRole" name="forwarder-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ingress, intermediate, egress"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + + <java-type name="ForwarderEvcs"> + <xml-root-element name="forwarder-evcs"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="forwarderEvc" name="forwarder-evc" type="inventory.aai.onap.org.v23.ForwarderEvc"/> + </java-attributes> + </java-type> + + <java-type name="ForwarderEvc"> + <xml-root-element name="forwarder-evc"/> + <java-attributes> + <xml-element java-attribute="forwarderEvcId" name="forwarder-evc-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Key for forwarder-evc object"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="circuitId" name="circuit-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Circuit ID from customer/ESP/ingress end of EVC, or reference to beater circuit on gateway/network/egress end of EVC"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ivlan" name="ivlan" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Internal VLAN."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="svlan" name="svlan" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="SVLAN value for ingress of egress forwarder."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="cvlan" name="cvlan" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="CVLAN value for ingress of egress forwarder."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanMappings" name="vlan-mappings" type="inventory.aai.onap.org.v23.VlanMappings"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This object is an optional child object of the configuration object. | A&AI clients for this object are typically: APPC, SDNC, (DMaaP-DCAE,...) |"/> + <xml-property name="dependentOn" value="configuration"/> + <xml-property name="uniqueProps" value="forwarder-evc-id"/> + <xml-property name="container" value="forwarder-evcs"/> + <xml-property name="uriTemplate" value="/forwarder-evcs/forwarder-evc/{forwarder-evc-id}"/> + <xml-property name="requiredProps" value="forwarder-evc-id"/> + <xml-property name="indexedProps" value="circuit-id,data-owner,data-source,data-source-version"/> + </xml-properties> + </java-type> + + <java-type name="VlanMappings"> + <xml-properties> + <xml-property name="description" value="Collection of vlan mappings."/> + </xml-properties> + <xml-root-element name="vlan-mappings"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vlanMapping" name="vlan-mapping" type="inventory.aai.onap.org.v23.VlanMapping"/> + </java-attributes> + </java-type> + + <java-type name="VlanMapping"> + <xml-root-element name="vlan-mapping"/> + <java-attributes> + <xml-element java-attribute="vlanMappingId" name="vlan-mapping-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Key for vlan-mapping object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="uniCvlan" name="uni-cvlan" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="CVLAN value from the UNI/ingress side of the SAREA gateway access device."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nniSvlan" name="nni-svlan" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="SVLAN value from the NNI/egress side of the SAREA gateway access device."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nniCvlan" name="nni-cvlan" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="CVLAN value from the NNI/egress side of the SAREA gateway access device."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ivLan" name="ivlan" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The internal VLAN ('IVLAN') value. Specific to Arista devices."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="vlan-mapping object is an optional child object of the forwarder-evc object. A given forwarder-evc object may have multiple vlan-mapping objects."/> + <xml-property name="dependentOn" value="forwarder-evc"/> + <xml-property name="uniqueProps" value="vlan-mapping-id"/> + <xml-property name="container" value="vlan-mappings"/> + <xml-property name="uriTemplate" value="/vlan-mappings/vlan-mapping/{vlan-mapping-id}"/> + <xml-property name="requiredProps" value="vlan-mapping-id"/> + <xml-property name="indexedProps" value="data-owner,data-source,data-source-version"/> + </xml-properties> + </java-type> + + <java-type name="Evcs"> + <xml-root-element name="evcs"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="evc" name="evc" type="inventory.aai.onap.org.v23.Evc"/> + </java-attributes> + </java-type> + + <java-type name="Evc"> + <xml-root-element name="evc"/> + <java-attributes> + <xml-element java-attribute="evcId" name="evc-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique/key field for the evc object"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="forwardingPathTopology" name="forwarding-path-topology" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Point-to-Point, Multi-Point"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="cirValue" name="cir-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Commited Information Rate"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="cirUnits" name="cir-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="CIR units"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="cmtu" name="cmtu" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Size of the Customer Requested MTU (Maximum Transmission Unit)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="connectionDiversityGroupId" name="connection-diversity-group-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Diversity Group ID"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceHours" name="service-hours" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="formerly Performance Group"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="enhancedMulticast" name="enhanced-multicast" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String value indicating whether the EVC uses enhanced multicast. Possible Values: yes/no/[empty string]"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="espEvcCircuitId" name="esp-evc-circuit-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="EVC Circuit ID of ESP EVC"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="espEvcCirValue" name="esp-evc-cir-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Committed Information Rate (For ESP)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="espEvcCirUnits" name="esp-evc-cir-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="CIR units (For ESP)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="espItuCode" name="esp-itu-code" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies ESP"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="collectorPopClli" name="collector-pop-clli" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Collector POP CLLI (from the hostname of the access pnf)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="interConnectTypeIngress" name="inter-connect-type-ingress" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Interconnect type on ingress side of EVC."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="tagmodeAccessIngress" name="tagmode-access-ingress" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="tagode for collector side of EVC"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="tagmodeAccessEgress" name="tagmode-access-egress" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="tagMode for network side of EVC"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="productEntryId" name="product-entry-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Product ID"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This object is an optional child object of the configuration object. | A&AI clients for this object are typically: IDF, SDNC, SDN-GC, (DMaaP-DCAE,...) |"/> + <xml-property name="dependentOn" value="configuration"/> + <xml-property name="uniqueProps" value="evc-id"/> + <xml-property name="container" value="evcs"/> + <xml-property name="uriTemplate" value="/evcs/evc/{evc-id}"/> + <xml-property name="requiredProps" value="evc-id"/> + <xml-property name="indexedProps" value="data-owner,data-source,data-source-version"/> + </xml-properties> + </java-type> + + <java-type name="Collections"> + <xml-root-element name="collections"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="collection" name="collection" type="inventory.aai.onap.org.v23.Collection"/> + </java-attributes> + </java-type> + + <java-type name="Collection"> + <xml-root-element name="collection"/> + <java-attributes> + <xml-element java-attribute="collectionId" name="collection-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Collection Object UUID"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ASDC model id for this resource or service model"/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-version-id"/> + <xml-property name="dbAlias" value="model-invariant-id-local"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Model Version"/> + <xml-property name="visibility" value="deployment"/> + <xml-property name="requires" value="model-invariant-id"/> + <xml-property name="dbAlias" value="model-version-id-local"/> + <xml-property name="privateEdge" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="collectionName" name="collection-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="collection name"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="collectionType" name="collection-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Collection type"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="collectionRole" name="collection-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Collection Role"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="collectionFunction" name="collection-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Collection function"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="orchestration status"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="collectionCustomizationId" name="collection-customization-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the id of all the configuration used to customize the resource for the service"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + </java-attributes> + <xml-properties> + <xml-property name="namespace" value="network"/> + <xml-property name="description" value="| SE group | This object represents the collection resource in the TOSCA model | A&AI clients for this object are typically: (DMaaP-DCAE,...) |"/> + <xml-property name="uniqueProps" value="collection-id"/> + <xml-property name="indexedProps" value="collection-id,model-invariant-id,model-version-id,orchestration-status,data-owner,data-source,data-source-version"/> + <xml-property name="container" value="collections"/> + <xml-property name="uriTemplate" value="/network/collections/collection/{collection-id}"/> + <xml-property name="requiredProps" value="collection-id"/> + </xml-properties> + </java-type> + + <java-type name="Cps"> + <xml-properties> + <xml-property name="description" value="Collection of connection points."/> + </xml-properties> + <xml-root-element name="cps"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="cp" name="cp" type="inventory.aai.onap.org.v23.Cp"/> + </java-attributes> + </java-type> + + <java-type name="Cp"> + <xml-root-element name="cp"/> + <java-attributes> + <xml-element java-attribute="cpInstanceId" name="cp-instance-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of the connection point."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="portId" name="port-id" required="false" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="port index to represent multiple CPs on VNFC connected to same network."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" required="false" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv4AddressList" name="l3-interface-ipv4-address-list" type="inventory.aai.onap.org.v23.L3InterfaceIpv4AddressList"/> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv6AddressList" name="l3-interface-ipv6-address-list" type="inventory.aai.onap.org.v23.L3InterfaceIpv6AddressList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This object captures the point of attachment from services or resources to a virtual link or network. | A&AI clients for this object are typically: DCAE-DTI, (DMaaP-DCAE,...) |"/> + <xml-property name="uniqueProps" value="cp-instance-id"/> + <xml-property name="dependentOn" value="vnfc"/> + <xml-property name="container" value="cps"/> + <xml-property name="uriTemplate" value="/cps/cp/{cp-instance-id}"/> + <xml-property name="requiredProps" value="cp-instance-id"/> + <xml-property name="indexedProps" value="data-owner,data-source,data-source-version"/> + </xml-properties> + </java-type> + + <java-type name="VlanTags"> + <xml-properties> + <xml-property name="description" value="Vlan Tags Assigned out of a Vlan Range"/> + </xml-properties> + <xml-root-element name="vlan-tags"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vlanTag" name="vlan-tag" type="inventory.aai.onap.org.v23.VlanTag"/> + </java-attributes> + </java-type> + <java-type name="VlanTag"> + <xml-root-element name="vlan-tag"/> + <java-attributes> + <xml-element java-attribute="vlanTagId" name="vlan-tag-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Vlan Tag Id"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanTagRole" name="vlan-tag-role" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role assigned to this vlan-tag"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdInner" name="vlan-id-inner" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Inner VLAN tag"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Outer VLAN tag"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="isPrivate" name="is-private" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="is private flag."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanTagType" name="vlan-tag-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="VLAN tag Type"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanTagFunction" name="vlan-tag-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="VLAN Tag Function"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="configPhase" name="config-phase" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The config-phase associated with this vlan-tag"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="vlan tag information"/> + <xml-property name="container" value="vlan-tags"/> + <xml-property name="dependentOn" value="vlan-range"/> + <xml-property name="uriTemplate" value="/vlan-tags/vlan-tag/{vlan-tag-id}"/> + <xml-property name="requiredProps" value="vlan-tag-id,vlan-tag-role,is-private"/> + <xml-property name="indexedProps" value="data-owner,data-source,data-source-version,vlan-id-outer"/> + </xml-properties> + </java-type> + + <java-type name="GeoRegions"> + <xml-properties> + <xml-property name="description" value="Collection of geo-regions"/> + </xml-properties> + <xml-root-element name="geo-regions"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="geoRegion" name="geo-region" type="inventory.aai.onap.org.v23.GeoRegion"/> + </java-attributes> + </java-type> + + <java-type name="GeoRegion"> + <xml-root-element name="geo-region"/> + <java-attributes> + <xml-element java-attribute="geoRegionId" name="geo-region-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID, key for geo-region object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="geoRegionName" name="geo-region-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of geo-region"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="geoRegionType" name="geo-region-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of geo-region"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="geoRegionRole" name="geo-region-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role of geo-region"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="geoRegionFunction" name="geo-region-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Function of geo-region"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Top level node for a cg-nat geographical region."/> + <xml-property name="indexedProps" value="geo-region-id,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="geo-region-id"/> + <xml-property name="container" value="geo-regions"/> + <xml-property name="namespace" value="cloud-infrastructure"/> + <xml-property name="uriTemplate" value="/cloud-infrastructure/geo-regions/geo-region/{geo-region-id}"/> + <xml-property name="requiredProps" value="geo-region-id"/> + </xml-properties> + </java-type> + + <java-type name="NetworkTechnologies"> + <xml-properties> + <xml-property name="description" value=" The network-technology object is used to capture the supported network technologies of a cloud-region."/> + </xml-properties> + <xml-root-element name="network-technologies"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="networkTechnology" name="network-technology" type="inventory.aai.onap.org.v23.NetworkTechnology"/> + </java-attributes> + <xml-properties> + <xml-property name="maximumDepth" value="0"/> + </xml-properties> + </java-type> + + <java-type name="NetworkTechnology"> + <xml-root-element name="network-technology"/> + <java-attributes> + <xml-element java-attribute="networkTechnologyId" name="network-technology-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier of the network-technology object (UUID)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkTechnologyName" name="network-technology-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The network-technology that a cloud-region can support. Current valid values- CONTRAIL AIC_SR_IOV OVS STANDARD-SR-IOV"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This object captures the supported network technologies of a cloud-region. | A&AI clients for this object are typically: RO, AAI-TOOLS, (DMaaP-DCAE,...) |"/> + <xml-property name="nameProps" value="network-technology-id,network-technology-name"/> + <xml-property name="uniqueProps" value="network-technology-id"/> + <xml-property name="container" value="network-technologies"/> + <xml-property name="namespace" value="cloud-infrastructure"/> + <xml-property name="uriTemplate" value="/cloud-infrastructure/network-technologies/network-technology/{network-technology-id}"/> + <xml-property name="requiredProps" value="network-technology-id,network-technology-name"/> + <xml-property name="indexedProps" value="data-owner,data-source,data-source-version"/> + </xml-properties> + </java-type> + + <java-type name="Common"> + <xml-properties> + <xml-property name="description" value="Namespace for common inventory resources."/> + </xml-properties> + <xml-root-element name="common"/> + <java-attributes> + <xml-element java-attribute="hardwareCatalogItems" name="hardware-catalog-items" type="inventory.aai.onap.org.v23.HardwareCatalogItems"/> + <xml-element java-attribute="profiles" name="profiles" type="inventory.aai.onap.org.v23.Profiles"/> + <xml-element java-attribute="contacts" name="contacts" type="inventory.aai.onap.org.v23.Contacts"/> + <xml-element java-attribute="objectGroups" name="object-groups" type="inventory.aai.onap.org.v23.ObjectGroups"/> + <xml-element java-attribute="policies" name="policies" type="inventory.aai.onap.org.v23.Policies"/> + <xml-element java-attribute="vlanCharacteristics" name="vlan-characteristics" type="inventory.aai.onap.org.v23.VlanCharacteristics"/> + <xml-element java-attribute="relationshipRules" name="relationship-rules" type="inventory.aai.onap.org.v23.RelationshipRules"/> + </java-attributes> + </java-type> + + <java-type name="HardwareCatalogItems"> + <xml-properties> + <xml-property name="description" value="Collection of hardware-catalog-items"/> + </xml-properties> + <xml-root-element name="hardware-catalog-items"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="hardwareCatalogItem" name="hardware-catalog-item" type="inventory.aai.onap.org.v23.HardwareCatalogItem"/> + </java-attributes> + </java-type> + + <java-type name="HardwareCatalogItem"> + <xml-root-element name="hardware-catalog-item"/> + <java-attributes> + <xml-element java-attribute="itemName" name="item-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique name for the hardware-catalog-item"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="systemType" name="system-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of system defined by ATT"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="manufacturer" name="manufacturer" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Manufacturer of the hardware-catalog-item (ex,Cisco)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="model" name="model" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Model of the hardware-catalog-item (ex,5501 NCS)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="partNumber" name="part-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Part number assigned by the manufacturer"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="description" name="description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Description of the hardware-catalog-item"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="sku" name="sku" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Stock-keeping-unit (ATT specific identifier for the hardware-catalog-item)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="describes an hardware-catalog-items"/> + <xml-property name="indexedProps" value="item-name,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="item-name"/> + <xml-property name="container" value="hardware-catalog-items"/> + <xml-property name="namespace" value="common"/> + <xml-property name="uriTemplate" value="/common/hardware-catalog-items/hardware-catalog-item/{item-name}"/> + <xml-property name="requiredProps" value="item-name,system-type,manufacturer,model,sku"/> + </xml-properties> + </java-type> + + <java-type name="Profiles"> + <xml-properties> + <xml-property name="description" value="Collection of profiles"/> + </xml-properties> + <xml-root-element name="profiles"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="profile" name="profile" type="inventory.aai.onap.org.v23.Profile"/> + </java-attributes> + </java-type> + + <java-type name="Profile"> + <xml-root-element name="profile"/> + <java-attributes> + <xml-element java-attribute="profileName" name="profile-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique name for the profile."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="profileType" name="profile-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of profile (ex,network-power-profile)"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="characteristics" name="characteristics" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Set of characteristics of the profile."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="profileSubtype" name="profile-subtype" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Descriptive subtype."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="profileRole" name="profile-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="used to categorize this object in conjunction with profile-type and profile-function."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="profileFunction" name="profile-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="used to categorize this object in conjunction with profile-type and profile-role. The most specific category"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + <xml-element java-attribute="metadata" name="metadata" type="inventory.aai.onap.org.v23.Metadata"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="describes an profiles"/> + <xml-property name="indexedProps" value="profile-name,profile-role,profile-function,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="profile-name"/> + <xml-property name="nameProps" value="profile-type"/> + <xml-property name="container" value="profiles"/> + <xml-property name="namespace" value="common"/> + <xml-property name="uriTemplate" value="/common/profiles/profile/{profile-name}"/> + <xml-property name="requiredProps" value="profile-name,profile-type,characteristics"/> + </xml-properties> + </java-type> + + <java-type name="Contacts"> + <xml-properties> + <xml-property name="description" value="Collection of contacts"/> + </xml-properties> + <xml-root-element name="contacts"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="contact" name="contact" type="inventory.aai.onap.org.v23.Contact"/> + </java-attributes> + </java-type> + <java-type name="Contact"> + <xml-root-element name="contact"/> + <java-attributes> + <xml-element java-attribute="contactName" name="contact-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name of the contact"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="contactTelephone" name="contact-telephone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Tel no. of contact"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="contactEmail" name="contact-email" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="e-mail of contact"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="vendorType" name="vendor-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="NI (Network Integrator)SI (System Integrator) 3rd Party LCM"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | This object captures the vendor information and have a relationship to the generic-vnf. This will be populated by SDN-GC | A&AI clients for this object are typically: (DMaaP-DCAE,...) |"/> + <xml-property name="uniqueProps" value="contact-name"/> + <xml-property name="container" value="contacts"/> + <xml-property name="namespace" value="common"/> + <xml-property name="nameProps" value="contact-name,vendor-type"/> + <xml-property name="uriTemplate" value="/common/contacts/contact/{contact-name}"/> + <xml-property name="requiredProps" value="contact-name"/> + <xml-property name="indexedProps" value="data-owner,data-source,data-source-version"/> + </xml-properties> + </java-type> + + <java-type name="ObjectGroups"> + <xml-properties> + <xml-property name="description" value="Collection of object-groups"/> + </xml-properties> + <xml-root-element name="object-groups"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="objectGroup" name="object-group" type="inventory.aai.onap.org.v23.ObjectGroup"/> + </java-attributes> + </java-type> + + <java-type name="ObjectGroup"> + <xml-root-element name="object-group"/> + <java-attributes> + <xml-element java-attribute="objectGroupId" name="object-group-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="groupType" name="group-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of object contained in the list."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="groupName" name="group-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the list."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="groupName2" name="group-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alias name for object-group"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="version" name="version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="used to track the versions of the object"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="communityList" name="community-list" type="inventory.aai.onap.org.v23.CommunityList"/> + <xml-element container-type="java.util.ArrayList" java-attribute="ipAddressList" name="ip-address-list" type="inventory.aai.onap.org.v23.IpAddressList"/> + <xml-element container-type="java.util.ArrayList" java-attribute="portList" name="port-list" type="inventory.aai.onap.org.v23.PortList"/> + <xml-element container-type="java.util.ArrayList" java-attribute="selectorList" name="selector-list" type="inventory.aai.onap.org.v23.SelectorList"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="describes an object-group"/> + <xml-property name="indexedProps" value="object-group-id,version,data-owner,data-source,data-source-version"/> + <xml-property name="container" value="object-groups"/> + <xml-property name="namespace" value="common"/> + <xml-property name="uriTemplate" value="/common/object-groups/object-group/{object-group-id}"/> + <xml-property name="requiredProps" value="object-group-id,group-type"/> + </xml-properties> + </java-type> + + <java-type name="CommunityList"> + <xml-root-element name="community-list"/> + <java-attributes> + <xml-element java-attribute="communityValue" name="community-value" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="String value"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="type" name="type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String type"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Community List"/> + <xml-property name="dependentOn" value="object-group"/> + <xml-property name="uriTemplate" value="/community-list/{community-value}"/> + <xml-property name="requiredProps" value="community-value"/> + <xml-property name="indexedProps" value="data-owner,data-source,data-source-version"/> + </xml-properties> + </java-type> + + <java-type name="IpAddressList"> + <xml-root-element name="ip-address-list"/> + <java-attributes> + <xml-element java-attribute="ipAddress" name="ip-address" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="IP address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipAddressEnd" name="ip-address-end" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IP address end range"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipVersion" name="ip-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ip version, either 4 or 6"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="type" name="type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="reserved, static, dhcp"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="assignment" name="assignment" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value=""/> + </xml-properties> + </xml-element> + <xml-element java-attribute="operator" name="operator" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Operator to apply to the port (greater than, less than, etc)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="length" name="length" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="ip-address prefix length, 32 for single address."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="IP Address Range"/> + <xml-property name="dependentOn" value="endpoint,subnet,rule,policy,object-group"/> + <xml-property name="uriTemplate" value="/ip-address-list/{ip-address}"/> + <xml-property name="requiredProps" value="ip-address"/> + <xml-property name="indexedProps" value="data-owner,data-source,data-source-version"/> + </xml-properties> + </java-type> + + <java-type name="PortList"> + <xml-root-element name="port-list"/> + <java-attributes> + <xml-element java-attribute="port" name="port" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Port number"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="assignment" name="assignment" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name or assignment for the port"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="type" name="type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type or usage of the port"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="operator" name="operator" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Operator to apply to the port (greater than, less than, etc)."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Port List Range"/> + <xml-property name="dependentOn" value="endpoint,rule,object-group"/> + <xml-property name="uriTemplate" value="/port-list/{port}"/> + <xml-property name="requiredProps" value="port"/> + <xml-property name="indexedProps" value="data-owner,data-source,data-source-version"/> + </xml-properties> + </java-type> + + <java-type name="SelectorList"> + <xml-root-element name="selector-list"/> + <java-attributes> + <xml-element java-attribute="selector" name="selector" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Selector"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="assignment" name="assignment" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name or assignment for the selector"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="type" name="type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type or usage of the selector"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Selectors list"/> + <xml-property name="dependentOn" value="rule,object-group,endpoint,policy"/> + <xml-property name="uriTemplate" value="/selector-list/{selector}"/> + <xml-property name="requiredProps" value="selector"/> + <xml-property name="indexedProps" value="data-owner,data-source,data-source-version"/> + </xml-properties> + </java-type> + + <java-type name="Policies"> + <xml-root-element name="policies"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="policy" name="policy" type="inventory.aai.onap.org.v23.Policy"/> + </java-attributes> + <xml-properties> + </xml-properties> + </java-type> + + <java-type name="Policy"> + <xml-root-element name="policy"/> + <java-attributes> + <xml-element java-attribute="policyId" name="policy-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique Policy UUID."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="policyName" name="policy-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Policy Name"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="policyType" name="policy-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Policy Type"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="policyRole" name="policy-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Policy role"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="policyFunction" name="policy-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="policy function"/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="doNotTrack" name="do-not-track" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Do not track"/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="preDnat" name="pre-dnat" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Pre destination NAT"/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="applyOnForward" name="apply-on-forward" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="apply on forward"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="selector" name="selector" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Host and Interface Type Selector"/> + <xml-property name="dbAlias" value="selector-local"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="order" name="order" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Order"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="version" name="version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Version"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="status" name="status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Status"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="remoteAsn" name="remote-asn" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Remote ASN"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="namespace" name="namespace" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Namespace filter to apply the policy"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="policyDescription" name="policy-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Description of the policy"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="policyVariables" name="policy-variables" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Set of rule variables"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="policyVariableName" name="policy-variable-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Policy Variable Name"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="rules" name="rules" type="inventory.aai.onap.org.v23.Rules"/> + <xml-element container-type="java.util.ArrayList" java-attribute="ipAddressList" name="ip-address-list" type="inventory.aai.onap.org.v23.IpAddressList"/> + <xml-element container-type="java.util.ArrayList" java-attribute="selectorList" name="selector-list" type="inventory.aai.onap.org.v23.SelectorList"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Definition of policy"/> + <xml-property name="indexedProps" value="policy-id,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="policy-id"/> + <xml-property name="container" value="policies"/> + <xml-property name="namespace" value="common"/> + <xml-property name="uriTemplate" value="/common/policies/policy/{policy-id}"/> + <xml-property name="requiredProps" value="policy-id,do-not-track,pre-dnat,apply-on-forward"/> + </xml-properties> + </java-type> + + + <java-type name="Rules"> + <xml-properties> + <xml-property name="description" value="Collection of rules"/> + </xml-properties> + <xml-root-element name="rules"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="rule" name="rule" type="inventory.aai.onap.org.v23.Rule"/> + </java-attributes> + </java-type> + + <java-type name="Rule"> + <xml-root-element name="rule"/> + <java-attributes> + <xml-element java-attribute="ruleId" name="rule-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="direction" name="direction" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ingress or egress"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="protocol" name="protocol" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Positive protocol match. tcp, udp, icmpv6, sctp, udplite, integer 1-255."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="notProtocol" name="not-protocol" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Negative protocol match. tcp, udp, icmpv6, sctp, udplite, integer 1-255."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="action" name="action" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Action to perform when matching this rule."/> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="icmp" name="icmp" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value=""/> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="notIcmp" name="not-icmp" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value=""/> + </xml-properties> + </xml-element> + <xml-element java-attribute="sequence" name="sequence" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Sequence number of the rule."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="threshold" name="threshold" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Threshold"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="status" name="status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="status"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="version" name="version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Version"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="countVariable" name="count-variable" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Named variable used for counting transactions."/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="log" name="log" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Boolean to indicate whether or not logging is required."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="description" name="description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Description."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="ipAddressList" name="ip-address-list" type="inventory.aai.onap.org.v23.IpAddressList"/> + <xml-element container-type="java.util.ArrayList" java-attribute="portList" name="port-list" type="inventory.aai.onap.org.v23.PortList"/> + <xml-element container-type="java.util.ArrayList" java-attribute="selectorList" name="selector-list" type="inventory.aai.onap.org.v23.SelectorList"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="describes an rules"/> + <xml-property name="container" value="rules"/> + <xml-property name="dependentOn" value="policy"/> + <xml-property name="uriTemplate" value="/rules/rule/{rule-id}"/> + <xml-property name="requiredProps" value="rule-id,log"/> + <xml-property name="indexedProps" value="data-owner,data-source,data-source-version"/> + </xml-properties> + </java-type> + + <java-type name="VlanCharacteristics"> + <xml-properties> + <xml-property name="description" value="Collection of vlan characteristics"/> + </xml-properties> + <xml-root-element name="vlan-characteristics"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vlanCharacteristic" name="vlan-characteristic" type="inventory.aai.onap.org.v23.VlanCharacteristic"/> + </java-attributes> + </java-type> + + <java-type name="VlanCharacteristic"> + <xml-root-element name="vlan-characteristic"/> + <java-attributes> + <xml-element java-attribute="vlanCharacteristicId" name="vlan-characteristic-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="rootName" name="root-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="appliesTo" name="applies-to" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Device role the vlan-characteristic applies to (c-agg-leaf-a, c-agg-leaf-b, r-leaf)."/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="dhcpPool" name="dhcp-pool" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="DHCP Agent access."/> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="internetAccess" name="internet-access" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Boolean to represent if requires internet access."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="describes an vlan characteristic"/> + <xml-property name="indexedProps" value="vlan-characteristic-id,data-owner,data-source,data-source-version"/> + <xml-property name="container" value="vlan-characteristics"/> + <xml-property name="namespace" value="common"/> + <xml-property name="uriTemplate" value="/common/vlan-characteristics/vlan-characteristic/{vlan-characteristic-id}"/> + <xml-property name="requiredProps" value="vlan-characteristic-id,dhcp-pool,internet-access"/> + </xml-properties> + </java-type> + + <java-type name="RelationshipRules"> + <xml-properties> + <xml-property name="description" value="Collection of relationship rules"/> + </xml-properties> + <xml-root-element name="relationship-rules"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="relationshipRule" name="relationship-rule" type="inventory.aai.onap.org.v23.RelationshipRule"/> + </java-attributes> + </java-type> + + <java-type name="RelationshipRule"> + <xml-root-element name="relationship-rule"/> + <java-attributes> + <xml-element java-attribute="ruleId" name="rule-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="context" name="context" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Example global,site"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ruleTraversals" name="rule-traversals" required="true" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Number of traversals"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="appliesTo" name="applies-to" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Node the related object applies to"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipComponents" name="relationship-components" type="inventory.aai.onap.org.v23.RelationshipComponents"/> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="describes an relationship rule"/> + <xml-property name="indexedProps" value="rule-id,context,rule-traversals,applies-to,data-owner,data-source,data-source-version"/> + <xml-property name="uniqueProps" value="rule-id"/> + <xml-property name="container" value="relationship-rules"/> + <xml-property name="namespace" value="common"/> + <xml-property name="uriTemplate" value="/common/relationship-rules/relationship-rule/{rule-id}"/> + <xml-property name="requiredProps" value="rule-id,context,rule-traversals,applies-to"/> + </xml-properties> + </java-type> + + <java-type name="RelationshipComponents"> + <xml-properties> + <xml-property name="description" value="Collection of relationship components"/> + </xml-properties> + <xml-root-element name="relationship-components"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="relationshipComponent" name="relationship-component" type="inventory.aai.onap.org.v23.RelationshipComponent"/> + </java-attributes> + </java-type> + + <java-type name="RelationshipComponent"> + <xml-root-element name="relationship-component"/> + <java-attributes> + <xml-element java-attribute="ruleNode" name="rule-node" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="NARAD object"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ruleProperty" name="rule-property" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Object property"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ruleValue" name="rule-value" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Property value"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="componentOrder" name="component-order" required="true" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Order in traversal"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="describes an relationship component"/> + <xml-property name="indexedProps" value="rule-node,rule-property,rule-value,component-order,data-owner,data-source,data-source-version"/> + <xml-property name="container" value="relationship-components"/> + <xml-property name="dependentOn" value="relationship-rule"/> + <xml-property name="uriTemplate" value="common/relationship-components/relationship-component/{rule-node}"/> + <xml-property name="requiredProps" value="rule-node,rule-property,rule-value,component-order"/> + </xml-properties> + </java-type> + + <java-type name="AggregateRoutes"> + <xml-properties> + <xml-property name="description" value="Collection of aggregate routes."/> + </xml-properties> + <xml-root-element name="aggregate-routes"/> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="aggregateRoute" name="aggregate-route" type="inventory.aai.onap.org.v23.AggregateRoute"/> + </java-attributes> + </java-type> + + <java-type name="AggregateRoute"> + <xml-root-element name="aggregate-route"/> + <java-attributes> + <xml-element java-attribute="aggRouteId" name="agg-route-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Route UUID."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkStartAddress" name="network-start-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the forwarding-path"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="cidrMask" name="cidr-mask" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="CIDR-mask for aggregate route subnet"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipVersion" name="ip-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies is aggregate route is ipv4 or ipv6"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkAddress" name="network-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Network Address"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="nextHop" name="next-hop" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Next Hop"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="routePath" name="route-path" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Route Path"/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataOwner" name="data-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the entity that is responsible managing this inventory object."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSource" name="data-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the upstream source of the data."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataSourceVersion" name="data-source-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Identifies the version of the upstream source."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete."/> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v23.RelationshipList"/> + </java-attributes> + <xml-properties> + <xml-property name="description" value="| SE group | Configs of this object are used on D2 IPEs for the Voice services. SDNC will create these objects and write them to AAI. | A&AI clients for this object are typically: CDM, NLS, (DMaaP-DCAE,...) |"/> + <xml-property name="indexedProps" value="agg-route-id,data-owner,data-source,data-source-version"/> + <xml-property name="container" value="aggregate-routes"/> + <xml-property name="dependentOn" value="vrf,l3-network"/> + <xml-property name="uriTemplate" value="/aggregate-routes/aggregate-route/{agg-route-id}"/> + <xml-property name="requiredProps" value="agg-route-id"/> + </xml-properties> + </java-type> + + </java-types> +</xml-bindings>
\ No newline at end of file diff --git a/src/app/assets/configuration/aai/reference/types.json b/src/app/assets/configuration/aai/reference/types.json new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/src/app/assets/configuration/aai/reference/types.json @@ -0,0 +1 @@ +[] diff --git a/src/app/assets/configuration/app_config.json b/src/app/assets/configuration/app_config.json new file mode 100644 index 0000000..a66c872 --- /dev/null +++ b/src/app/assets/configuration/app_config.json @@ -0,0 +1,11 @@ +{ + + "AAI":{ + "TITLE": "A&AI", + "OXM": "oxm.xml", + "INVLIST": "InvList.json", + "CUSTQUERYLIST": "CustomQueryList.json" + }, + "APP_TITLE_REGX": "\/services\/(\\w+)", + "APP_TITLE_REGX_LOCAL": "\/(\\w+)/#" +} diff --git a/src/app/assets/configuration/dsl_detailedHelp.json b/src/app/assets/configuration/dsl_detailedHelp.json new file mode 100644 index 0000000..29d7b8e --- /dev/null +++ b/src/app/assets/configuration/dsl_detailedHelp.json @@ -0,0 +1,153 @@ +{ + "simple": { + "abstract" : "Easy queries to display a node with properties", + "notation": [ + { + "notation": "complex*('key','value')", + "description": "Display Complex with key=value" + }, + { + "notation": "complex*('key1','val1')('key2','val2')", + "description": "Display Complex with key1=val1 AND key2=val2" + }, + { + "notation": "complex*('key1','val1')!('key2','val2')", + "description": "Negation - Display Complex with key1=val1 AND key2!=val2" + }, + { + "notation": "complex*!('key1','val1')!('key2','val2')", + "description": "Negation - Display Complex with key1!=val1 AND key2!=val2" + } + ] + }, + "traversal":{ + "abstract" : "Build a Query to traverse from one node to the next", + "notation": [ + { + "notation": "complex*('country','val') > cloud-region*", + "description": "Traverse from Complex to Cloud-region and Display Complexes and Cloud-Regions" + }, + { + "notation": "complex*('country','val') > cloud-region*('key1','val1')('key2''val2')", + "description": "Traverse from Complex to Cloud-region with filters and display Complexes and Cloud-Regions" + }, + { + "notation": "generic-vnf*('nf-type','abc') > vserver > tenant > cloud-region*('key','val') ", + "description": "Chain of traversals " + } + ] + }, + "union": { + "abstract" : "Build a Query to have a union of nodes", + "notation": [ + { + "notation": " complex* (‘key’,’value’) > [cloud-region*, availability-zone*]", + "description": "Display union of nodes" + }, + { + "notation": "generic-vnf('key','val')> [pserver*, vserver > pserver*]", + "description": "Traversal within a Union - Display pserver and vserver for a node" + } + ] + }, + "limit": { + "abstract": "Build a Query to limit the display of nodes", + "notation": [ + { + "notation": " complex*('country','USA') LIMIT 1", + "description": "Display the complex in USA limiting the result to 1 " + }, + { + "notation": "generic-vnf('key','val')> [pserver*, vserver > pserver*] LIMIT 5", + "description": "Display the first 5 pservers in a generic-vnf" + } + ] + }, + "topology": { + "abstract" : "Commonly used topology Queries", + "notation": [ + { + "notation": " generic-vnf('key','val')> [vnfc*, vserver*, pnf*, pserver*, vserver > pserver*]", + "description": "Display the fn-topology " + }, + { + "notation": "pnf > [complex* , p-interface* > physical-links* > p-interface >[ pserver* , pnf*]", + "description": "Display the pnf topology" + } + ] + }, + "negation": { + "abstract": "Build a NOT Query ", + "notation": [ + { + "notation": " complex*!('country','USA') LIMIT 1", + "description": "Display the complex NOT in USA " + }, + { + "notation": "complex > [cloud-region*, availability-zone*!('hypervisor-type','VMWare')]", + "description": "Display availability-zone which does NOT have hypervisor=VMWare" + } + ] + }, + "advanced": { + "abstract": "Build an Advanced Query ", + "notation": [ + { + "notation": "complex*('key',EQ('value'))", + "description": "EQ = equals" + }, + { + "notation": "complex*('key',NEQ('value'))", + "description": "NEQ = not equals" + }, + { + "notation": "complex*('key',GT('value'))", + "description": "GT = greater than" + }, + { + "notation": "complex*('key',LT('value'))", + "description": "LT = less than" + }, + { + "notation": "complex*('key',GTE('value'))", + "description": "GTE = greater than or equal" + }, + { + "notation": "complex*('key',LTE('value'))", + "description": "LTE = less than or equal" + }, + { + "notation": "complex*('key',REGEX('^.*value'))", + "description": "REGEX = Matching a given POSIX regular expressions pattern" + }, + { + "notation": "complex*('key',NOT_REGEX('^.*value'))", + "description": "NOT_REGEX = Not matching a given POSIX regular expression pattern" + }, + { + "notation": "complex*('key', CONTAINS('value'))", + "description": "CONTAINS = containing the string" + }, + { + "notation": "complex*('key',NOT_CONTAINS('value'))", + "description": "NOT_CONTAINS = not containing the string" + }, + { + "notation": "complex*('key',STARTS_WITH('value'))", + "description": "STARTS_WITH = Starting with the string" + }, + { + "notation": "complex*('key',NOT_STARTS_WITH('value'))", + "description": "NOT_STARTS_WITH = Not starting with the string" + }, + { + "notation": "complex*('key',ENDS_WITH('value'))", + "description": "ENDS_WITH = Ending with the string" + }, + { + "notation": "complex*('key',NOT_ENDS_WITH('value'))", + "description": "NOT_ENDS_WITH = Not ending with the string" + } + ] + } +}
\ No newline at end of file diff --git a/src/app/assets/configuration/dsl_hints.json b/src/app/assets/configuration/dsl_hints.json new file mode 100644 index 0000000..b90d9c4 --- /dev/null +++ b/src/app/assets/configuration/dsl_hints.json @@ -0,0 +1,36 @@ +{ + + "notation01": { + "notation": "complex*", + "description": "Display Complex" + }, + "notation02": { + "notation": "complex*(<Indexed Parameter>,<value>)", + "description": "Display Complex by Indexed Parameter" + }, + "notation03": { + "notation": "complex(<Indexed Parameter>,<value>) > cloud-region*", + "description": "Traverse from Complex to Cloud-region" + }, + "notation05": { + "notation": "Asterix *", + "description": "Select *" + }, + "notation06": { + "notation": " complex > [cloud-region*, availability-zone*]", + "description": "Display union of nodes" + }, + "notation07": { + "notation": "Negation !", + "description": "Negation" + }, + "notation08": { + "notation": "LIMIT", + "description": "Limit the results" + }, + "notation09": { + "notation": "Alt+H", + "description": "Inline Help Page" + } + +}
\ No newline at end of file diff --git a/src/app/assets/configuration/test.json b/src/app/assets/configuration/test.json new file mode 100644 index 0000000..ce5313b --- /dev/null +++ b/src/app/assets/configuration/test.json @@ -0,0 +1,348 @@ +[ + { + "properties": { + "as-number": "", + "encrypted-access-flag": "", + "entitlement-assignment-group-uuid": "", + "entitlement-resource-uuid": "", + "equipment-role": "", + "heat-stack-id": "", + "in-maint": true, + "ipv4-loopback0-address": "ipv4-loopback0-address-ALL-GOOD-one", + "ipv4-oam-address": "", + "ipv4-oam-gateway-address": "", + "ipv4-oam-gateway-address-prefix-length": "", + "is-closed-loop-disabled": "", + "license-assignment-group-uuid": "", + "license-key": "", + "license-key-uuid": "", + "management-option": "", + "management-v6-address": "", + "model-customization-id": "", + "model-invariant-id": "", + "model-version-id": "", + "mso-catalog-key": "", + "nf-function": "", + "nf-naming-code": "", + "nf-role": "", + "nf-type": "", + "nm-lan-v6-address": "", + "nm-profile-name": "", + "operational-status": "", + "orchestration-status": "ACTIVE", + "persona-model-version": "", + "prov-status": "PROV", + "regional-resource-subzone": "", + "regional-resource-zone": "", + "resource-version": "1559248669411", + "selflink": "", + "service-id": "", + "summary-status": "", + "vcpu": "", + "vcpu-units": "", + "vdisk": "", + "vdisk-units": "", + "vlan-id-outer": "", + "vmemory": "", + "vmemory-units": "", + "vnf-id": "generic-vnf-sprintathon-0-ABC890", + "vnf-name": "example-vnf-name-val-3979", + "vnf-name2": "", + "vnf-type": "vnf-type-att-sic", + "widget-model-id": "", + "widget-model-version": "" + }, + "node-type": "generic-vnf", + "uri": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-sprintathon-0-ABC890" + }, + { + "properties": { + "as-number": "", + "encrypted-access-flag": "", + "entitlement-assignment-group-uuid": "", + "entitlement-resource-uuid": "", + "equipment-role": "", + "heat-stack-id": "", + "in-maint": true, + "ipv4-loopback0-address": "ipv4-loopback0-address-ALL-GOOD-one", + "ipv4-oam-address": "", + "ipv4-oam-gateway-address": "", + "ipv4-oam-gateway-address-prefix-length": "", + "is-closed-loop-disabled": "", + "license-assignment-group-uuid": "", + "license-key": "", + "license-key-uuid": "", + "management-option": "", + "management-v6-address": "", + "model-customization-id": "", + "model-invariant-id": "", + "model-version-id": "", + "mso-catalog-key": "", + "nf-function": "", + "nf-naming-code": "", + "nf-role": "", + "nf-type": "", + "nm-lan-v6-address": "", + "nm-profile-name": "", + "operational-status": "", + "orchestration-status": "ACTIVE", + "persona-model-version": "", + "prov-status": "PROV", + "regional-resource-subzone": "", + "regional-resource-zone": "", + "resource-version": "1559248669411", + "selflink": "", + "service-id": "", + "summary-status": "", + "vcpu": "", + "vcpu-units": "", + "vdisk": "", + "vdisk-units": "", + "vlan-id-outer": "", + "vmemory": "", + "vmemory-units": "", + "vnf-id": "generic-vnf-sprintathon-0-ABC890", + "vnf-name": "example-vnf-name-val-3979", + "vnf-name2": "", + "vnf-type": "vnf-type-att-sic", + "widget-model-id": "", + "widget-model-version": "" + }, + "node-type": "generic-vnf", + "uri": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-sprintathon-0-ABC890" + }, + { + "properties": { + "as-number": "", + "encrypted-access-flag": "", + "entitlement-assignment-group-uuid": "", + "entitlement-resource-uuid": "", + "equipment-role": "", + "heat-stack-id": "", + "in-maint": true, + "ipv4-loopback0-address": "ipv4-loopback0-address-ALL-GOOD-one", + "ipv4-oam-address": "", + "ipv4-oam-gateway-address": "", + "ipv4-oam-gateway-address-prefix-length": "", + "is-closed-loop-disabled": "", + "license-assignment-group-uuid": "", + "license-key": "", + "license-key-uuid": "", + "management-option": "", + "management-v6-address": "", + "model-customization-id": "", + "model-invariant-id": "", + "model-version-id": "", + "mso-catalog-key": "", + "nf-function": "", + "nf-naming-code": "", + "nf-role": "", + "nf-type": "", + "nm-lan-v6-address": "", + "nm-profile-name": "", + "operational-status": "", + "orchestration-status": "ACTIVE", + "persona-model-version": "", + "prov-status": "PROV", + "regional-resource-subzone": "", + "regional-resource-zone": "", + "resource-version": "1559248669411", + "selflink": "", + "service-id": "", + "summary-status": "", + "vcpu": "", + "vcpu-units": "", + "vdisk": "", + "vdisk-units": "", + "vlan-id-outer": "", + "vmemory": "", + "vmemory-units": "", + "vnf-id": "generic-vnf-sprintathon-0-ABC890", + "vnf-name": "example-vnf-name-val-3979", + "vnf-name2": "", + "vnf-type": "vnf-type-att-sic", + "widget-model-id": "", + "widget-model-version": "" + }, + "node-type": "generic-vnf", + "uri": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-sprintathon-0-ABC890" + }, + { + "properties": { + "as-number": "", + "encrypted-access-flag": "", + "entitlement-assignment-group-uuid": "", + "entitlement-resource-uuid": "", + "equipment-role": "", + "heat-stack-id": "", + "in-maint": true, + "ipv4-loopback0-address": "ipv4-loopback0-address-ALL-GOOD-one", + "ipv4-oam-address": "", + "ipv4-oam-gateway-address": "", + "ipv4-oam-gateway-address-prefix-length": "", + "is-closed-loop-disabled": "", + "license-assignment-group-uuid": "", + "license-key": "", + "license-key-uuid": "", + "management-option": "", + "management-v6-address": "", + "model-customization-id": "", + "model-invariant-id": "", + "model-version-id": "", + "mso-catalog-key": "", + "nf-function": "", + "nf-naming-code": "", + "nf-role": "", + "nf-type": "", + "nm-lan-v6-address": "", + "nm-profile-name": "", + "operational-status": "", + "orchestration-status": "ACTIVE", + "persona-model-version": "", + "prov-status": "PROV", + "regional-resource-subzone": "", + "regional-resource-zone": "", + "resource-version": "1559248669411", + "selflink": "", + "service-id": "", + "summary-status": "", + "vcpu": "", + "vcpu-units": "", + "vdisk": "", + "vdisk-units": "", + "vlan-id-outer": "", + "vmemory": "", + "vmemory-units": "", + "vnf-id": "generic-vnf-sprintathon-0-ABC890", + "vnf-name": "example-vnf-name-val-3979", + "vnf-name2": "", + "vnf-type": "vnf-type-att-sic", + "widget-model-id": "", + "widget-model-version": "" + }, + "node-type": "generic-vnf", + "uri": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-sprintathon-0-ABC890" + }, + { + "properties": { + "disk-in-gigabytes": "", + "equip-model": "", + "equip-type": "", + "equip-vendor": "", + "fqdn": "", + "host-profile": "", + "hostname": "pserver-sprintathon-1-ABC890", + "in-maint": "", + "internet-topology": "", + "inv-status": "", + "ipaddress-v4-aim": "", + "ipaddress-v4-loopback-0": "", + "ipaddress-v6-aim": "", + "ipaddress-v6-loopback-0": "", + "ipaddress-v6-oam": "", + "ipv4-oam-address": "", + "management-option": "", + "number-of-cpus": "", + "prov-status": "", + "pserver-id": "", + "pserver-name2": "", + "pserver-selflink": "", + "ptnii-equip-name": "", + "purpose": "", + "ram-in-megabytes": "", + "resource-version": "1558031744715", + "serial-number": "" + }, + "node-type": "pserver", + "uri": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-sprintathon-1-ABC890" + }, + { + "properties": { + "disk-in-gigabytes": "", + "equip-model": "", + "equip-type": "", + "equip-vendor": "", + "fqdn": "", + "host-profile": "", + "hostname": "pserver-sprintathon-1-ABC890", + "in-maint": "", + "internet-topology": "", + "inv-status": "", + "ipaddress-v4-aim": "", + "ipaddress-v4-loopback-0": "", + "ipaddress-v6-aim": "", + "ipaddress-v6-loopback-0": "", + "ipaddress-v6-oam": "", + "ipv4-oam-address": "", + "management-option": "", + "number-of-cpus": "", + "prov-status": "", + "pserver-id": "", + "pserver-name2": "", + "pserver-selflink": "", + "ptnii-equip-name": "", + "purpose": "", + "ram-in-megabytes": "", + "resource-version": "1558031744715", + "serial-number": "" + }, + "node-type": "pserver", + "uri": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-sprintathon-1-ABC890" + }, + { + "properties": { + "disk-in-gigabytes": "", + "equip-model": "", + "equip-type": "", + "equip-vendor": "", + "fqdn": "", + "host-profile": "", + "hostname": "pserver-sprintathon-1-ABC890", + "in-maint": "", + "internet-topology": "", + "inv-status": "", + "ipaddress-v4-aim": "", + "ipaddress-v4-loopback-0": "", + "ipaddress-v6-aim": "", + "ipaddress-v6-loopback-0": "", + "ipaddress-v6-oam": "", + "ipv4-oam-address": "", + "management-option": "", + "number-of-cpus": "", + "prov-status": "", + "pserver-id": "", + "pserver-name2": "", + "pserver-selflink": "", + "ptnii-equip-name": "", + "purpose": "", + "ram-in-megabytes": "", + "resource-version": "1558031744715", + "serial-number": "" + }, + "node-type": "pserver", + "uri": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-sprintathon-1-ABC890" + }, + { + "properties": { + "city": "Test-City", + "complex-name": "complex-name-test-sprintathon-11", + "country": "Test-Country", + "data-center-code": "test-sprintathon-11", + "elevation": "95", + "identity-url": "", + "lata": "example-lata-val-2652", + "latitude": "example-latitude-val-2652", + "longitude": "example-longitude-val-2652", + "physical-location-id": "complex-sprintathon-1-ABC890", + "physical-location-type": "test-lab", + "postal-code": "12345", + "region": "test-region", + "resource-version": "1558031745028", + "state": "TS", + "street1": "Test Street 1", + "street2": "Test Street 2" + }, + "node-type": "complex", + "uri": "/aai/v15/cloud-infrastructure/complexes/complex/complex-sprintathon-1-ABC890" + } +] diff --git a/src/app/assets/stubs/BYOQCommunityQueries.json b/src/app/assets/stubs/BYOQCommunityQueries.json new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/src/app/assets/stubs/BYOQCommunityQueries.json @@ -0,0 +1 @@ +[] diff --git a/src/app/assets/stubs/BYOQDefault.json b/src/app/assets/stubs/BYOQDefault.json new file mode 100644 index 0000000..ce121da --- /dev/null +++ b/src/app/assets/stubs/BYOQDefault.json @@ -0,0 +1,147 @@ +{ + "results": [ + { + "id": "16632", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "properties": { + "vnf-id": "generic-vnf-test-0-ABC890", + "vnf-name": "example-vnf-name-val-3979", + "vnf-type": "vnf-type-onap-sic", + "prov-status": "PROV", + "orchestration-status": "ACTIVE", + "ipv4-loopback0-address": "ipv4-loopback0-address-ALL-GOOD-one", + "in-maint": true, + "is-closed-loop-disabled": false, + "resource-version": "1559248669411" + }, + "related-to": [ + { + "id": "24712", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/entitlements/entitlement/entitlement-test-21-ABC890/entitlement-test-22-ABC890" + }, + { + "id": "28696", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/licenses/license/license-test-1-ABC890/license-test-2-ABC890" + }, + { + "id": "16584", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890/vservers/vserver/vserver-test-3-ABC890" + }, + { + "id": "28864", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890" + } + ] + }, + { + "id": "28696", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/licenses/license/license-test-1-ABC890/license-test-2-ABC890", + "properties": { + "group-uuid": "license-test-1-ABC890", + "resource-uuid": "license-test-2-ABC890", + "resource-version": "1558031870257" + }, + "related-to": [ + { + "id": "16632", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890" + } + ] + }, + { + "id": "24712", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/entitlements/entitlement/entitlement-test-21-ABC890/entitlement-test-22-ABC890", + "properties": { + "group-uuid": "entitlement-test-21-ABC890", + "resource-uuid": "entitlement-test-22-ABC890", + "resource-version": "1558031901455" + }, + "related-to": [ + { + "id": "16632", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890" + } + ] + }, + { + "id": "28864", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890", + "properties": { + "hostname": "pserver-test-1-ABC890", + "in-maint": false, + "resource-version": "1558031744715" + }, + "related-to": [ + { + "id": "16584", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890/vservers/vserver/vserver-test-3-ABC890" + }, + { + "id": "16632", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890" + }, + { + "id": "24600", + "relationship-label": "org.onap.relationships.inventory.LocatedIn", + "node-type": "complex", + "url": "/aai/v15/cloud-infrastructure/complexes/complex/complex-test-1-ABC890" + } + ] + }, + { + "id": "16584", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890/vservers/vserver/vserver-test-3-ABC890", + "properties": { + "vserver-id": "vserver-test-3-ABC890", + "vserver-name": "example-vserver-name-val-30739", + "vserver-name2": "example-vserver-name2-val-67128", + "prov-status": "PROV", + "vserver-selflink": "example-vserver-selflink-val-66843", + "in-maint": true, + "is-closed-loop-disabled": false, + "resource-version": "1558031746466" + }, + "related-to": [ + { + "id": "16632", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890" + }, + { + "id": "20728", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890" + }, + { + "id": "28864", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890" + } + ] + } + ] +} diff --git a/src/app/assets/stubs/BYOQDefaultError.json b/src/app/assets/stubs/BYOQDefaultError.json new file mode 100644 index 0000000..267563f --- /dev/null +++ b/src/app/assets/stubs/BYOQDefaultError.json @@ -0,0 +1,7 @@ +{ + "message": "DSL Query Error:DSL Syntax Error while processing the query :line 1:0 mismatched input '<EOF>' expecting {NUM, ID}", + "details": "uri=/proxy/aai/v15/dsl", + "statusType": "NOT_FOUND", + "status": "404", + "date": "Thu 2019.08.01 at 09:14:51 PM EDT" +}
\ No newline at end of file diff --git a/src/app/assets/stubs/BYOQDeleteQuery.json b/src/app/assets/stubs/BYOQDeleteQuery.json new file mode 100644 index 0000000..f301e64 --- /dev/null +++ b/src/app/assets/stubs/BYOQDeleteQuery.json @@ -0,0 +1 @@ +{"status":"201"}
\ No newline at end of file diff --git a/src/app/assets/stubs/BYOQLargeSet.json b/src/app/assets/stubs/BYOQLargeSet.json new file mode 100644 index 0000000..05842a6 --- /dev/null +++ b/src/app/assets/stubs/BYOQLargeSet.json @@ -0,0 +1,1731 @@ +{ + "results": [ + { + "id": "12440", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-1-EFG567/cr-test-2-EFG567/tenants/tenant/tenant-test-1-EFG567/vservers/vserver/vserver-test-1-EFG567", + "properties": { + "vserver-id": "vserver-test-1-EFG567", + "vserver-name": "example-vserver-name-val-30739", + "vserver-name2": "example-vserver-name2-val-67128", + "prov-status": "PROV", + "vserver-selflink": "example-vserver-selflink-val-66843", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1557861887797" + }, + "related-to": [ + { + "id": "8216", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-1-EFG567/cr-test-2-EFG567/tenants/tenant/tenant-test-1-EFG567" + } + ] + }, + { + "id": "32920", + "node-type": "cloud-region", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/onap-demo-aic/cr-demo-1", + "properties": { + "cloud-owner": "onap-demo-aic", + "cloud-region-id": "cr-demo-1", + "cloud-type": "open-stack-1", + "owner-defined-type": "example-owner-defined-type-val-94072", + "cloud-region-version": "cloud-region-version-val-1", + "identity-url": "example-identity-url-val-74657", + "cloud-zone": "example-cloud-zone-val-17598", + "complex-name": "example-complex-name-val-55430", + "sriov-automation": "true", + "resource-version": "1559204135965" + }, + "related-to": [ + { + "id": "28872", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/onap-demo-aic/cr-demo-1/tenants/tenant/tenant-demo-1" + } + ] + }, + { + "id": "41112", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-demo1", + "properties": { + "vnf-id": "generic-vnf-demo1", + "vnf-type": "example-vnf-type-val-3979-generic-vnf-demo1", + "prov-status": "IN-MAINT", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1559204957136" + }, + "related-to": [ + { + "id": "53264", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-demo-1" + } + ] + }, + { + "id": "4248", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-DEF321/entitlements/entitlement/entitlement-test-21-DEF321/entitlement-test-22-DEF321", + "properties": { + "group-uuid": "entitlement-test-21-DEF321", + "resource-uuid": "entitlement-test-22-DEF321", + "resource-version": "1557779908789" + }, + "related-to": [ + { + "id": "4288", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-DEF321" + } + ] + }, + { + "id": "20728", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890", + "properties": { + "tenant-id": "tenant-test-3-ABC890", + "tenant-name": "tenant-name-test-02", + "resource-version": "1558031745643" + }, + "related-to": [ + { + "id": "16584", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890/vservers/vserver/vserver-test-3-ABC890" + }, + { + "id": "32784", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "cloud-region", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890" + } + ] + }, + { + "id": "49168", + "node-type": "service-subscription", + "url": "/aai/v15/business/customers/customer/customer-test-2-ABC898/service-subscriptions/service-subscription/service-subscription-test-2-ABC898", + "properties": { + "service-type": "service-subscription-test-2-ABC898", + "resource-version": "1558032250686" + }, + "related-to": [ + { + "id": "24784", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "service-instance", + "url": "/aai/v15/business/customers/customer/customer-test-2-ABC898/service-subscriptions/service-subscription/service-subscription-test-2-ABC898/service-instances/service-instance/service-instance-test-2-ABC898" + }, + { + "id": "45072", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "customer", + "url": "/aai/v15/business/customers/customer/customer-test-2-ABC898" + } + ] + }, + { + "id": "4312", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-DEF321", + "properties": { + "hostname": "pserver-test-1-DEF321", + "in-maint": false, + "resource-version": "1557779752363" + }, + "related-to": [ + { + "id": "4288", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-DEF321" + }, + { + "id": "4120", + "relationship-label": "org.onap.relationships.inventory.LocatedIn", + "node-type": "complex", + "url": "/aai/v15/cloud-infrastructure/complexes/complex/complex-test-1-DEF321" + } + ] + }, + { + "id": "20672", + "node-type": "network-profile", + "url": "/aai/v15/cloud-infrastructure/network-profiles/network-profile/nm-profile234ABC123", + "properties": { + "nm-profile-name": "nm-profile234ABC123", + "community-string": "pKFGQ8L", + "resource-version": "1558026194820" + }, + "related-to": [ + { + "id": "16600", + "relationship-label": "org.onap.relationships.inventory.AppliesTo", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123" + } + ] + }, + { + "id": "4344", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABCD1234", + "properties": { + "hostname": "pserver-test-1-ABCD1234", + "in-maint": false, + "resource-version": "1557782182831" + }, + "related-to": [ + { + "id": "12488", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABCD1234" + }, + { + "id": "4304", + "relationship-label": "org.onap.relationships.inventory.LocatedIn", + "node-type": "complex", + "url": "/aai/v15/cloud-infrastructure/complexes/complex/complex-test-1-ABCD1234" + } + ] + }, + { + "id": "40976", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC898/cr-test-4-ABC898/tenants/tenant/tenant-test-2-ABC898", + "properties": { + "tenant-id": "tenant-test-2-ABC898", + "tenant-name": "tenant-name-test-02", + "resource-version": "1558032234242" + }, + "related-to": [ + { + "id": "28808", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC898/cr-test-4-ABC898/tenants/tenant/tenant-test-2-ABC898/vservers/vserver/vserver-test-2-ABC898" + }, + { + "id": "8288", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "cloud-region", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC898/cr-test-4-ABC898" + } + ] + }, + { + "id": "4112", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-DEF321/licenses/license/license-test-1-DEF321/license-test-2-DEF321", + "properties": { + "group-uuid": "license-test-1-DEF321", + "resource-uuid": "license-test-2-DEF321", + "resource-version": "1557779877260" + }, + "related-to": [ + { + "id": "4288", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-DEF321" + } + ] + }, + { + "id": "53264", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-demo-1", + "properties": { + "hostname": "pserver-demo-1", + "in-maint": true, + "resource-version": "1559206657975" + }, + "related-to": [ + { + "id": "32792", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/onap-demo-aic/cr-demo/tenants/tenant/tenant-demo-1/vservers/vserver/vserver-demo" + }, + { + "id": "41112", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-demo1" + }, + { + "id": "45208", + "relationship-label": "org.onap.relationships.inventory.LocatedIn", + "node-type": "complex", + "url": "/aai/v15/cloud-infrastructure/complexes/complex/complex-demo-1" + } + ] + }, + { + "id": "12504", + "node-type": "service-instance", + "url": "/aai/v15/business/customers/customer/customer-test-2-ABC321/service-subscriptions/service-subscription/service-subscription-test-2-ABC321/service-instances/service-instance/service-instance-test-2-ABC321", + "properties": { + "service-instance-id": "service-instance-test-2-ABC321", + "resource-version": "1557862849358" + }, + "related-to": [ + { + "id": "12480", + "relationship-label": "org.onap.relationships.inventory.ComposedOf", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-50-ABC321" + }, + { + "id": "12304", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "service-subscription", + "url": "/aai/v15/business/customers/customer/customer-test-2-ABC321/service-subscriptions/service-subscription/service-subscription-test-2-ABC321" + } + ] + }, + { + "id": "24824", + "node-type": "vnfc", + "url": "/aai/v15/network/vnfcs/vnfc/vnfc-test-2-ABC898", + "properties": { + "vnfc-name": "vnfc-test-2-ABC898", + "nfc-naming-code": "example-vnfc-function-code-val-69324-2", + "nfc-function": "example-vnfc-type-val-25880-2", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1558032266582" + }, + "related-to": [ + { + "id": "37056", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-50-ABC898" + } + ] + }, + { + "id": "16592", + "node-type": "vnfc", + "url": "/aai/v15/network/vnfcs/vnfc/vnfc-test-1-ABC321", + "properties": { + "vnfc-name": "vnfc-test-1-ABC321", + "nfc-naming-code": "example-vnfc-function-code-val-69324", + "nfc-function": "example-vnfc-type-val-25880", + "in-maint": true, + "is-closed-loop-disabled": true, + "resource-version": "1557862848802" + }, + "related-to": [ + { + "id": "12480", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-50-ABC321" + } + ] + }, + { + "id": "4232", + "node-type": "cloud-region", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-1-EFG567/cr-test-2-EFG567", + "properties": { + "cloud-owner": "cr-test-1-EFG567", + "cloud-region-id": "cr-test-2-EFG567", + "cloud-type": "example-cloud-type-val-93696", + "owner-defined-type": "example-owner-defined-type-val-16874", + "cloud-region-version": "example-cloud-region-version-val-20485", + "identity-url": "example-identity-url-val-31885", + "cloud-zone": "example-cloud-zone-val-42889", + "complex-name": "example-complex-name-val-13802", + "resource-version": "1557861810634" + }, + "related-to": [ + { + "id": "8216", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-1-EFG567/cr-test-2-EFG567/tenants/tenant/tenant-test-1-EFG567" + } + ] + }, + { + "id": "28688", + "node-type": "lag-interface", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/lag-interfaces/lag-interface/lagintergace-test01ABC123", + "properties": { + "interface-name": "lagintergace-test01ABC123", + "interface-description": "XSOR", + "resource-version": "1558026222099", + "speed-value": "0Oj", + "speed-units": "RKKRBFy1ykl", + "interface-id": "JpqQrN", + "interface-role": "ETx0i9QKVYIl", + "prov-status": "Bj7ur0n2F4wF", + "in-maint": false + }, + "related-to": [ + { + "id": "16600", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123" + } + ] + }, + { + "id": "16536", + "node-type": "customer", + "url": "/aai/v15/business/customers/customer/customer-test-2-ABC321", + "properties": { + "global-customer-id": "customer-test-2-ABC321", + "subscriber-name": "subscriber-name-test-01", + "subscriber-type": "subscriber-type-test-01", + "resource-version": "1557862833247" + }, + "related-to": [ + { + "id": "12304", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "service-subscription", + "url": "/aai/v15/business/customers/customer/customer-test-2-ABC321/service-subscriptions/service-subscription/service-subscription-test-2-ABC321" + } + ] + }, + { + "id": "37056", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-50-ABC898", + "properties": { + "vnf-id": "generic-vnf-test-50-ABC898", + "vnf-name": "example-vnf-name-val-3979-2", + "vnf-type": "example-vnf-type-val-3979-2", + "prov-status": "ACTIVE", + "orchestration-status": "orchestration-status-2", + "ipv4-loopback0-address": "ipv4-loopback0-address-2", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1558032266879" + }, + "related-to": [ + { + "id": "24784", + "relationship-label": "org.onap.relationships.inventory.ComposedOf", + "node-type": "service-instance", + "url": "/aai/v15/business/customers/customer/customer-test-2-ABC898/service-subscriptions/service-subscription/service-subscription-test-2-ABC898/service-instances/service-instance/service-instance-test-2-ABC898" + }, + { + "id": "24824", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "vnfc", + "url": "/aai/v15/network/vnfcs/vnfc/vnfc-test-2-ABC898" + }, + { + "id": "32960", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "vnfc", + "url": "/aai/v15/network/vnfcs/vnfc/vnfc-test-1-ABC898" + }, + { + "id": "28808", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC898/cr-test-4-ABC898/tenants/tenant/tenant-test-2-ABC898/vservers/vserver/vserver-test-2-ABC898" + } + ] + }, + { + "id": "16600", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123", + "properties": { + "vnf-id": "generic-vnfABC123", + "vnf-type": "example-vnf-type-val-3979-soumya", + "prov-status": "ACTIVE-NO", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1558031116089" + }, + "related-to": [ + { + "id": "20672", + "relationship-label": "org.onap.relationships.inventory.AppliesTo", + "node-type": "network-profile", + "url": "/aai/v15/cloud-infrastructure/network-profiles/network-profile/nm-profile234ABC123" + }, + { + "id": "16576", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "l-interface", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/l-interfaces/l-interface/linterface-keyABC123" + }, + { + "id": "28688", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "lag-interface", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/lag-interfaces/lag-interface/lagintergace-test01ABC123" + }, + { + "id": "24728", + "relationship-label": "org.onap.relationships.inventory.Uses", + "node-type": "vnf-image", + "url": "/aai/v15/service-design-and-creation/vnf-images/vnf-image/image123-testABC123" + } + ] + }, + { + "id": "24712", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/entitlements/entitlement/entitlement-test-21-ABC890/entitlement-test-22-ABC890", + "properties": { + "group-uuid": "entitlement-test-21-ABC890", + "resource-uuid": "entitlement-test-22-ABC890", + "resource-version": "1558031901455" + }, + "related-to": [ + { + "id": "16632", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890" + } + ] + }, + { + "id": "8400", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABCD1234/entitlements/entitlement/entitlement-test-21-ABCD1234/entitlement-test-22-ABCD1234", + "properties": { + "group-uuid": "entitlement-test-21-ABCD1234", + "resource-uuid": "entitlement-test-22-ABCD1234", + "resource-version": "1557782337545" + }, + "related-to": [ + { + "id": "12488", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABCD1234" + } + ] + }, + { + "id": "20616", + "node-type": "l3-interface-ipv6-address-list", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/l-interfaces/l-interface/linterface-keyABC123/vlans/vlan/vlan-interface01ABC123/l3-interface-ipv6-address-list/vlan-ipv6-address01ABC123", + "properties": { + "l3-interface-ipv6-address": "vlan-ipv6-address01ABC123", + "l3-interface-ipv6-prefix-length": 279, + "vlan-id-inner": 434, + "vlan-id-outer": 681, + "is-floating": false, + "resource-version": "1558026232915", + "neutron-network-id": "zd0qx", + "neutron-subnet-id": "seyUc0A" + }, + "related-to": [ + { + "id": "20688", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "vlan", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/l-interfaces/l-interface/linterface-keyABC123/vlans/vlan/vlan-interface01ABC123" + } + ] + }, + { + "id": "45072", + "node-type": "customer", + "url": "/aai/v15/business/customers/customer/customer-test-2-ABC898", + "properties": { + "global-customer-id": "customer-test-2-ABC898", + "subscriber-name": "subscriber-name-test-01", + "subscriber-type": "subscriber-type-test-01", + "resource-version": "1558032250428" + }, + "related-to": [ + { + "id": "49168", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "service-subscription", + "url": "/aai/v15/business/customers/customer/customer-test-2-ABC898/service-subscriptions/service-subscription/service-subscription-test-2-ABC898" + } + ] + }, + { + "id": "16520", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC321/cr-test-4-ABC321/tenants/tenant/tenant-test-2-ABC321/vservers/vserver/vserver-test-2-ABC321", + "properties": { + "vserver-id": "vserver-test-2-ABC321", + "vserver-name": "example-vserver-name-val-30739", + "vserver-name2": "example-vserver-name2-val-67128", + "prov-status": "PROV", + "vserver-selflink": "example-vserver-selflink-val-66843", + "in-maint": true, + "is-closed-loop-disabled": false, + "resource-version": "1557862849507" + }, + "related-to": [ + { + "id": "12480", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-50-ABC321" + }, + { + "id": "8384", + "relationship-label": "tosca.relationships.network.BindsTo", + "node-type": "l-interface", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC321/cr-test-4-ABC321/tenants/tenant/tenant-test-2-ABC321/vservers/vserver/vserver-test-2-ABC321/l-interfaces/l-interface/l-interface-test-2-ABC321" + }, + { + "id": "12424", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC321/cr-test-4-ABC321/tenants/tenant/tenant-test-2-ABC321" + }, + { + "id": "12496", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-2-ABC321" + } + ] + }, + { + "id": "16400", + "node-type": "cloud-region", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/onap-new-aic/newRegId1", + "properties": { + "cloud-owner": "onap-new-aic", + "cloud-region-id": "newRegId1", + "cloud-type": "open-stack-1", + "owner-defined-type": "example-owner-defined-type-val-94072", + "cloud-region-version": "cloud-region-version-val-1", + "identity-url": "example-identity-url-val-74657", + "cloud-zone": "example-cloud-zone-val-17598", + "complex-name": "example-complex-name-val-55430", + "sriov-automation": "true", + "resource-version": "1557865494492" + }, + "related-to": [ + { + "id": "4192", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/onap-new-aic/newRegId1/tenants/tenant/tenant-newTest-8641-example" + } + ] + }, + { + "id": "12312", + "node-type": "complex", + "url": "/aai/v15/cloud-infrastructure/complexes/complex/complex-test-2-ABC321", + "properties": { + "physical-location-id": "complex-test-2-ABC321", + "data-center-code": "test-cityil-test-22", + "complex-name": "complex-name-test-cityil-test-22", + "resource-version": "1557862802171", + "physical-location-type": "test-city-lab", + "street1": "test-street", + "street2": "test-street", + "city": "test-city", + "state": "test-state", + "postal-code": "12345", + "country": "test-country", + "region": "test-region", + "latitude": "example-latitude-val-2652", + "longitude": "example-longitude-val-2652", + "elevation": "95", + "lata": "example-lata-val-2652" + }, + "related-to": [ + { + "id": "12496", + "relationship-label": "org.onap.relationships.inventory.LocatedIn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-2-ABC321" + } + ] + }, + { + "id": "16576", + "node-type": "l-interface", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/l-interfaces/l-interface/linterface-keyABC123", + "properties": { + "interface-name": "linterface-keyABC123", + "interface-role": "example-interface-role-val-9965", + "is-port-mirrored": false, + "resource-version": "1558026216400", + "in-maint": false, + "is-ip-unnumbered": false + }, + "related-to": [ + { + "id": "12536", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "l3-interface-ipv6-address-list", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/l-interfaces/l-interface/linterface-keyABC123/l3-interface-ipv6-address-list/lint-ipv6addressABC123" + }, + { + "id": "24592", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "l3-interface-ipv4-address-list", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/l-interfaces/l-interface/linterface-keyABC123/l3-interface-ipv4-address-list/lint-ipv4addressABC123" + }, + { + "id": "20688", + "relationship-label": "tosca.relationships.network.LinksTo", + "node-type": "vlan", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/l-interfaces/l-interface/linterface-keyABC123/vlans/vlan/vlan-interface01ABC123" + }, + { + "id": "16600", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123" + } + ] + }, + { + "id": "28696", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/licenses/license/license-test-1-ABC890/license-test-2-ABC890", + "properties": { + "group-uuid": "license-test-1-ABC890", + "resource-uuid": "license-test-2-ABC890", + "resource-version": "1558031870257" + }, + "related-to": [ + { + "id": "16632", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890" + } + ] + }, + { + "id": "20496", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/onap-new-aic/newRegId1/tenants/tenant/tenant-newTest-8641-example/vservers/vserver/959798c2-f024-4db5-af72-9860775ab80e-example", + "properties": { + "vserver-id": "959798c2-f024-4db5-af72-9860775ab80e-example", + "vserver-name": "txalle3ravpmaa1", + "vserver-name2": "TXALLE3RAVPMAA1-blah3", + "prov-status": "tr", + "vserver-selflink": "https://test.com:8774/v2/332775c7707b44b7bc990884f97a2366/servers/959798c2-f024-4db5-af72-9860775ab80e-example", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1557866370539" + }, + "related-to": [ + { + "id": "4192", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/onap-new-aic/newRegId1/tenants/tenant/tenant-newTest-8641-example" + } + ] + }, + { + "id": "20680", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-2-ABC898", + "properties": { + "hostname": "pserver-test-2-ABC898", + "in-maint": false, + "resource-version": "1558032218349" + }, + "related-to": [ + { + "id": "28808", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC898/cr-test-4-ABC898/tenants/tenant/tenant-test-2-ABC898/vservers/vserver/vserver-test-2-ABC898" + }, + { + "id": "36880", + "relationship-label": "org.onap.relationships.inventory.LocatedIn", + "node-type": "complex", + "url": "/aai/v15/cloud-infrastructure/complexes/complex/complex-test-2-ABC898" + } + ] + }, + { + "id": "28808", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC898/cr-test-4-ABC898/tenants/tenant/tenant-test-2-ABC898/vservers/vserver/vserver-test-2-ABC898", + "properties": { + "vserver-id": "vserver-test-2-ABC898", + "vserver-name": "example-vserver-name-val-30739", + "vserver-name2": "example-vserver-name2-val-67128", + "prov-status": "PROV", + "vserver-selflink": "example-vserver-selflink-val-66843", + "in-maint": true, + "is-closed-loop-disabled": false, + "resource-version": "1558032267461" + }, + "related-to": [ + { + "id": "37056", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-50-ABC898" + }, + { + "id": "32904", + "relationship-label": "tosca.relationships.network.BindsTo", + "node-type": "l-interface", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC898/cr-test-4-ABC898/tenants/tenant/tenant-test-2-ABC898/vservers/vserver/vserver-test-2-ABC898/l-interfaces/l-interface/l-interface-test-2-ABC898" + }, + { + "id": "40976", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC898/cr-test-4-ABC898/tenants/tenant/tenant-test-2-ABC898" + }, + { + "id": "20680", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-2-ABC898" + } + ] + }, + { + "id": "8216", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-1-EFG567/cr-test-2-EFG567/tenants/tenant/tenant-test-1-EFG567", + "properties": { + "tenant-id": "tenant-test-1-EFG567", + "tenant-name": "tenant-name-test-02", + "resource-version": "1557861811615" + }, + "related-to": [ + { + "id": "12440", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-1-EFG567/cr-test-2-EFG567/tenants/tenant/tenant-test-1-EFG567/vservers/vserver/vserver-test-1-EFG567" + }, + { + "id": "4232", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "cloud-region", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-1-EFG567/cr-test-2-EFG567" + } + ] + }, + { + "id": "12536", + "node-type": "l3-interface-ipv6-address-list", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/l-interfaces/l-interface/linterface-keyABC123/l3-interface-ipv6-address-list/lint-ipv6addressABC123", + "properties": { + "l3-interface-ipv6-address": "lint-ipv6addressABC123", + "l3-interface-ipv6-prefix-length": 279, + "vlan-id-inner": 245, + "vlan-id-outer": 293, + "is-floating": true, + "resource-version": "1558026217589", + "neutron-network-id": "nS0RYB", + "neutron-subnet-id": "bYhOGipdF" + }, + "related-to": [ + { + "id": "16576", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "l-interface", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/l-interfaces/l-interface/linterface-keyABC123" + } + ] + }, + { + "id": "32904", + "node-type": "l-interface", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC898/cr-test-4-ABC898/tenants/tenant/tenant-test-2-ABC898/vservers/vserver/vserver-test-2-ABC898/l-interfaces/l-interface/l-interface-test-2-ABC898", + "properties": { + "interface-name": "l-interface-test-2-ABC898", + "interface-role": "example-interface-role-val-8875", + "is-port-mirrored": false, + "resource-version": "1558032234825", + "in-maint": false, + "is-ip-unnumbered": false + }, + "related-to": [ + { + "id": "28808", + "relationship-label": "tosca.relationships.network.BindsTo", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC898/cr-test-4-ABC898/tenants/tenant/tenant-test-2-ABC898/vservers/vserver/vserver-test-2-ABC898" + } + ] + }, + { + "id": "24768", + "node-type": "l3-interface-ipv4-address-list", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/l-interfaces/l-interface/linterface-keyABC123/vlans/vlan/vlan-interface01ABC123/l3-interface-ipv4-address-list/vlan-ipv6-address01ABC123", + "properties": { + "l3-interface-ipv4-address": "vlan-ipv6-address01ABC123", + "l3-interface-ipv4-prefix-length": 597, + "vlan-id-inner": 782, + "vlan-id-outer": 531, + "is-floating": true, + "resource-version": "1558026227621", + "neutron-network-id": "CltxRWXt3DLak", + "neutron-subnet-id": "KTsBYxU1LvZ" + }, + "related-to": [ + { + "id": "20688", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "vlan", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/l-interfaces/l-interface/linterface-keyABC123/vlans/vlan/vlan-interface01ABC123" + } + ] + }, + { + "id": "24592", + "node-type": "l3-interface-ipv4-address-list", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/l-interfaces/l-interface/linterface-keyABC123/l3-interface-ipv4-address-list/lint-ipv4addressABC123", + "properties": { + "l3-interface-ipv4-address": "lint-ipv4addressABC123", + "l3-interface-ipv4-prefix-length": 110, + "vlan-id-inner": 53, + "vlan-id-outer": 686, + "is-floating": true, + "resource-version": "1558026216993", + "neutron-network-id": "lStCDrB9pp", + "neutron-subnet-id": "2PmMrQCLErF" + }, + "related-to": [ + { + "id": "16576", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "l-interface", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/l-interfaces/l-interface/linterface-keyABC123" + } + ] + }, + { + "id": "32784", + "node-type": "cloud-region", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890", + "properties": { + "cloud-owner": "cr-test-5-ABC890", + "cloud-region-id": "cr-test-6-ABC890", + "cloud-type": "example-cloud-type-val-93696", + "owner-defined-type": "example-owner-defined-type-val-16874", + "cloud-region-version": "example-cloud-region-version-val-20485", + "identity-url": "example-identity-url-val-31885", + "cloud-zone": "example-cloud-zone-val-42889", + "complex-name": "example-complex-name-val-13802", + "resource-version": "1558031745363" + }, + "related-to": [ + { + "id": "20728", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890" + } + ] + }, + { + "id": "4304", + "node-type": "complex", + "url": "/aai/v15/cloud-infrastructure/complexes/complex/complex-test-1-ABCD1234", + "properties": { + "physical-location-id": "complex-test-1-ABCD1234", + "data-center-code": "test-cityil-test-11", + "complex-name": "complex-name-test-cityil-test-11", + "resource-version": "1557782183690", + "physical-location-type": "test-city-lab", + "street1": "test-street", + "street2": "test-street", + "city": "test-city", + "state": "test-state", + "postal-code": "12345", + "country": "test-country", + "region": "test-region", + "latitude": "example-latitude-val-2652", + "longitude": "example-longitude-val-2652", + "elevation": "95", + "lata": "example-lata-val-2652" + }, + "related-to": [ + { + "id": "4344", + "relationship-label": "org.onap.relationships.inventory.LocatedIn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABCD1234" + } + ] + }, + { + "id": "12304", + "node-type": "service-subscription", + "url": "/aai/v15/business/customers/customer/customer-test-2-ABC321/service-subscriptions/service-subscription/service-subscription-test-2-ABC321", + "properties": { + "service-type": "service-subscription-test-2-ABC321", + "resource-version": "1557862833422" + }, + "related-to": [ + { + "id": "12504", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "service-instance", + "url": "/aai/v15/business/customers/customer/customer-test-2-ABC321/service-subscriptions/service-subscription/service-subscription-test-2-ABC321/service-instances/service-instance/service-instance-test-2-ABC321" + }, + { + "id": "16536", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "customer", + "url": "/aai/v15/business/customers/customer/customer-test-2-ABC321" + } + ] + }, + { + "id": "12424", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC321/cr-test-4-ABC321/tenants/tenant/tenant-test-2-ABC321", + "properties": { + "tenant-id": "tenant-test-2-ABC321", + "tenant-name": "tenant-name-test-02", + "resource-version": "1557862817508" + }, + "related-to": [ + { + "id": "16520", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC321/cr-test-4-ABC321/tenants/tenant/tenant-test-2-ABC321/vservers/vserver/vserver-test-2-ABC321" + }, + { + "id": "8328", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "cloud-region", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC321/cr-test-4-ABC321" + } + ] + }, + { + "id": "12488", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABCD1234", + "properties": { + "vnf-id": "generic-vnf-test-0-ABCD1234", + "vnf-name": "example-vnf-name-val-3979", + "vnf-type": "example-vnf-type-val-3979", + "prov-status": "PROV", + "orchestration-status": "ALL-GOOD-orchestration-status", + "ipv4-loopback0-address": "ipv4-loopback0-address-ALL-GOOD-one", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1557782275938" + }, + "related-to": [ + { + "id": "8208", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABCD1234/licenses/license/license-test-1-ABCD1234/license-test-2-ABCD1234" + }, + { + "id": "8400", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABCD1234/entitlements/entitlement/entitlement-test-21-ABCD1234/entitlement-test-22-ABCD1234" + }, + { + "id": "4344", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABCD1234" + } + ] + }, + { + "id": "12480", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-50-ABC321", + "properties": { + "vnf-id": "generic-vnf-test-50-ABC321", + "vnf-name": "example-vnf-name-val-3979-2", + "vnf-type": "example-vnf-type-val-3979-2", + "prov-status": "ACTIVE", + "orchestration-status": "orchestration-status-2", + "ipv4-loopback0-address": "ipv4-loopback0-address-2", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1557862849169" + }, + "related-to": [ + { + "id": "12504", + "relationship-label": "org.onap.relationships.inventory.ComposedOf", + "node-type": "service-instance", + "url": "/aai/v15/business/customers/customer/customer-test-2-ABC321/service-subscriptions/service-subscription/service-subscription-test-2-ABC321/service-instances/service-instance/service-instance-test-2-ABC321" + }, + { + "id": "8440", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "vnfc", + "url": "/aai/v15/network/vnfcs/vnfc/vnfc-test-2-ABC321" + }, + { + "id": "16592", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "vnfc", + "url": "/aai/v15/network/vnfcs/vnfc/vnfc-test-1-ABC321" + }, + { + "id": "16520", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC321/cr-test-4-ABC321/tenants/tenant/tenant-test-2-ABC321/vservers/vserver/vserver-test-2-ABC321" + } + ] + }, + { + "id": "4288", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-DEF321", + "properties": { + "vnf-id": "generic-vnf-test-0-DEF321", + "vnf-name": "example-vnf-name-val-3979", + "vnf-type": "example-vnf-type-val-3979", + "prov-status": "PROV", + "orchestration-status": "ALL-GOOD-orchestration-status", + "ipv4-loopback0-address": "ipv4-loopback0-address-ALL-GOOD-one", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1557779846272" + }, + "related-to": [ + { + "id": "4112", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-DEF321/licenses/license/license-test-1-DEF321/license-test-2-DEF321" + }, + { + "id": "4248", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-DEF321/entitlements/entitlement/entitlement-test-21-DEF321/entitlement-test-22-DEF321" + }, + { + "id": "4312", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-DEF321" + } + ] + }, + { + "id": "24776", + "node-type": "cloud-region", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/onap-demo-aic/cr-demo", + "properties": { + "cloud-owner": "onap-demo-aic", + "cloud-region-id": "cr-demo", + "cloud-type": "open-stack-1", + "owner-defined-type": "example-owner-defined-type-val-94072", + "cloud-region-version": "cloud-region-version-val-1", + "identity-url": "example-identity-url-val-74657", + "cloud-zone": "example-cloud-zone-val-17598", + "complex-name": "example-complex-name-val-55430", + "sriov-automation": "true", + "resource-version": "1559204203167" + }, + "related-to": [ + { + "id": "41152", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/onap-demo-aic/cr-demo/tenants/tenant/tenant-demo-1" + } + ] + }, + { + "id": "41152", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/onap-demo-aic/cr-demo/tenants/tenant/tenant-demo-1", + "properties": { + "tenant-id": "tenant-demo-1", + "tenant-name": "tenant-demo", + "tenant-context": "value-3", + "resource-version": "1559204265043" + }, + "related-to": [ + { + "id": "32792", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/onap-demo-aic/cr-demo/tenants/tenant/tenant-demo-1/vservers/vserver/vserver-demo" + }, + { + "id": "24776", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "cloud-region", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/onap-demo-aic/cr-demo" + } + ] + }, + { + "id": "36880", + "node-type": "complex", + "url": "/aai/v15/cloud-infrastructure/complexes/complex/complex-test-2-ABC898", + "properties": { + "physical-location-id": "complex-test-2-ABC898", + "data-center-code": "test-cityil-test-22", + "complex-name": "complex-name-test-cityil-test-22", + "resource-version": "1558032218687", + "physical-location-type": "test-city-lab", + "street1": "test-street", + "street2": "test-street", + "city": "test-city", + "state": "test-state", + "postal-code": "12345", + "country": "test-country", + "region": "test-region", + "latitude": "example-latitude-val-2652", + "longitude": "example-longitude-val-2652", + "elevation": "95", + "lata": "example-lata-val-2652" + }, + "related-to": [ + { + "id": "20680", + "relationship-label": "org.onap.relationships.inventory.LocatedIn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-2-ABC898" + } + ] + }, + { + "id": "24728", + "node-type": "vnf-image", + "url": "/aai/v15/service-design-and-creation/vnf-images/vnf-image/image123-testABC123", + "properties": { + "vnf-image-uuid": "image123-testABC123", + "application": "YRopOEvVAfskc", + "application-vendor": "5gQvBBKzxfjA", + "application-version": "oPW9s4d2K", + "selflink": "ME24b", + "resource-version": "1558026210135" + }, + "related-to": [ + { + "id": "16600", + "relationship-label": "org.onap.relationships.inventory.Uses", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123" + } + ] + }, + { + "id": "32960", + "node-type": "vnfc", + "url": "/aai/v15/network/vnfcs/vnfc/vnfc-test-1-ABC898", + "properties": { + "vnfc-name": "vnfc-test-1-ABC898", + "nfc-naming-code": "example-vnfc-function-code-val-69324", + "nfc-function": "example-vnfc-type-val-25880", + "in-maint": true, + "is-closed-loop-disabled": true, + "resource-version": "1558032266312" + }, + "related-to": [ + { + "id": "37056", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-50-ABC898" + } + ] + }, + { + "id": "8384", + "node-type": "l-interface", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC321/cr-test-4-ABC321/tenants/tenant/tenant-test-2-ABC321/vservers/vserver/vserver-test-2-ABC321/l-interfaces/l-interface/l-interface-test-2-ABC321", + "properties": { + "interface-name": "l-interface-test-2-ABC321", + "interface-role": "example-interface-role-val-8875", + "is-port-mirrored": false, + "resource-version": "1557862817841", + "in-maint": false, + "is-ip-unnumbered": false + }, + "related-to": [ + { + "id": "16520", + "relationship-label": "tosca.relationships.network.BindsTo", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC321/cr-test-4-ABC321/tenants/tenant/tenant-test-2-ABC321/vservers/vserver/vserver-test-2-ABC321" + } + ] + }, + { + "id": "12496", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-2-ABC321", + "properties": { + "hostname": "pserver-test-2-ABC321", + "in-maint": false, + "resource-version": "1557862801991" + }, + "related-to": [ + { + "id": "16520", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC321/cr-test-4-ABC321/tenants/tenant/tenant-test-2-ABC321/vservers/vserver/vserver-test-2-ABC321" + }, + { + "id": "12312", + "relationship-label": "org.onap.relationships.inventory.LocatedIn", + "node-type": "complex", + "url": "/aai/v15/cloud-infrastructure/complexes/complex/complex-test-2-ABC321" + } + ] + }, + { + "id": "32792", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/onap-demo-aic/cr-demo/tenants/tenant/tenant-demo-1/vservers/vserver/vserver-demo", + "properties": { + "vserver-id": "vserver-demo", + "vserver-name": "nj-vserver-demo", + "vserver-name2": "test-demo-vserver", + "prov-status": "in-maint", + "vserver-selflink": "https://test.com:8774/v2/332775c7707b44b7bc990884f97a2366/servers/959798c2-f024-4db5-af72-9860775ab80e-example", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1559204365308" + }, + "related-to": [ + { + "id": "41152", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/onap-demo-aic/cr-demo/tenants/tenant/tenant-demo-1" + }, + { + "id": "53264", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-demo-1" + } + ] + }, + { + "id": "45208", + "node-type": "complex", + "url": "/aai/v15/cloud-infrastructure/complexes/complex/complex-demo-1", + "properties": { + "physical-location-id": "complex-demo-1", + "data-center-code": "test-complex-11", + "complex-name": "complex-name-demo-11", + "resource-version": "1559205174569", + "physical-location-type": "demo-lab", + "street1": "test", + "street2": "test", + "city": "test", + "state": "test", + "postal-code": "12345", + "country": "test", + "region": "test", + "latitude": "example-latitude-val-2652", + "longitude": "example-longitude-val-2652", + "elevation": "95", + "lata": "example-lata-val-2652" + }, + "related-to": [ + { + "id": "53264", + "relationship-label": "org.onap.relationships.inventory.LocatedIn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-demo-1" + } + ] + }, + { + "id": "8288", + "node-type": "cloud-region", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC898/cr-test-4-ABC898", + "properties": { + "cloud-owner": "cr-test-3-ABC898", + "cloud-region-id": "cr-test-4-ABC898", + "cloud-type": "example-cloud-type-val-93696", + "owner-defined-type": "example-owner-defined-type-val-16874", + "cloud-region-version": "example-cloud-region-version-val-20485", + "identity-url": "example-identity-url-val-31885", + "cloud-zone": "example-cloud-zone-val-42889", + "complex-name": "example-complex-name-val-13802", + "resource-version": "1558032233980" + }, + "related-to": [ + { + "id": "40976", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC898/cr-test-4-ABC898/tenants/tenant/tenant-test-2-ABC898" + } + ] + }, + { + "id": "4192", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/onap-new-aic/newRegId1/tenants/tenant/tenant-newTest-8641-example", + "properties": { + "tenant-id": "tenant-newTest-8641-example", + "tenant-name": "tenant-name-8641-example", + "tenant-context": "value-3", + "resource-version": "1557865553523" + }, + "related-to": [ + { + "id": "20496", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/onap-new-aic/newRegId1/tenants/tenant/tenant-newTest-8641-example/vservers/vserver/959798c2-f024-4db5-af72-9860775ab80e-example" + }, + { + "id": "16400", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "cloud-region", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/onap-new-aic/newRegId1" + } + ] + }, + { + "id": "8328", + "node-type": "cloud-region", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC321/cr-test-4-ABC321", + "properties": { + "cloud-owner": "cr-test-3-ABC321", + "cloud-region-id": "cr-test-4-ABC321", + "cloud-type": "example-cloud-type-val-93696", + "owner-defined-type": "example-owner-defined-type-val-16874", + "cloud-region-version": "example-cloud-region-version-val-20485", + "identity-url": "example-identity-url-val-31885", + "cloud-zone": "example-cloud-zone-val-42889", + "complex-name": "example-complex-name-val-13802", + "resource-version": "1557862817350" + }, + "related-to": [ + { + "id": "12424", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC321/cr-test-4-ABC321/tenants/tenant/tenant-test-2-ABC321" + } + ] + }, + { + "id": "4120", + "node-type": "complex", + "url": "/aai/v15/cloud-infrastructure/complexes/complex/complex-test-1-DEF321", + "properties": { + "physical-location-id": "complex-test-1-DEF321", + "data-center-code": "test-11", + "complex-name": "complex-name-test-11", + "resource-version": "1557779753467", + "physical-location-type": "test-city-lab", + "street1": "test", + "street2": "test", + "city": "test", + "state": "test", + "postal-code": "12345", + "country": "test", + "region": "test", + "latitude": "example-latitude-val-2652", + "longitude": "example-longitude-val-2652", + "elevation": "95", + "lata": "example-lata-val-2652" + }, + "related-to": [ + { + "id": "4312", + "relationship-label": "org.onap.relationships.inventory.LocatedIn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-DEF321" + } + ] + }, + { + "id": "20688", + "node-type": "vlan", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/l-interfaces/l-interface/linterface-keyABC123/vlans/vlan/vlan-interface01ABC123", + "properties": { + "vlan-interface": "vlan-interface01ABC123", + "vlan-id-inner": 527, + "vlan-id-outer": 279, + "resource-version": "1558026227364", + "speed-value": "3w2", + "speed-units": "BYX", + "vlan-description": "pzJj", + "backdoor-connection": "4KE", + "vpn-key": "jX71Yns", + "orchestration-status": "eg4tbeur7", + "in-maint": false, + "prov-status": "vtxiZgfOCb", + "is-ip-unnumbered": false, + "is-private": false + }, + "related-to": [ + { + "id": "20616", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "l3-interface-ipv6-address-list", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/l-interfaces/l-interface/linterface-keyABC123/vlans/vlan/vlan-interface01ABC123/l3-interface-ipv6-address-list/vlan-ipv6-address01ABC123" + }, + { + "id": "24768", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "l3-interface-ipv4-address-list", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/l-interfaces/l-interface/linterface-keyABC123/vlans/vlan/vlan-interface01ABC123/l3-interface-ipv4-address-list/vlan-ipv6-address01ABC123" + }, + { + "id": "16576", + "relationship-label": "tosca.relationships.network.LinksTo", + "node-type": "l-interface", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/l-interfaces/l-interface/linterface-keyABC123" + } + ] + }, + { + "id": "8440", + "node-type": "vnfc", + "url": "/aai/v15/network/vnfcs/vnfc/vnfc-test-2-ABC321", + "properties": { + "vnfc-name": "vnfc-test-2-ABC321", + "nfc-naming-code": "example-vnfc-function-code-val-69324-2", + "nfc-function": "example-vnfc-type-val-25880-2", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1557862848997" + }, + "related-to": [ + { + "id": "12480", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-50-ABC321" + } + ] + }, + { + "id": "8208", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABCD1234/licenses/license/license-test-1-ABCD1234/license-test-2-ABCD1234", + "properties": { + "group-uuid": "license-test-1-ABCD1234", + "resource-uuid": "license-test-2-ABCD1234", + "resource-version": "1557782306756" + }, + "related-to": [ + { + "id": "12488", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABCD1234" + } + ] + }, + { + "id": "16584", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890/vservers/vserver/vserver-test-3-ABC890", + "properties": { + "vserver-id": "vserver-test-3-ABC890", + "vserver-name": "example-vserver-name-val-30739", + "vserver-name2": "example-vserver-name2-val-67128", + "prov-status": "PROV", + "vserver-selflink": "example-vserver-selflink-val-66843", + "in-maint": true, + "is-closed-loop-disabled": false, + "resource-version": "1558031746466" + }, + "related-to": [ + { + "id": "16632", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890" + }, + { + "id": "20728", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890" + }, + { + "id": "28864", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890" + } + ] + }, + { + "id": "28864", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890", + "properties": { + "hostname": "pserver-test-1-ABC890", + "in-maint": false, + "resource-version": "1558031744715" + }, + "related-to": [ + { + "id": "16584", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890/vservers/vserver/vserver-test-3-ABC890" + }, + { + "id": "16632", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890" + }, + { + "id": "24600", + "relationship-label": "org.onap.relationships.inventory.LocatedIn", + "node-type": "complex", + "url": "/aai/v15/cloud-infrastructure/complexes/complex/complex-test-1-ABC890" + } + ] + }, + { + "id": "24784", + "node-type": "service-instance", + "url": "/aai/v15/business/customers/customer/customer-test-2-ABC898/service-subscriptions/service-subscription/service-subscription-test-2-ABC898/service-instances/service-instance/service-instance-test-2-ABC898", + "properties": { + "service-instance-id": "service-instance-test-2-ABC898", + "resource-version": "1558032267163" + }, + "related-to": [ + { + "id": "37056", + "relationship-label": "org.onap.relationships.inventory.ComposedOf", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-50-ABC898" + }, + { + "id": "49168", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "service-subscription", + "url": "/aai/v15/business/customers/customer/customer-test-2-ABC898/service-subscriptions/service-subscription/service-subscription-test-2-ABC898" + } + ] + }, + { + "id": "28872", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/onap-demo-aic/cr-demo-1/tenants/tenant/tenant-demo-1", + "properties": { + "tenant-id": "tenant-demo-1", + "tenant-name": "tenant-demo", + "tenant-context": "value-3", + "resource-version": "1559204240213" + }, + "related-to": [ + { + "id": "32920", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "cloud-region", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/onap-demo-aic/cr-demo-1" + } + ] + }, + { + "id": "24600", + "node-type": "complex", + "url": "/aai/v15/cloud-infrastructure/complexes/complex/complex-test-1-ABC890", + "properties": { + "physical-location-id": "complex-test-1-ABC890", + "data-center-code": "test-cityil-test-11", + "complex-name": "complex-name-test-cityil-test-11", + "resource-version": "1558031745028", + "physical-location-type": "test-city-lab", + "street1": "test", + "street2": "test", + "city": "test", + "state": "test", + "postal-code": "12345", + "country": "test", + "region": "test", + "latitude": "example-latitude-val-2652", + "longitude": "example-longitude-val-2652", + "elevation": "95", + "lata": "example-lata-val-2652" + }, + "related-to": [ + { + "id": "28864", + "relationship-label": "org.onap.relationships.inventory.LocatedIn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890" + } + ] + }, + { + "id": "16632", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "properties": { + "vnf-id": "generic-vnf-test-0-ABC890", + "vnf-name": "example-vnf-name-val-3979", + "vnf-type": "vnf-type-onap-sic", + "prov-status": "IN-MAINT", + "orchestration-status": "INACTIVE", + "ipv4-loopback0-address": "ipv4-loopback0-address-ALL-GOOD-one-2", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1564408017172" + }, + "related-to": [ + { + "id": "24712", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/entitlements/entitlement/entitlement-test-21-ABC890/entitlement-test-22-ABC890" + }, + { + "id": "28696", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/licenses/license/license-test-1-ABC890/license-test-2-ABC890" + }, + { + "id": "16584", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890/vservers/vserver/vserver-test-3-ABC890" + }, + { + "id": "28864", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890" + } + ] + } + ] +} diff --git a/src/app/assets/stubs/BYOQNoResults.json b/src/app/assets/stubs/BYOQNoResults.json new file mode 100644 index 0000000..914332e --- /dev/null +++ b/src/app/assets/stubs/BYOQNoResults.json @@ -0,0 +1,3 @@ +{ + "results": [] +}
\ No newline at end of file diff --git a/src/app/assets/stubs/BYOQPersonalQueries.json b/src/app/assets/stubs/BYOQPersonalQueries.json new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/src/app/assets/stubs/BYOQPersonalQueries.json @@ -0,0 +1 @@ +[] diff --git a/src/app/assets/stubs/BYOQPublicQueries.json b/src/app/assets/stubs/BYOQPublicQueries.json new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/src/app/assets/stubs/BYOQPublicQueries.json @@ -0,0 +1 @@ +[] diff --git a/src/app/assets/stubs/BYOQSaveInfo.json b/src/app/assets/stubs/BYOQSaveInfo.json new file mode 100644 index 0000000..f301e64 --- /dev/null +++ b/src/app/assets/stubs/BYOQSaveInfo.json @@ -0,0 +1 @@ +{"status":"201"}
\ No newline at end of file diff --git a/src/app/assets/stubs/CQDefault.json b/src/app/assets/stubs/CQDefault.json new file mode 100644 index 0000000..451d3d0 --- /dev/null +++ b/src/app/assets/stubs/CQDefault.json @@ -0,0 +1,107 @@ +{ + "results": [ + { + "id": "16632", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "properties": { + "vnf-id": "generic-vnf-test-0-ABC890", + "vnf-name": "example-vnf-name-val-3979", + "vnf-type": "vnf-type-onap-sic", + "prov-status": "PROV", + "orchestration-status": "ACTIVE", + "ipv4-loopback0-address": "ipv4-loopback0-address-ALL-GOOD-one", + "in-maint": true, + "is-closed-loop-disabled": false, + "resource-version": "1559248669411" + }, + "related-to": [ + { + "id": "24712", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/entitlements/entitlement/entitlement-test-21-ABC890/entitlement-test-22-ABC890" + }, + { + "id": "28696", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/licenses/license/license-test-1-ABC890/license-test-2-ABC890" + }, + { + "id": "16584", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890/vservers/vserver/vserver-test-3-ABC890" + }, + { + "id": "28864", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890" + } + ] + }, + { + "id": "28864", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890", + "properties": { + "hostname": "pserver-test-1-ABC890", + "in-maint": false, + "resource-version": "1558031744715" + }, + "related-to": [ + { + "id": "16584", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890/vservers/vserver/vserver-test-3-ABC890" + }, + { + "id": "16632", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890" + }, + { + "id": "24600", + "relationship-label": "org.onap.relationships.inventory.LocatedIn", + "node-type": "complex", + "url": "/aai/v15/cloud-infrastructure/complexes/complex/complex-test-1-ABC890" + } + ] + }, + { + "id": "24600", + "node-type": "complex", + "url": "/aai/v15/cloud-infrastructure/complexes/complex/complex-test-1-ABC890", + "properties": { + "physical-location-id": "complex-test-1-ABC890", + "data-center-code": "lisleil-test-11", + "complex-name": "complex-name-lisleil-test-11", + "resource-version": "1558031745028", + "physical-location-type": "lisle-lab", + "street1": "4513 Western Ave", + "street2": "CU-211", + "city": "Lisle", + "state": "IL", + "postal-code": "60532", + "country": "USA", + "region": "Midwest", + "latitude": "example-latitude-val-2652", + "longitude": "example-longitude-val-2652", + "elevation": "95", + "lata": "example-lata-val-2652" + }, + "related-to": [ + { + "id": "28864", + "relationship-label": "org.onap.relationships.inventory.LocatedIn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890" + } + ] + } + ] +} diff --git a/src/app/assets/stubs/ConvertQueryToTree.json b/src/app/assets/stubs/ConvertQueryToTree.json new file mode 100644 index 0000000..4a3a31e --- /dev/null +++ b/src/app/assets/stubs/ConvertQueryToTree.json @@ -0,0 +1,142 @@ +{ + "node-filter": [], + "children": [ + { + "node-filter": [ + [ + { + "filter": "EQ", + "value": [ + "test-physical-location-id" + ], + "key": "physical-location-id" + } + ], + [ + { + "filter": "EQ", + "value": [ + "test-physical-location-type" + ], + "key": "physical-location-type" + } + ], + [ + { + "filter": "EQ", + "value": [ + "test-street1" + ], + "key": "street1" + } + ], + [ + { + "filter": "EQ", + "value": [ + "test-city" + ], + "key": "city" + } + ], + [ + { + "filter": "EQ", + "value": [ + "12345" + ], + "key": "postal-code" + } + ], + [ + { + "filter": "EQ", + "value": [ + "Test-Country" + ], + "key": "country" + } + ], + [ + { + "filter": "EQ", + "value": [ + "Test-Region" + ], + "key": "region" + } + ] + ], + "children": [ + { + "node-filter": [], + "children": [], + "node-type": "cloud-region", + "where-filter": [], + "not-where": false, + "id": "A2", + "store": true, + "parent-type": "complex", + "labels": [] + }, + { + "node-filter": [], + "children": [], + "node-type": "pnf", + "where-filter": [], + "not-where": false, + "id": "A3", + "store": true, + "parent-type": "complex", + "labels": [] + }, + { + "node-filter": [], + "children": [], + "node-type": "pserver", + "where-filter": [], + "not-where": false, + "id": "A4", + "store": true, + "parent-type": "complex", + "labels": [] + }, + { + "node-filter": [], + "children": [], + "node-type": "rack", + "where-filter": [], + "not-where": false, + "id": "A5", + "store": true, + "parent-type": "complex", + "labels": [] + }, + { + "node-filter": [], + "children": [], + "node-type": "zone", + "where-filter": [], + "not-where": false, + "id": "A6", + "store": true, + "parent-type": "complex", + "labels": [] + } + ], + "node-type": "complex", + "where-filter": [], + "not-where": false, + "id": "A1", + "store": true, + "parent-type": "", + "labels": [] + } + ], + "node-type": "", + "where-filter": [], + "not-where": false, + "id": "A0", + "store": false, + "parent-type": "" +} diff --git a/src/app/assets/stubs/SingleTransactionEdit.json b/src/app/assets/stubs/SingleTransactionEdit.json new file mode 100644 index 0000000..4322aee --- /dev/null +++ b/src/app/assets/stubs/SingleTransactionEdit.json @@ -0,0 +1,10 @@ +{ + "operation-responses": [ + { + "action": "patch", + "uri": "network/pnfs/pnf/test1/lag-interfaces/lag-interface/test1", + "response-status-code": 200, + "response-body": null + } + } +} diff --git a/src/app/assets/stubs/currentBYOQState.json b/src/app/assets/stubs/currentBYOQState.json new file mode 100644 index 0000000..4e120e4 --- /dev/null +++ b/src/app/assets/stubs/currentBYOQState.json @@ -0,0 +1,391 @@ +{ + "results": [ + { + "id": "4256", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "properties": [ + { + "key": "aai-node-type", + "value": "generic-vnf", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "source-of-truth", + "value": "F-Test-ABC890", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "aai-uri", + "value": "/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "vnf-id", + "value": "generic-vnf-test-0-ABC890", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "vnf-name", + "value": "example-vnf-name-val-3979", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "is-closed-loop-disabled", + "value": false, + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "start-ts", + "value": 1558031743832, + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "ipv4-loopback0-address", + "value": "ipv4-loopback0-address-ALL-GOOD-one", + "timestamp": 1558031839071, + "sot": "M-ABC890" + }, + { + "key": "vnf-type", + "value": "vnf-type-onap-sic", + "timestamp": 1559237141294, + "sot": "SO" + }, + { + "key": "orchestration-status", + "value": "ACTIVE", + "timestamp": 1559248669446, + "sot": "SOURCETEST" + }, + { + "key": "in-maint", + "value": true, + "timestamp": 1559248669446, + "sot": "SOURCETEST" + }, + { + "key": "prov-status", + "value": "PROV", + "timestamp": 1559248669446, + "sot": "SOURCETEST" + } + ], + "related-to": [ + { + "id": "8312", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/licenses/license/license-test-1-ABC890/license-test-2-ABC890", + "timestamp": 1558031870276, + "sot": "N-ABC890" + }, + { + "id": "12344", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/entitlements/entitlement/entitlement-test-21-ABC890/entitlement-test-22-ABC890", + "timestamp": 1558031901473, + "sot": "R-ABC890" + }, + { + "id": "8248", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890", + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "id": "8400", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890/vservers/vserver/vserver-test-3-ABC890", + "timestamp": 1558031746239, + "sot": "F-Test-ABC890" + } + ] + }, + { + "id": "8312", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/licenses/license/license-test-1-ABC890/license-test-2-ABC890", + "properties": [ + { + "key": "aai-node-type", + "value": "license", + "timestamp": 1558031870276, + "sot": "N-ABC890" + }, + { + "key": "source-of-truth", + "value": "N-ABC890", + "timestamp": 1558031870276, + "sot": "N-ABC890" + }, + { + "key": "aai-uri", + "value": "/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/licenses/license/license-test-1-ABC890/license-test-2-ABC890", + "timestamp": 1558031870276, + "sot": "N-ABC890" + }, + { + "key": "group-uuid", + "value": "license-test-1-ABC890", + "timestamp": 1558031870276, + "sot": "N-ABC890" + }, + { + "key": "resource-uuid", + "value": "license-test-2-ABC890", + "timestamp": 1558031870276, + "sot": "N-ABC890" + }, + { + "key": "start-ts", + "value": 1558031870276, + "timestamp": 1558031870276, + "sot": "N-ABC890" + } + ], + "related-to": [ + { + "id": "4256", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "timestamp": 1558031870276, + "sot": "N-ABC890" + } + ] + }, + { + "id": "12344", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/entitlements/entitlement/entitlement-test-21-ABC890/entitlement-test-22-ABC890", + "properties": [ + { + "key": "aai-node-type", + "value": "entitlement", + "timestamp": 1558031901473, + "sot": "R-ABC890" + }, + { + "key": "source-of-truth", + "value": "R-ABC890", + "timestamp": 1558031901473, + "sot": "R-ABC890" + }, + { + "key": "aai-uri", + "value": "/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/entitlements/entitlement/entitlement-test-21-ABC890/entitlement-test-22-ABC890", + "timestamp": 1558031901473, + "sot": "R-ABC890" + }, + { + "key": "group-uuid", + "value": "entitlement-test-21-ABC890", + "timestamp": 1558031901473, + "sot": "R-ABC890" + }, + { + "key": "resource-uuid", + "value": "entitlement-test-22-ABC890", + "timestamp": 1558031901473, + "sot": "R-ABC890" + }, + { + "key": "start-ts", + "value": 1558031901473, + "timestamp": 1558031901473, + "sot": "R-ABC890" + } + ], + "related-to": [ + { + "id": "4256", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "timestamp": 1558031901473, + "sot": "R-ABC890" + } + ] + }, + { + "id": "8248", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890", + "properties": [ + { + "key": "in-maint", + "value": false, + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "key": "aai-node-type", + "value": "pserver", + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "key": "source-of-truth", + "value": "F-Test-ABC890", + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "key": "aai-uri", + "value": "/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890", + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "key": "hostname", + "value": "pserver-test-1-ABC890", + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "key": "start-ts", + "value": 1558031744746, + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + } + ], + "related-to": [ + { + "id": "4256", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "id": "8400", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890/vservers/vserver/vserver-test-3-ABC890", + "timestamp": 1558031746491, + "sot": "F-Test-ABC890" + }, + { + "id": "4216", + "relationship-label": "org.onap.relationships.inventory.LocatedIn", + "node-type": "complex", + "url": "/aai/v15/cloud-infrastructure/complexes/complex/complex-test-1-ABC890", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + } + ] + }, + { + "id": "8400", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890/vservers/vserver/vserver-test-3-ABC890", + "properties": [ + { + "key": "in-maint", + "value": true, + "timestamp": 1558031745958, + "sot": "F-Test-ABC890" + }, + { + "key": "prov-status", + "value": "PROV", + "timestamp": 1558031745958, + "sot": "F-Test-ABC890" + }, + { + "key": "aai-node-type", + "value": "vserver", + "timestamp": 1558031745958, + "sot": "F-Test-ABC890" + }, + { + "key": "source-of-truth", + "value": "F-Test-ABC890", + "timestamp": 1558031745958, + "sot": "F-Test-ABC890" + }, + { + "key": "aai-uri", + "value": "/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890/vservers/vserver/vserver-test-3-ABC890", + "timestamp": 1558031745958, + "sot": "F-Test-ABC890" + }, + { + "key": "is-closed-loop-disabled", + "value": false, + "timestamp": 1558031745958, + "sot": "F-Test-ABC890" + }, + { + "key": "vserver-id", + "value": "vserver-test-3-ABC890", + "timestamp": 1558031745958, + "sot": "F-Test-ABC890" + }, + { + "key": "vserver-name", + "value": "example-vserver-name-val-30739", + "timestamp": 1558031745958, + "sot": "F-Test-ABC890" + }, + { + "key": "vserver-name2", + "value": "example-vserver-name2-val-67128", + "timestamp": 1558031745958, + "sot": "F-Test-ABC890" + }, + { + "key": "vserver-selflink", + "value": "example-vserver-selflink-val-66843", + "timestamp": 1558031745958, + "sot": "F-Test-ABC890" + }, + { + "key": "start-ts", + "value": 1558031745958, + "timestamp": 1558031745958, + "sot": "F-Test-ABC890" + } + ], + "related-to": [ + { + "id": "4256", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "timestamp": 1558031746239, + "sot": "F-Test-ABC890" + }, + { + "id": "4144", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "tenant", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890", + "timestamp": 1558031745958, + "sot": "F-Test-ABC890" + }, + { + "id": "8248", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890", + "timestamp": 1558031746491, + "sot": "F-Test-ABC890" + } + ] + } + ] +} diff --git a/src/app/assets/stubs/currentCQState.json b/src/app/assets/stubs/currentCQState.json new file mode 100644 index 0000000..da2d473 --- /dev/null +++ b/src/app/assets/stubs/currentCQState.json @@ -0,0 +1,317 @@ +{ + "results": [ + { + "id": "4256", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "properties": [ + { + "key": "aai-node-type", + "value": "generic-vnf", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "source-of-truth", + "value": "F-Test-ABC890", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "aai-uri", + "value": "/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "vnf-id", + "value": "generic-vnf-test-0-ABC890", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "vnf-name", + "value": "example-vnf-name-val-3979", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "is-closed-loop-disabled", + "value": false, + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "start-ts", + "value": 1558031743832, + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "ipv4-loopback0-address", + "value": "ipv4-loopback0-address-ALL-GOOD-one", + "timestamp": 1558031839071, + "sot": "M-ABC890" + }, + { + "key": "vnf-type", + "value": "vnf-type-onap-sic", + "timestamp": 1559237141294, + "sot": "SO" + }, + { + "key": "orchestration-status", + "value": "ACTIVE", + "timestamp": 1559248669446, + "sot": "SOURCETEST" + }, + { + "key": "in-maint", + "value": true, + "timestamp": 1559248669446, + "sot": "SOURCETEST" + }, + { + "key": "prov-status", + "value": "PROV", + "timestamp": 1559248669446, + "sot": "SOURCETEST" + } + ], + "related-to": [ + { + "id": "8312", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/licenses/license/license-test-1-ABC890/license-test-2-ABC890", + "timestamp": 1558031870276, + "sot": "N-ABC890" + }, + { + "id": "12344", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/entitlements/entitlement/entitlement-test-21-ABC890/entitlement-test-22-ABC890", + "timestamp": 1558031901473, + "sot": "R-ABC890" + }, + { + "id": "8248", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890", + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "id": "8400", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890/vservers/vserver/vserver-test-3-ABC890", + "timestamp": 1558031746239, + "sot": "F-Test-ABC890" + } + ] + }, + { + "id": "8248", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890", + "properties": [ + { + "key": "in-maint", + "value": false, + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "key": "aai-node-type", + "value": "pserver", + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "key": "source-of-truth", + "value": "F-Test-ABC890", + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "key": "aai-uri", + "value": "/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890", + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "key": "hostname", + "value": "pserver-test-1-ABC890", + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "key": "start-ts", + "value": 1558031744746, + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + } + ], + "related-to": [ + { + "id": "4256", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "id": "8400", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890/vservers/vserver/vserver-test-3-ABC890", + "timestamp": 1558031746491, + "sot": "F-Test-ABC890" + }, + { + "id": "4216", + "relationship-label": "org.onap.relationships.inventory.LocatedIn", + "node-type": "complex", + "url": "/aai/v15/cloud-infrastructure/complexes/complex/complex-test-1-ABC890", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + } + ] + }, + { + "id": "4216", + "node-type": "complex", + "url": "/aai/v15/cloud-infrastructure/complexes/complex/complex-test-1-ABC890", + "properties": [ + { + "key": "aai-node-type", + "value": "complex", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + }, + { + "key": "source-of-truth", + "value": "F-Test-ABC890", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + }, + { + "key": "aai-uri", + "value": "/cloud-infrastructure/complexes/complex/complex-test-1-ABC890", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + }, + { + "key": "start-ts", + "value": 1558031745048, + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + }, + { + "key": "physical-location-id", + "value": "complex-test-1-ABC890", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + }, + { + "key": "data-center-code", + "value": "lisleil-test-11", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + }, + { + "key": "complex-name", + "value": "complex-name-lisleil-test-11", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + }, + { + "key": "physical-location-type", + "value": "lisle-lab", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + }, + { + "key": "street1", + "value": "4513 Western Ave", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + }, + { + "key": "street2", + "value": "CU-211", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + }, + { + "key": "city", + "value": "Lisle", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + }, + { + "key": "state", + "value": "IL", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + }, + { + "key": "postal-code", + "value": "60532", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + }, + { + "key": "country", + "value": "USA", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + }, + { + "key": "region", + "value": "Midwest", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + }, + { + "key": "latitude", + "value": "example-latitude-val-2652", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + }, + { + "key": "longitude", + "value": "example-longitude-val-2652", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + }, + { + "key": "elevation", + "value": "95", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + }, + { + "key": "lata", + "value": "example-lata-val-2652", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + } + ], + "related-to": [ + { + "id": "8248", + "relationship-label": "org.onap.relationships.inventory.LocatedIn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + } + ] + } + ] +} diff --git a/src/app/assets/stubs/currentNodeState.json b/src/app/assets/stubs/currentNodeState.json new file mode 100644 index 0000000..0f6b92e --- /dev/null +++ b/src/app/assets/stubs/currentNodeState.json @@ -0,0 +1,117 @@ +{ + "results": [ + { + "id": "4256", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "properties": [ + { + "key": "aai-node-type", + "value": "generic-vnf", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "source-of-truth", + "value": "F-Test-ABC890", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "aai-uri", + "value": "/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "vnf-id", + "value": "generic-vnf-test-0-ABC890", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "vnf-name", + "value": "example-vnf-name-val-3979", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "is-closed-loop-disabled", + "value": false, + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "start-ts", + "value": 1558031743832, + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "ipv4-loopback0-address", + "value": "ipv4-loopback0-address-ALL-GOOD-one", + "timestamp": 1558031839071, + "sot": "M-ABC890" + }, + { + "key": "vnf-type", + "value": "vnf-type-onap-sic", + "timestamp": 1559237141294, + "sot": "SO" + }, + { + "key": "orchestration-status", + "value": "ACTIVE", + "timestamp": 1559248669446, + "sot": "SOURCETEST" + }, + { + "key": "in-maint", + "value": true, + "timestamp": 1559248669446, + "sot": "SOURCETEST" + }, + { + "key": "prov-status", + "value": "PROV", + "timestamp": 1559248669446, + "sot": "SOURCETEST" + } + ], + "related-to": [ + { + "id": "8312", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/licenses/license/license-test-1-ABC890/license-test-2-ABC890", + "timestamp": 1558031870276, + "sot": "N-ABC890" + }, + { + "id": "12344", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/entitlements/entitlement/entitlement-test-21-ABC890/entitlement-test-22-ABC890", + "timestamp": 1558031901473, + "sot": "R-ABC890" + }, + { + "id": "8248", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890", + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "id": "8400", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890/vservers/vserver/vserver-test-3-ABC890", + "timestamp": 1558031746239, + "sot": "F-Test-ABC890" + } + ] + } + ] +} diff --git a/src/app/assets/stubs/historicalBYOQChanges.json b/src/app/assets/stubs/historicalBYOQChanges.json new file mode 100644 index 0000000..aa4ce1c --- /dev/null +++ b/src/app/assets/stubs/historicalBYOQChanges.json @@ -0,0 +1,68 @@ +{ + "results": [ + { + "node-type": "generic-vnf", + "uri": "/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "changes": [ + 1558031743832, + 1558031744142, + 1558031744433, + 1558031744746, + 1558031746239, + 1558031761866, + 1558031854596, + 1558031870276, + 1558031885834, + 1558031901473 + ] + }, + { + "node-type": "license", + "uri": "/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/licenses/license/license-test-1-ABC890/license-test-2-ABC890", + "changes": [ + 1558031744142, + 1558031854596 + ] + }, + { + "node-type": "license", + "uri": "/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/licenses/license/license-test-1-ABC890/license-test-2-ABC890", + "changes": [ + 1558031870276 + ] + }, + { + "node-type": "entitlement", + "uri": "/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/entitlements/entitlement/entitlement-test-11-ABC890/entitlement-test-12-ABC890", + "changes": [ + 1558031744433, + 1558031885834 + ] + }, + { + "node-type": "entitlement", + "uri": "/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/entitlements/entitlement/entitlement-test-21-ABC890/entitlement-test-22-ABC890", + "changes": [ + 1558031901473 + ] + }, + { + "node-type": "pserver", + "uri": "/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890", + "changes": [ + 1558031744746, + 1558031745048, + 1558031746491 + ] + }, + { + "node-type": "vserver", + "uri": "/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890/vservers/vserver/vserver-test-3-ABC890", + "changes": [ + 1558031745958, + 1558031746239, + 1558031746491 + ] + } + ] +} diff --git a/src/app/assets/stubs/historicalBYOQState.json b/src/app/assets/stubs/historicalBYOQState.json new file mode 100644 index 0000000..c140e10 --- /dev/null +++ b/src/app/assets/stubs/historicalBYOQState.json @@ -0,0 +1,276 @@ +{ + "results": [ + { + "id": "4256", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "properties": [ + { + "key": "orchestration-status", + "value": "good-orchestration-status", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "in-maint", + "value": false, + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "prov-status", + "value": "ACTIVE", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "aai-node-type", + "value": "generic-vnf", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "source-of-truth", + "value": "F-Test-ABC890", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "aai-uri", + "value": "/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "vnf-id", + "value": "generic-vnf-test-0-ABC890", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "vnf-name", + "value": "example-vnf-name-val-3979", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "vnf-type", + "value": "FW", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "ipv4-loopback0-address", + "value": "ipv4-loopback0-address-good-one", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "is-closed-loop-disabled", + "value": false, + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "start-ts", + "value": 1558031743832, + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + } + ], + "related-to": [ + { + "id": "4152", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/licenses/license/license-test-1-ABC890/license-test-2-ABC890", + "timestamp": 1558031744142, + "sot": "F-Test-ABC890" + }, + { + "id": "8352", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/entitlements/entitlement/entitlement-test-11-ABC890/entitlement-test-12-ABC890", + "timestamp": 1558031744433, + "sot": "F-Test-ABC890" + }, + { + "id": "8248", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890", + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + } + ] + }, + { + "id": "4152", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/licenses/license/license-test-1-ABC890/license-test-2-ABC890", + "properties": [ + { + "key": "aai-node-type", + "value": "license", + "timestamp": 1558031744142, + "sot": "F-Test-ABC890" + }, + { + "key": "source-of-truth", + "value": "F-Test-ABC890", + "timestamp": 1558031744142, + "sot": "F-Test-ABC890" + }, + { + "key": "aai-uri", + "value": "/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/licenses/license/license-test-1-ABC890/license-test-2-ABC890", + "timestamp": 1558031744142, + "sot": "F-Test-ABC890" + }, + { + "key": "group-uuid", + "value": "license-test-1-ABC890", + "timestamp": 1558031744142, + "sot": "F-Test-ABC890" + }, + { + "key": "resource-uuid", + "value": "license-test-2-ABC890", + "timestamp": 1558031744142, + "sot": "F-Test-ABC890" + }, + { + "key": "start-ts", + "value": 1558031744142, + "timestamp": 1558031744142, + "sot": "F-Test-ABC890" + } + ], + "related-to": [ + { + "id": "4256", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "timestamp": 1558031744142, + "sot": "F-Test-ABC890" + } + ] + }, + { + "id": "8352", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/entitlements/entitlement/entitlement-test-11-ABC890/entitlement-test-12-ABC890", + "properties": [ + { + "key": "aai-node-type", + "value": "entitlement", + "timestamp": 1558031744433, + "sot": "F-Test-ABC890" + }, + { + "key": "source-of-truth", + "value": "F-Test-ABC890", + "timestamp": 1558031744433, + "sot": "F-Test-ABC890" + }, + { + "key": "aai-uri", + "value": "/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/entitlements/entitlement/entitlement-test-11-ABC890/entitlement-test-12-ABC890", + "timestamp": 1558031744433, + "sot": "F-Test-ABC890" + }, + { + "key": "group-uuid", + "value": "entitlement-test-11-ABC890", + "timestamp": 1558031744433, + "sot": "F-Test-ABC890" + }, + { + "key": "resource-uuid", + "value": "entitlement-test-12-ABC890", + "timestamp": 1558031744433, + "sot": "F-Test-ABC890" + }, + { + "key": "start-ts", + "value": 1558031744433, + "timestamp": 1558031744433, + "sot": "F-Test-ABC890" + } + ], + "related-to": [ + { + "id": "4256", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "timestamp": 1558031744433, + "sot": "F-Test-ABC890" + } + ] + }, + { + "id": "8248", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890", + "properties": [ + { + "key": "in-maint", + "value": false, + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "key": "aai-node-type", + "value": "pserver", + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "key": "source-of-truth", + "value": "F-Test-ABC890", + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "key": "aai-uri", + "value": "/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890", + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "key": "hostname", + "value": "pserver-test-1-ABC890", + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "key": "start-ts", + "value": 1558031744746, + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + } + ], + "related-to": [ + { + "id": "4256", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "id": "4216", + "relationship-label": "org.onap.relationships.inventory.LocatedIn", + "node-type": "complex", + "url": "/aai/v15/cloud-infrastructure/complexes/complex/complex-test-1-ABC890", + "timestamp": 1558031745048, + "sot": "F-Test-ABC890" + } + ] + } + ] +} diff --git a/src/app/assets/stubs/historicalCQChanges.json b/src/app/assets/stubs/historicalCQChanges.json new file mode 100644 index 0000000..3d0daac --- /dev/null +++ b/src/app/assets/stubs/historicalCQChanges.json @@ -0,0 +1,36 @@ +{ + "results": [ + { + "node-type": "generic-vnf", + "uri": "/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "changes": [ + 1558031743832, + 1558031744142, + 1558031744433, + 1558031744746, + 1558031746239, + 1558031761866, + 1558031854596, + 1558031870276, + 1558031885834, + 1558031901473 + ] + }, + { + "node-type": "pserver", + "uri": "/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890", + "changes": [ + 1558031744746, + 1558031745048, + 1558031746491 + ] + }, + { + "node-type": "complex", + "uri": "/cloud-infrastructure/complexes/complex/complex-test-1-ABC890", + "changes": [ + 1558031745048 + ] + } + ] +} diff --git a/src/app/assets/stubs/historicalCQState.json b/src/app/assets/stubs/historicalCQState.json new file mode 100644 index 0000000..5d81dfe --- /dev/null +++ b/src/app/assets/stubs/historicalCQState.json @@ -0,0 +1,84 @@ +{ + "results": [ + { + "id": "4256", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "properties": [ + { + "key": "orchestration-status", + "value": "good-orchestration-status", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "in-maint", + "value": false, + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "prov-status", + "value": "ACTIVE", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "aai-node-type", + "value": "generic-vnf", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "source-of-truth", + "value": "F-Test-ABC890", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "aai-uri", + "value": "/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "vnf-id", + "value": "generic-vnf-test-0-ABC890", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "vnf-name", + "value": "example-vnf-name-val-3979", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "vnf-type", + "value": "FW", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "ipv4-loopback0-address", + "value": "ipv4-loopback0-address-good-one", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "is-closed-loop-disabled", + "value": false, + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "start-ts", + "value": 1558031743832, + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + } + ], + "related-to": [] + } + ] +} diff --git a/src/app/assets/stubs/historicalNodeState.json b/src/app/assets/stubs/historicalNodeState.json new file mode 100644 index 0000000..0f6b92e --- /dev/null +++ b/src/app/assets/stubs/historicalNodeState.json @@ -0,0 +1,117 @@ +{ + "results": [ + { + "id": "4256", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "properties": [ + { + "key": "aai-node-type", + "value": "generic-vnf", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "source-of-truth", + "value": "F-Test-ABC890", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "aai-uri", + "value": "/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "vnf-id", + "value": "generic-vnf-test-0-ABC890", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "vnf-name", + "value": "example-vnf-name-val-3979", + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "is-closed-loop-disabled", + "value": false, + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "start-ts", + "value": 1558031743832, + "timestamp": 1558031743832, + "sot": "F-Test-ABC890" + }, + { + "key": "ipv4-loopback0-address", + "value": "ipv4-loopback0-address-ALL-GOOD-one", + "timestamp": 1558031839071, + "sot": "M-ABC890" + }, + { + "key": "vnf-type", + "value": "vnf-type-onap-sic", + "timestamp": 1559237141294, + "sot": "SO" + }, + { + "key": "orchestration-status", + "value": "ACTIVE", + "timestamp": 1559248669446, + "sot": "SOURCETEST" + }, + { + "key": "in-maint", + "value": true, + "timestamp": 1559248669446, + "sot": "SOURCETEST" + }, + { + "key": "prov-status", + "value": "PROV", + "timestamp": 1559248669446, + "sot": "SOURCETEST" + } + ], + "related-to": [ + { + "id": "8312", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/licenses/license/license-test-1-ABC890/license-test-2-ABC890", + "timestamp": 1558031870276, + "sot": "N-ABC890" + }, + { + "id": "12344", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/entitlements/entitlement/entitlement-test-21-ABC890/entitlement-test-22-ABC890", + "timestamp": 1558031901473, + "sot": "R-ABC890" + }, + { + "id": "8248", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890", + "timestamp": 1558031744746, + "sot": "F-Test-ABC890" + }, + { + "id": "8400", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890/vservers/vserver/vserver-test-3-ABC890", + "timestamp": 1558031746239, + "sot": "F-Test-ABC890" + } + ] + } + ] +} diff --git a/src/app/assets/stubs/historicalNodeStateChanges.json b/src/app/assets/stubs/historicalNodeStateChanges.json new file mode 100644 index 0000000..8df1d3f --- /dev/null +++ b/src/app/assets/stubs/historicalNodeStateChanges.json @@ -0,0 +1,20 @@ +{ + "results": [ + { + "node-type": "generic-vnf", + "uri": "/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC123", + "changes": [ + 1558031743832, + 1558031744142, + 1558031744433, + 1558031744746, + 1558031746239, + 1558031761866, + 1558031854596, + 1558031870276, + 1558031885834, + 1558031901473 + ] + } + ] +} diff --git a/src/app/assets/stubs/modelDefault.json b/src/app/assets/stubs/modelDefault.json new file mode 100644 index 0000000..1cce31f --- /dev/null +++ b/src/app/assets/stubs/modelDefault.json @@ -0,0 +1,262 @@ +{ + "results": [ + { + "id": "16600", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123", + "properties": { + "vnf-id": "generic-vnfABC123", + "vnf-type": "example-vnf-type-val-3979-test", + "prov-status": "ACTIVE-NO", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1558031116089" + }, + "related-to": [ + { + "id": "20672", + "relationship-label": "org.onap.relationships.inventory.AppliesTo", + "node-type": "network-profile", + "url": "/aai/v15/cloud-infrastructure/network-profiles/network-profile/nm-profile234ABC123" + }, + { + "id": "16576", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "l-interface", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/l-interfaces/l-interface/linterface-keyABC123" + }, + { + "id": "28688", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "lag-interface", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnfABC123/lag-interfaces/lag-interface/lagintergace-test01ABC123" + }, + { + "id": "24728", + "relationship-label": "org.onap.relationships.inventory.Uses", + "node-type": "vnf-image", + "url": "/aai/v15/service-design-and-creation/vnf-images/vnf-image/image123-testABC123" + } + ] + }, + { + "id": "16632", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890", + "properties": { + "vnf-id": "generic-vnf-test-0-ABC890", + "vnf-name": "example-vnf-name-val-3979", + "vnf-type": "vnf-type-onap-sic", + "prov-status": "PROV", + "orchestration-status": "ACTIVE", + "ipv4-loopback0-address": "ipv4-loopback0-address-ALL-GOOD-one", + "in-maint": true, + "is-closed-loop-disabled": false, + "resource-version": "1559248669411" + }, + "related-to": [ + { + "id": "24712", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/entitlements/entitlement/entitlement-test-21-ABC890/entitlement-test-22-ABC890" + }, + { + "id": "28696", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/licenses/license/license-test-1-ABC890/license-test-2-ABC890" + }, + { + "id": "16584", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890/vservers/vserver/vserver-test-3-ABC890" + }, + { + "id": "28864", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890" + } + ] + }, + { + "id": "37056", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-50-ABC898", + "properties": { + "vnf-id": "generic-vnf-test-50-ABC898", + "vnf-name": "example-vnf-name-val-3979-2", + "vnf-type": "example-vnf-type-val-3979-2", + "prov-status": "ACTIVE", + "orchestration-status": "orchestration-status-2", + "ipv4-loopback0-address": "ipv4-loopback0-address-2", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1558032266879" + }, + "related-to": [ + { + "id": "24784", + "relationship-label": "org.onap.relationships.inventory.ComposedOf", + "node-type": "service-instance", + "url": "/aai/v15/business/customers/customer/customer-test-2-ABC898/service-subscriptions/service-subscription/service-subscription-test-2-ABC898/service-instances/service-instance/service-instance-test-2-ABC898" + }, + { + "id": "24824", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "vnfc", + "url": "/aai/v15/network/vnfcs/vnfc/vnfc-test-2-ABC898" + }, + { + "id": "32960", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "vnfc", + "url": "/aai/v15/network/vnfcs/vnfc/vnfc-test-1-ABC898" + }, + { + "id": "28808", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-ABC898/cr-test-4-ABC898/tenants/tenant/tenant-test-2-ABC898/vservers/vserver/vserver-test-2-ABC898" + } + ] + }, + { + "id": "41112", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-demo1", + "properties": { + "vnf-id": "generic-vnf-demo1", + "vnf-type": "example-vnf-type-val-3979-generic-vnf-demo1", + "prov-status": "IN-MAINT", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1559204957136" + }, + "related-to": [ + { + "id": "53264", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-demo-1" + } + ] + }, + { + "id": "4288", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-123ABC", + "properties": { + "vnf-id": "generic-vnf-test-0-123ABC", + "vnf-name": "example-vnf-name-val-3979", + "vnf-type": "example-vnf-type-val-3979", + "prov-status": "PROV", + "orchestration-status": "ALL-GOOD-orchestration-status", + "ipv4-loopback0-address": "ipv4-loopback0-address-ALL-GOOD-one", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1557779846272" + }, + "related-to": [ + { + "id": "4112", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-123ABC/licenses/license/license-test-1-123ABC/license-test-2-123ABC" + }, + { + "id": "4248", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-123ABC/entitlements/entitlement/entitlement-test-21-123ABC/entitlement-test-22-123ABC" + }, + { + "id": "4312", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-123ABC" + } + ] + }, + { + "id": "12480", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-50-123456", + "properties": { + "vnf-id": "generic-vnf-test-50-123456", + "vnf-name": "example-vnf-name-val-3979-2", + "vnf-type": "example-vnf-type-val-3979-2", + "prov-status": "ACTIVE", + "orchestration-status": "orchestration-status-2", + "ipv4-loopback0-address": "ipv4-loopback0-address-2", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1557862849169" + }, + "related-to": [ + { + "id": "12504", + "relationship-label": "org.onap.relationships.inventory.ComposedOf", + "node-type": "service-instance", + "url": "/aai/v15/business/customers/customer/customer-test-2-123456/service-subscriptions/service-subscription/service-subscription-test-2-123456/service-instances/service-instance/service-instance-test-2-123456" + }, + { + "id": "8440", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "vnfc", + "url": "/aai/v15/network/vnfcs/vnfc/vnfc-test-2-123456" + }, + { + "id": "16592", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "vnfc", + "url": "/aai/v15/network/vnfcs/vnfc/vnfc-test-1-123456" + }, + { + "id": "16520", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-3-123456/cr-test-4-123456/tenants/tenant/tenant-test-2-123456/vservers/vserver/vserver-test-2-123456" + } + ] + }, + { + "id": "12488", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABCD1234", + "properties": { + "vnf-id": "generic-vnf-test-0-ABCD1234", + "vnf-name": "example-vnf-name-val-3979", + "vnf-type": "example-vnf-type-val-3979", + "prov-status": "PROV", + "orchestration-status": "ALL-GOOD-orchestration-status", + "ipv4-loopback0-address": "ipv4-loopback0-address-ALL-GOOD-one", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1557782275938" + }, + "related-to": [ + { + "id": "8208", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABCD1234/licenses/license/license-test-1-ABCD1234/license-test-2-ABCD1234" + }, + { + "id": "8400", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABCD1234/entitlements/entitlement/entitlement-test-21-ABCD1234/entitlement-test-22-ABCD1234" + }, + { + "id": "4344", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABCD1234" + } + ] + } + ] +} diff --git a/src/app/assets/stubs/nodeLifeCycle.json b/src/app/assets/stubs/nodeLifeCycle.json new file mode 100644 index 0000000..113dddc --- /dev/null +++ b/src/app/assets/stubs/nodeLifeCycle.json @@ -0,0 +1,231 @@ +{ + "results": [ + { + "id": "4256", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test", + "properties": [ + { + "key": "orchestration-status", + "value": "good-orchestration-status", + "timestamp": 1558031743832, + "end-timestamp": 1558031777175, + "sot": "F-Test-ABC890", + "end-sot": "SO-ABC890" + }, + { + "key": "in-maint", + "value": false, + "timestamp": 1558031743832, + "end-timestamp": 1559237213226, + "sot": "F-Test-ABC890", + "end-sot": "SO" + }, + { + "key": "prov-status", + "value": "ACTIVE", + "timestamp": 1558031743832, + "end-timestamp": 1558031761866, + "sot": "F-Test-ABC890", + "end-sot": "RO-ABC890" + }, + { + "key": "vnf-type", + "value": "FW", + "timestamp": 1558031743832, + "end-timestamp": 1558031808199, + "sot": "F-Test-ABC890", + "end-sot": "H-ABC890" + }, + { + "key": "ipv4-loopback0-address", + "value": "ipv4-loopback0-address-good-one", + "timestamp": 1558031743832, + "end-timestamp": 1558031808199, + "sot": "F-Test-ABC890", + "end-sot": "H-ABC890" + }, + { + "key": "prov-status", + "value": "PROV", + "timestamp": 1558031761866, + "end-timestamp": 1559240185158, + "sot": "RO-ABC890", + "end-sot": "SO" + }, + { + "key": "orchestration-status", + "value": "BAD-orchestration-status", + "timestamp": 1558031777175, + "end-timestamp": 1558031792461, + "sot": "SO-ABC890", + "end-sot": "P-ABC890" + }, + { + "key": "orchestration-status", + "value": "ALL-GOOD-orchestration-status", + "timestamp": 1558031792461, + "end-timestamp": 1559240185158, + "sot": "P-ABC890", + "end-sot": "SO" + }, + { + "key": "vnf-type", + "value": "example-vnf-type-val-3979", + "timestamp": 1558031808199, + "end-timestamp": 1559234935335, + "sot": "H-ABC890", + "end-sot": "SO-dev" + }, + { + "key": "ipv4-loopback0-address", + "value": "ipv4-loopback0-address-BAD-one", + "timestamp": 1558031823773, + "end-timestamp": 1558031839071, + "sot": "B-ABC890", + "end-sot": "M-ABC890" + }, + { + "key": "ipv4-loopback0-address", + "value": "ipv4-loopback0-address-ALL-GOOD-one", + "timestamp": 1558031839071, + "sot": "M-ABC890" + }, + { + "key": "vnf-type", + "value": "example-vnf-type-val-3979-type-1", + "timestamp": 1559234935335, + "end-timestamp": 1559235872827, + "sot": "SO-dev", + "end-sot": "SO-dev" + }, + { + "key": "vnf-type", + "value": "example-vnf-type-val-3979-type-2", + "timestamp": 1559235872827, + "end-timestamp": 1559237141294, + "sot": "SO-dev", + "end-sot": "SO" + }, + { + "key": "vnf-type", + "value": "vnf-type-onap-sic", + "timestamp": 1559237141294, + "sot": "SO" + }, + { + "key": "in-maint", + "value": true, + "timestamp": 1559237213226, + "end-timestamp": 1559240185158, + "sot": "SO", + "end-sot": "SO" + }, + { + "key": "orchestration-status", + "value": "INACTIVE", + "timestamp": 1559240185158, + "end-timestamp": 1559248669446, + "sot": "SO", + "end-sot": "TESTSOURCE" + }, + { + "key": "in-maint", + "value": false, + "timestamp": 1559240185158, + "end-timestamp": 1559248669446, + "sot": "SO", + "end-sot": "TESTSOURCE" + }, + { + "key": "prov-status", + "value": "PRE-PROV", + "timestamp": 1559240185158, + "end-timestamp": 1559248669446, + "sot": "SO", + "end-sot": "TESTSOURCE" + }, + { + "key": "orchestration-status", + "value": "ACTIVE", + "timestamp": 1559248669446, + "sot": "TESTSOURCE" + }, + { + "key": "in-maint", + "value": true, + "timestamp": 1559248669446, + "sot": "TESTSOURCE" + }, + { + "key": "prov-status", + "value": "PROV", + "timestamp": 1559248669446, + "sot": "TESTSOURCE" + } + ], + "related-to": [ + { + "id": "4152", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/licenses/license/license-test-1-ABC890/license-test-2-ABC890", + "timestamp": 1558031744142, + "end-timestamp": 1558031854596, + "sot": "F-Test-ABC890", + "end-sot": "M-ABC890" + }, + { + "id": "8312", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "license", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/licenses/license/license-test-1-ABC890/license-test-2-ABC890", + "timestamp": 1558031870276, + "end-timestamp": 0, + "sot": "N-ABC890", + "end-sot": "" + }, + { + "id": "8352", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/entitlements/entitlement/entitlement-test-11-ABC890/entitlement-test-12-ABC890", + "timestamp": 1558031744433, + "end-timestamp": 1558031885834, + "sot": "F-Test-ABC890", + "end-sot": "S-ABC890" + }, + { + "id": "12344", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "node-type": "entitlement", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/generic-vnf-test-0-ABC890/entitlements/entitlement/entitlement-test-21-ABC890/entitlement-test-22-ABC890", + "timestamp": 1558031901473, + "end-timestamp": 0, + "sot": "R-ABC890", + "end-sot": "" + }, + { + "id": "8248", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "pserver", + "url": "/aai/v15/cloud-infrastructure/pservers/pserver/pserver-test-1-ABC890", + "timestamp": 1558031744746, + "end-timestamp": 0, + "sot": "F-Test-ABC890", + "end-sot": "" + }, + { + "id": "8400", + "relationship-label": "tosca.relationships.HostedOn", + "node-type": "vserver", + "url": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cr-test-5-ABC890/cr-test-6-ABC890/tenants/tenant/tenant-test-3-ABC890/vservers/vserver/vserver-test-3-ABC890", + "timestamp": 1558031746239, + "end-timestamp": 0, + "sot": "F-Test-ABC890", + "end-sot": "" + } + ] + } + ] +} diff --git a/src/app/assets/stubs/nodeLifeCycleSince.json b/src/app/assets/stubs/nodeLifeCycleSince.json new file mode 100644 index 0000000..5d7fe11 --- /dev/null +++ b/src/app/assets/stubs/nodeLifeCycleSince.json @@ -0,0 +1,84 @@ +{ + "results": [ + { + "id": "4256", + "node-type": "generic-vnf", + "url": "/aai/v15/network/generic-vnfs/generic-vnf/testapp1", + "properties": [ + { + "key": "vnf-type", + "value": "example-vnf-type-val-3979-type-1", + "timestamp": 1559234935335, + "end-timestamp": 1559235872827, + "sot": "testsource-dev", + "end-sot": "testsource-dev" + }, + { + "key": "vnf-type", + "value": "example-vnf-type-val-3979-type-2", + "timestamp": 1559235872827, + "end-timestamp": 1559237141294, + "sot": "testsource-dev", + "end-sot": "SO" + }, + { + "key": "vnf-type", + "value": "vnf-type-onap-sic", + "timestamp": 1559237141294, + "sot": "SO" + }, + { + "key": "in-maint", + "value": true, + "timestamp": 1559237213226, + "end-timestamp": 1559240185158, + "sot": "SO", + "end-sot": "SO" + }, + { + "key": "orchestration-status", + "value": "INACTIVE", + "timestamp": 1559240185158, + "end-timestamp": 1559248669446, + "sot": "SO", + "end-sot": "TESTSOURCE" + }, + { + "key": "in-maint", + "value": false, + "timestamp": 1559240185158, + "end-timestamp": 1559248669446, + "sot": "SO", + "end-sot": "TESTSOURCE" + }, + { + "key": "prov-status", + "value": "PRE-PROV", + "timestamp": 1559240185158, + "end-timestamp": 1559248669446, + "sot": "SO", + "end-sot": "TESTSOURCE" + }, + { + "key": "orchestration-status", + "value": "ACTIVE", + "timestamp": 1559248669446, + "sot": "TESTSOURCE" + }, + { + "key": "in-maint", + "value": true, + "timestamp": 1559248669446, + "sot": "TESTSOURCE" + }, + { + "key": "prov-status", + "value": "PROV", + "timestamp": 1559248669446, + "sot": "TESTSOURCE" + } + ], + "related-to": [] + } + ] +} diff --git a/src/app/browse/Browse.jsx b/src/app/browse/Browse.jsx new file mode 100644 index 0000000..918388a --- /dev/null +++ b/src/app/browse/Browse.jsx @@ -0,0 +1,83 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React, { Component } from 'react'; +import BrowseGallery from './BrowseGallery.jsx'; +import { GlobalExtConstants } from 'utils/GlobalExtConstants.js'; +import {ExportExcel} from 'utils/ExportExcel.js'; + +let INVLIST = GlobalExtConstants.INVLIST; +let getDescriptionForNodes = ExportExcel.getDescriptionForNodes; + +/** + * The Browse container is responsible for the browse page in the app. + * This container displays all the different node types you can explore, + * and provides links to navigate to the Model container where you can explore + * specific nodes. + */ + +let invList = null; + +class Browse extends Component { + + render() { + // Grab the inv list json file, map all the node types and sort it + const invKeys = Object.keys(INVLIST.INVENTORYLIST); + + invList = invKeys.map(item => { + return { item: item, detail: INVLIST.INVENTORYLIST[item] }; + }); + + + invList.sort((a, b) => { + var displayA = a.detail.display.toLowerCase(); + var displayB = b.detail.display.toLowerCase(); + + if (displayA < displayB) { + return -1; + } + + if (displayA > displayB) { + return 1; + } + + return 0; + }); + + let nodesDesc=getDescriptionForNodes(); + return ( + <div> + <header className='addPadding jumbotron my-4'> + <h1 className='display-2'>Browse Network Elements</h1> + <p className='lead'> + On this page you have the ability to browse the entire inventory of the database by network element type. Simply choose the network element type you would like to browse. + </p> + </header> + <div className='browse-content'> + <BrowseGallery + invList={invList} + descriptionList={nodesDesc}/> + </div> + </div> + ); + } +} + +export default Browse; diff --git a/src/app/browse/BrowseCard.jsx b/src/app/browse/BrowseCard.jsx new file mode 100644 index 0000000..dafb878 --- /dev/null +++ b/src/app/browse/BrowseCard.jsx @@ -0,0 +1,45 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React from 'react'; +import Col from 'react-bootstrap/lib/Col'; +import { Link } from 'react-router-dom'; + +const BrowseCard = (props) => ( +<Link to={'/model/' + props.browseModel}> + <Col lg={2} md={3} sm={4}> + <div className='card' title={props.browseDesc}> + <div className='card-content browse-card-content'> + <i className={props.browseIcon} aria-hidden='true'> </i> + <div className='card-block'> + <h3 className='card-title'> + {props.browseName} + </h3> + </div> + </div> + <div className='card-footer'> + <button type='button' className='btn btn-outline-primary'>Browse</button> + </div> + </div> + </Col> + </Link> +); + +export default BrowseCard; diff --git a/src/app/browse/BrowseConstants.js b/src/app/browse/BrowseConstants.js new file mode 100644 index 0000000..4060806 --- /dev/null +++ b/src/app/browse/BrowseConstants.js @@ -0,0 +1,19 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ diff --git a/src/app/browse/BrowseGallery.jsx b/src/app/browse/BrowseGallery.jsx new file mode 100644 index 0000000..6ead03c --- /dev/null +++ b/src/app/browse/BrowseGallery.jsx @@ -0,0 +1,51 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React from 'react'; +import BrowseCard from 'app/browse/BrowseCard.jsx'; +import Grid from 'react-bootstrap/lib/Grid'; +import Row from 'react-bootstrap/lib/Row'; + +const browseGallery = (props) => { + + // Build all the BrowseCards + const cards = props.invList.map((item) => { + return ( + <BrowseCard + key={item.item} + browseItem={item.item} + browseName={item.detail.display} + browseModel={item.detail.modelPath} + browseIcon={item.detail.icon} + browsePath={item.detail.apiPath} + browseDesc={props.descriptionList[0][item.detail.modelPath]}/> + ); + }); + // Return jsx to caller + return ( + <Grid> + <Row className='show-grid'> + {cards} + </Row> + </Grid> + ); +}; + +export default browseGallery; diff --git a/src/app/byoq/CustomDSLSaveLoad.jsx b/src/app/byoq/CustomDSLSaveLoad.jsx new file mode 100644 index 0000000..e106e4a --- /dev/null +++ b/src/app/byoq/CustomDSLSaveLoad.jsx @@ -0,0 +1,842 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React, { Component } from 'react'; + +import commonApi from 'utils/CommonAPIService.js'; +import {GlobalExtConstants} from 'utils/GlobalExtConstants.js'; +import Spinner from 'utils/SpinnerContainer.jsx'; +import Grid from 'react-bootstrap/lib/Grid'; +import Row from 'react-bootstrap/lib/Row'; +import Col from 'react-bootstrap/lib/Col'; +import Button from 'react-bootstrap/lib/Button'; +import Modal from 'react-bootstrap/lib/Modal'; +import Tabs from 'react-bootstrap/lib/Tabs'; +import Tab from 'react-bootstrap/lib/Tab'; +import Pagination from 'react-js-pagination'; +import OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger'; +import Tooltip from 'react-bootstrap/lib/Tooltip'; +import Panel from 'react-bootstrap/lib/Panel'; +import {GeneralCommonFunctions} from 'utils/GeneralCommonFunctions.js'; +import Alert from 'react-bootstrap/lib/Alert'; +import MultiSelectDropDown from 'generic-components/MultiSelectDropDown.jsx'; +let ENVIRONMENT = GlobalExtConstants.ENVIRONMENT; +let APERTURE_SERVICE = JSON.parse(sessionStorage.getItem(ENVIRONMENT + 'APERTURE_SERVICE')); + +let INVLIST = GlobalExtConstants.INVLIST; + +const settings = { + 'NODESERVER': INVLIST.NODESERVER, + 'PROXY': INVLIST.PROXY, + 'PREFIX': INVLIST.PREFIX, + 'VERSION': INVLIST.VERSION, + 'USESTUBS': INVLIST.useStubs, + 'TABULAR': INVLIST.TABULAR, + 'APERTURE': INVLIST.APERTURE, + 'TABULARVERSION': INVLIST.TABULARVERSION +}; + +/** + * This class is used to handle any saving or loading of dsl queries + */ + +class CustomDSLSaveLoad extends Component { + + constructor(props) { + console.log(props); + super(props); + APERTURE_SERVICE=JSON.parse(sessionStorage.getItem(ENVIRONMENT + 'APERTURE_SERVICE')); + this.state = { + enablePublicQueriesBusyFeedback: false, + enableCommunityQueriesBusyFeedback: false, + enablePersonalQueriesBusyFeedback: false, + enableDeleteBusyFeedback: false, + loadedPublicQueries: [], + loadedCommunityQueries: [], + loadedPersonalQueries: [], + filteredPublicEntries: [], + filteredCommunityEntries: [], + filteredPersonalEntries: [], + initialFilteredPublicEntries: [], + initialFilteredCommunityEntries: [], + initialFilteredPersonalEntries:[], + totalPublicResults: 0, + totalCommunityResults: 0, + totalPersonalResults: 0, + queriesPublicErrMsg: false, + queriesCommunityErrMsg: false, + queriesPersonalErrMsg: false, + deleteErrMsg: false, + deleteSuccessfulMsg: false, + focusedEntryName: '', + focusedEntryType: false, + showDeleteModal: false, + filterPublicCriteria: '', + filterCommunityCriteria: '', + filterPersonalCriteria: '', + displayValue:'Category', + selectedOption:{"public":[],"community":[],"personal":[]}, + filterText:'', + activeType:'public', + queryId:'', + loadQueryList:[], + publicLoadQueryList:[], + personalLoadQueryList:[], + communityLoadQueryList:[], + loadQueryLimit:parseInt(sessionStorage.getItem(ENVIRONMENT + 'LOADTEMPLATE_MAX_COUNT')), + loadQueryFlag:true, + selectedCount:0 + }; + settings['ISAPERTURE']=APERTURE_SERVICE; + } + componentDidMount = () => { + this.setState({enablePersonalQueriesBusyFeedback:true,enablePublicQueriesBusyFeedback:true,enableCommunityQueriesBusyFeedback:true}); + this.getQueries(); + }; + componentWillUnmount = () => {}; + + filterPublicList = (event) =>{ + this.filterPublicListWithCategory(event.target.value); + } + filterPublicListWithCategory = (value) =>{ + var updatedList = this.state.loadedPublicQueries; + updatedList = Object.keys(updatedList).filter(key => { + return JSON.stringify(updatedList[key]).toLowerCase().search(value.toLowerCase()) !== -1; + }).reduce( (res, key) => Object.assign(res, { [key]: updatedList[key] }), {} ); + let filterList=this.filterUpdatedList(updatedList, "public"); + console.log('filterPublicListWithCategory filterList>>>>>',filterList); + this.setState({filteredPublicEntries: filterList, totalPublicResults: Object.keys(filterList).length, filterPublicCriteria: value,filterText: value.toLowerCase()}); + } + filterCommunityList = (event) =>{ + this.filterCommunityListWithCategory(event.target.value); + } + filterCommunityListWithCategory = (value) =>{ + var updatedList = this.state.loadedCommunityQueries; + updatedList = Object.keys(updatedList).filter(key => { + return JSON.stringify(updatedList[key]).toLowerCase().search(value.toLowerCase()) !== -1; + }).reduce( (res, key) => Object.assign(res, { [key]: updatedList[key] }), {} ); + let filterList=this.filterUpdatedList(updatedList, "community"); + console.log('filterCommunityListWithCategory filterList>>>>>',filterList); + this.setState({filteredCommunityEntries: filterList, totalCommunityResults: Object.keys(filterList).length, filterCommunityCriteria: value,filterText: value.toLowerCase()}); + } + filterPersonalList = (event) =>{ + this.filterPersonalListWithCategory(event.target.value); + } + filterPersonalListWithCategory =(value) =>{ + var updatedList = this.state.loadedPersonalQueries; + updatedList = Object.keys(updatedList).filter(key => { + return JSON.stringify(updatedList[key]).toLowerCase().search(value.toLowerCase()) !== -1; + }).reduce( (res, key) => Object.assign(res, { [key]: updatedList[key] }), {} ); + let filterList=this.filterUpdatedList(updatedList, "personal"); + console.log('filterPersonalListWithCategory filterList>>>>>',filterList); + this.setState({filteredPersonalEntries: filterList, totalPersonalResults: Object.keys(filterList).length, filterPersonalCriteria: value,filterText: value.toLowerCase()}); + } + filterUpdatedList = (updatedList, type) =>{ + let selectedCategory = this.state.selectedOption[type]; + let filterList = []; + let selectedOption = []; + if(selectedCategory.length > 0){ + selectedOption = Object.keys(selectedCategory).map((index)=>{ + return selectedCategory[index].value; + }); + Object.keys(updatedList).map((key) => { + Object.keys(updatedList[key]).map((entry) => { + if(entry === 'category' && selectedOption.indexOf(updatedList[key][entry]) !==-1){ + filterList[key]=updatedList[key]; + } + }) + }); + }else{ + filterList=updatedList; + } + return filterList; + } + processQueryResponse = (res) => { + var formattedList = []; + for(var i = 0; i < res.length; i++){ + var newQueryObj = {}; + var requiredFieldCount = 0; + if(res[i]){ + newQueryObj.isSelect=false; + newQueryObj.id = res[i].id; + newQueryObj['is_aggregate'] = false; + newQueryObj['is_public'] = false; + newQueryObj['community_shared'] = false; + newQueryObj['template_details'] = []; + for(var j = 0; j < res[i].cols.length; j++){ + if(res[i].cols[j].name){ + if(res[i].cols[j].name === 'query_name'){ + requiredFieldCount++; + newQueryObj.name = res[i].cols[j].value; + } + if(res[i].cols[j].name === 'creator'){ + requiredFieldCount++; + newQueryObj.creator = res[i].cols[j].value; + } + if(res[i].cols[j].name === 'dsl'){ + requiredFieldCount++; + newQueryObj.dsl = res[i].cols[j].value; + } + if(res[i].cols[j].name === 'description'){ + newQueryObj.description = res[i].cols[j].value; + } + if(res[i].cols[j].name === 'is_aggregate'){ + newQueryObj['is_aggregate'] = res[i].cols[j].value; + } + if(res[i].cols[j].name === 'is_public'){ + newQueryObj['is_public'] = res[i].cols[j].value; + } + if(res[i].cols[j].name === 'community_shared'){ + newQueryObj['community_shared'] = res[i].cols[j].value; + } + if(res[i].cols[j].name === 'template_details'){ + newQueryObj['template_details'] = res[i].cols[j].value; + } + if(res[i].cols[j].name === 'category'){ + newQueryObj['category'] = res[i].cols[j].value; + } + } + } + newQueryObj.version = res[i].version; + } + if(requiredFieldCount === 3){ + formattedList[res[i].id] = newQueryObj; + }else{ + console.log('Issue occurred on query list processing for the following element: ' + JSON.stringify(newQueryObj)); + } + } + return formattedList; + } + + getPublicQueries = () => { + settings['ISTABULAR'] = true; + return new Promise((resolve, reject) => { + commonApi(settings, 'queries/is_public=true', 'GET', null, 'BYOQPublicQueries', GlobalExtConstants.OVERRIDE_DOMAIN) + .then(res => { + console.log('res:' + res.data, 'load'); + if(res.status === 200 || res.status === 404){ + if(res.data.status && (res.data.status !== 200 && res.data.status !== 201 && res.data.status !== 404)){ + this.triggerError(res.data); + }else{ + var list = this.processQueryResponse(res.data); + this.setState({ + enablePublicQueriesBusyFeedback:false, + filteredPublicEntries: list, + initialFilteredPublicEntries: list, + totalPublicResults: Object.keys(list).length, + loadedPublicQueries: list + }); + this.runPublicFilter(); + resolve(list); + } + }else{ + this.triggerError(res.data, 'public_load'); + } + resolve([]); + }, error=>{ + if(error.response.status === 404){ + this.setState({ + enablePublicQueriesBusyFeedback:false, + filteredPublicEntries: [], + totalPublicResults: 0, + initialFilteredPublicEntries:[], + loadedPublicQueries: [] + }); + }else{ + this.triggerError(error.response.data, 'public_load'); + } + resolve([]); + }).catch(error => { + this.triggerError(error, 'public_load'); + resolve([]); + }) + }) + } + getCommunityQueries = () => { + settings['ISTABULAR'] = true; + return new Promise((resolve, reject) => { + commonApi(settings, 'queries/community_shared=true', 'GET', null, 'BYOQCommunityQueries', GlobalExtConstants.OVERRIDE_DOMAIN) + .then(res => { + console.log('res:' + res.data, 'load'); + if(res.status === 200 || res.status === 404){ + if(res.data.status && (res.data.status !== 200 && res.data.status !== 201 && res.data.status !== 404)){ + this.triggerError(res.data); + }else{ + var list = this.processQueryResponse(res.data); + this.setState({ + enableCommunityQueriesBusyFeedback:false, + filteredCommunityEntries: list, + initialFilteredCommunityEntries: list, + totalCommunityResults: Object.keys(list).length, + loadedCommunityQueries: list + }); + this.runCommunityFilter(); + resolve(list); + } + }else{ + this.triggerError(res.data, 'community_load'); + } + resolve([]); + }, error=>{ + if(error.response.status === 404){ + this.setState({ + enableCommunityQueriesBusyFeedback:false, + filteredCommunityEntries: [], + totalCommunityResults: 0, + initialFilteredCommunityEntries:[], + loadedCommunityQueries: [] + }); + }else{ + this.triggerError(error.response.data, 'community_load'); + } + resolve([]); + }).catch(error => { + this.triggerError(error, 'community_load'); + resolve([]); + }) + }) + } + getPrivateQueries = () => { + settings['ISTABULAR'] = true; + let query='queries/is_public=false'; + if(sessionStorage.getItem(GlobalExtConstants.ENVIRONMENT + 'userId')){ + query+='&creator=' + sessionStorage.getItem(GlobalExtConstants.ENVIRONMENT + 'userId'); + } + return new Promise((resolve, reject) => { + commonApi(settings, 'queries/is_public=false&creator=' + sessionStorage.getItem(GlobalExtConstants.ENVIRONMENT + 'userId'), 'GET', null, 'BYOQPersonalQueries', GlobalExtConstants.OVERRIDE_DOMAIN) + .then(res => { + console.log('res:' + res.data, 'load'); + if(res.status === 200 || res.status === 404){ + if(res.data.status && (res.data.status !== 200 && res.data.status !== 201 && res.data.status !== 404)){ + this.triggerError(res.data); + }else{ + var list = this.processQueryResponse(res.data); + this.setState({ + enablePersonalQueriesBusyFeedback:false, + filteredPersonalEntries: list, + initialFilteredPersonalEntries: list, + totalPersonalResults: Object.keys(list).length, + loadedPersonalQueries: list + }); + this.runPersonalFilter(); + resolve(list); + } + }else{ + this.triggerError(res.data, 'personal_load'); + } + resolve([]); + }, error=>{ + if(error.response.status === 404){ + this.setState({ + enablePersonalQueriesBusyFeedback:false, + filteredPersonalEntries: [], + initialFilteredPersonalEntries: [], + totalPersonalResults: 0, + loadedPersonalQueries: [] + }); + }else{ + this.triggerError(error.response.data, 'personal_load'); + } + resolve([]); + }).catch(error => { + this.triggerError(error, 'personal_load'); + resolve([]); + }) + }) + } + getQueries = () =>{ + var state = this; + this.getCommunityQueries(); + Promise.all([ + this.getPublicQueries(), + this.getPrivateQueries() + ]) + .then(function (responses) { + var result = Object.assign({}, responses[0], responses[1]); + state.props.setQueriesState(result); + state.setState({loadQueryList:[],publicLoadQueryList:[],personalLoadQueryList:[],communityLoadQueryList:[],selectedCount:0}); + }).catch(function (error) { + console.log(error); + }); + }; + triggerError = (error, type) => { + console.error('[CustomDslSaveLoad.jsx] error : ', JSON.stringify(error)); + let errMsg = ''; + if(error.status && error.message){ + errMsg += "Error Occurred: " + error.status + ' - ' +error.message; + }else{ + errMsg += "Error Occurred: " + JSON.stringify(error); + } + console.log(errMsg); + if(type === 'public_load'){ + this.setState({queriesPublicErrMsg:errMsg, + enablePublicQueriesBusyFeedback:false, + filteredPublicEntries: [], + totalPublicResults: 0, + loadedPublicQueries: []}); + var result = Object.assign({}, [], this.state.loadedPersonalQueries); + this.props.setQueriesState(result); + }else if(type === 'personal_load'){ + this.setState({queriesPersonalErrMsg:errMsg, + enablePersonalQueriesBusyFeedback:false, + filteredPersonalEntries: [], + totalPersonalResults: 0, + loadedPersonalQueries: []}); + var result = Object.assign({}, this.state.loadedPublicQueries, []); + this.props.setQueriesState(result); + }else if(type === 'community_load'){ + this.setState({queriesCommunityErrMsg:errMsg, + enableCommunityQueriesBusyFeedback:false, + filteredCommunityEntries: [], + totalCommunityResults: 0, + loadedCommunityQueries: []}); + var result = Object.assign({}, this.state.loadedCommunityQueries, []); + this.props.setQueriesState(result); + }else if (type === 'delete'){ + this.setState({deleteErrMsg: errMsg + " - Failed to delete query : " + this.state.focusedEntryName, enableDeleteBusyFeedback:false}); + GeneralCommonFunctions.scrollTo("deleteError"); + }else{ + console.log('[CustomDslSaveLoad.jsx] :: triggerError invoked with invalid type : ' + type); + } + } + + runPublicFilter = () =>{ + var updatedList = this.state.loadedPublicQueries; + updatedList = Object.keys(updatedList).filter(key => { + return JSON.stringify(updatedList[key]).toLowerCase().search(this.state.filterPublicCriteria.toLowerCase()) !== -1; + }).reduce( (res, key) => Object.assign(res, { [key]: updatedList[key] }), {} ); + this.setState({filteredPublicEntries: updatedList, totalPublicResults: Object.keys(updatedList).length},()=>{if(this.state.selectedOption["public"].length>0){this.filterPublicListWithCategory(this.state.filterPublicCriteria)}}); + } + runCommunityFilter = () =>{ + var updatedList = this.state.loadedCommunityQueries; + updatedList = Object.keys(updatedList).filter(key => { + return JSON.stringify(updatedList[key]).toLowerCase().search(this.state.filterCommunityCriteria.toLowerCase()) !== -1; + }).reduce( (res, key) => Object.assign(res, { [key]: updatedList[key] }), {} ); + this.setState({filteredCommunityEntries: updatedList, totalCommunityResults: Object.keys(updatedList).length},()=>{if(this.state.selectedOption["community"].length>0){this.filterCommunityListWithCategory(this.state.filterCommunityCriteria)}}); + } + runPersonalFilter = () =>{ + var updatedList = this.state.loadedPersonalQueries; + updatedList = Object.keys(updatedList).filter(key => { + return JSON.stringify(updatedList[key]).toLowerCase().search(this.state.filterPersonalCriteria.toLowerCase()) !== -1; + }).reduce( (res, key) => Object.assign(res, { [key]: updatedList[key] }), {} ); + this.setState({filteredPersonalEntries: updatedList, totalPersonalResults: Object.keys(updatedList).length},()=>{if(this.state.selectedOption["personal"].length>0){this.filterPersonalListWithCategory(this.state.filterPersonalCriteria)}}); + } + + addElement = (element) =>{ + var updatedList = this.state.loadedPublicQueries; + updatedList[element.id] = element[0]; + this.setState({loadedPublicQueries: updatedList}); + this.props.setQueriesState(updatedList); + this.runPublicFilter(); + } + + submitDelete = () =>{ + var loadedQueries = []; + if(this.state.focusedEntryType === "personal"){ + loadedQueries = this.state.loadedPersonalQueries; + }else{ + loadedQueries = this.state.loadedPublicQueries; + } + this.setState({enableDeleteBusyFeedback:true}); + settings['ISTABULAR'] = true; + commonApi(settings, 'queries/' + encodeURIComponent(this.state.queryId), 'DELETE', '{\"id\":\"' + + encodeURIComponent(this.state.queryId) + '\"}', 'BYOQDeleteQuery', GlobalExtConstants.OVERRIDE_DOMAIN, null, + [{ + "name":"If-Match", + "value": loadedQueries[this.state.queryId].version + }]) + .then(res => { + console.log('res:' + res.data); + if(res.status === 200){ + if(res.data.status && (res.data.status !== 200 && res.data.status !== 201)){ + this.triggerError(res.data, 'delete'); + }else{ + var updatedList = loadedQueries; + //remove the entry from the list + updatedList = Object.keys(updatedList).filter(key => { + return key !== this.state.queryId; + }).reduce( (res, key) => Object.assign(res, { [key]: updatedList[key] }), {} ); + this.setState({showDeleteModal:false, + focusedEntryName: '', + enableDeleteBusyFeedback:false, + deleteSuccessfulMsg: "Successfully deleted query : " + this.state.focusedEntryName}); + GeneralCommonFunctions.scrollTo("deleteSuccess"); + if(this.state.focusedEntryType === "personal"){ + this.getCommunityQueries(); + this.setState({loadedPersonalQueries: updatedList}); + var result = Object.assign({}, this.state.loadedPublicQueries, updatedList); + this.props.setQueriesState(result); + }else{ + this.setState({loadedPublicQueries: updatedList}); + var result = Object.assign({}, updatedList, this.state.loadedPersonalQueries); + this.props.setQueriesState(result); + } + this.runPublicFilter(); + this.runCommunityFilter(); + this.runPersonalFilter(); + } + }else{ + this.triggerError(res.data, 'delete'); + } + }, error=>{ + this.triggerError(error.response.data, 'delete'); + }).catch(error => { + this.triggerError(error, 'delete'); + }); + }; + + openDeleteModal = (id,name, isPublic) =>{ + var focusedEntryType = "public"; + if(isPublic === "true"){ + focusedEntryType = "public"; + }else{ + focusedEntryType = "personal"; + } + this.setState({showDeleteModal:true, focusedEntryName: name, focusedEntryType: focusedEntryType, deleteSuccessfulMsg:false, deleteErrMsg:false, queryId:id}); + }; + + closeDeleteModal = () =>{ + this.setState({showDeleteModal:false, focusedEntryName: '', focusedEntryType: false, deleteSuccessfulMsg:false, deleteErrMsg:false, queryId:''}); + }; + + loadQuery = (e) =>{ + this.loadQueryData(e.target.value,0); + }; + loadQueryData=(queryTemp, id)=>{ + let splitString = queryTemp.split('||'); + let name = splitString[0]; + let description = splitString[1]; + let category=(splitString[2] !== 'undefined')? splitString[2]:''; + let dsl = splitString[3]; + let isAggregate = splitString[4]; + let type = splitString[5]; + let queryId = splitString[6]; + let isCommunityShared = splitString[7]; + let templateDetails = splitString[8]; + this.props.loadCallback(name, description, category, dsl, isAggregate, type, queryId, isCommunityShared, id, templateDetails, false); + }; + loadBulkCallback =() =>{ + this.props.loadBulkCallback(this.state.loadQueryList); + } + loadAndRunQuery = (e) =>{ + let splitString = (e.target.value).split('||'); + let dsl = splitString[0]; + let isAggregate = splitString[1]; + this.props.loadCallback('', '', '', dsl, isAggregate, null, '', null, 0, [], true); + }; + onMultiSelectPublicDropdownSelect = (selectedOption) =>{ + console.log('onMultiSelectPublicDropdownSelect selectedList',selectedOption); + var tempSelection = this.state.selectedOption; + tempSelection["public"] = selectedOption; + this.setState({selectedOption:tempSelection},()=>{this.filterPublicListWithCategory(this.state.filterPublicCriteria)}); + }; + onMultiSelectCommunityDropdownSelect = (selectedOption) =>{ + console.log('onMultiSelectCommunityDropdownSelect selectedList',selectedOption); + var tempSelection = this.state.selectedOption; + tempSelection["community"] = selectedOption; + this.setState({selectedOption:tempSelection},()=>{this.filterCommunityListWithCategory(this.state.filterCommunityCriteria)}); + }; + onMultiSelectPersonalDropdownSelect = (selectedOption) =>{ + console.log('onMultiSelectPersonalDropdownSelect selectedList',selectedOption); + var tempSelection = this.state.selectedOption; + tempSelection["personal"] = selectedOption; + this.setState({selectedOption:tempSelection},()=>{this.filterPersonalListWithCategory(this.state.filterPersonalCriteria)}); + }; + prepareMultiOptions = (type) => { + //this.setState({activeType:type}); + let filteredEntries=[]; + if(type==='public'){ + filteredEntries=this.state.initialFilteredPublicEntries; + }else if(type==='community'){ + filteredEntries=this.state.initialFilteredCommunityEntries; + }else{ + filteredEntries=this.state.initialFilteredPersonalEntries; + } + let dupArray=[]; + let multiOption=Object.keys(filteredEntries).map((entry, idx) => { + let obj ={}; + if(filteredEntries[entry]['category'] && dupArray.indexOf(filteredEntries[entry]['category']) === -1){ + obj['value']=filteredEntries[entry]['category']; + obj['label']= filteredEntries[entry]['category']; + dupArray.push(filteredEntries[entry]['category']); + }else{ + obj=''; + } + return obj; + }); + let filterMultiOption = multiOption.filter((entry) => { + if(entry !== '') return entry; + }); + console.log('filterMultiOption>>>>>',filterMultiOption); + return filterMultiOption; + }; + editSavedQuery = (e) =>{ + let splitString = (e.target.value).split('||'); + let name = splitString[0]; + let description = splitString[1]; + let category = (splitString[2] !== 'undefined')? splitString[2]:''; + let dsl = atob(splitString[3]).replace('<pre>','').replace('</pre>',''); + let isAggregate = splitString[4]; + let type = splitString[5]; + let queryId= splitString[6]; + let isCommunityShared = splitString[7]; + let templateDetails = splitString[8]; + this.props.editCallback(name, description, category, dsl, isAggregate, type, queryId, isCommunityShared, templateDetails); + }; + loadAllQueries = () =>{ + console.log('this.state.loadQueryList>>>>',this.state.loadQueryList); + let loadQueryList=this.state.loadQueryList; + for(var l=0;l<loadQueryList.length;l++){ + this.loadQueryData(loadQueryList[l],l); + } + }; + onSelectCheckbox=(e) =>{ + let splitString = (e.target.value).split('||'); + let type = splitString[5]; + let queryId=splitString[6]; + let queryList=''; + let loadQuery=''; + if(type =='public'){ + queryList=this.state.filteredPublicEntries; + loadQuery= this.state.publicLoadQueryList; + }else if (type == 'personal'){ + queryList=this.state.filteredPersonalEntries; + loadQuery= this.state.personalLoadQueryList; + }else{ + queryList=this.state.filteredCommunityEntries; + loadQuery= this.state.communityLoadQueryList; + } + let flag= true; + if (e.target.checked) { + if(loadQuery.length<10){ + loadQuery.push(e.target.value); + queryList[queryId].isSelect=true; + } + }else{ + let index=loadQuery.indexOf(e.target.value); + loadQuery.splice(index,1); + queryList[queryId].isSelect=false; + } + flag=(loadQuery.length<=10)?true:false; + if(type=='public'){ + this.setState({loadQueryList:loadQuery,publicLoadQueryList:loadQuery,personalLoadQueryList:[],communityLoadQueryList:[],filteredPublicEntries:queryList,loadQueryFlag:flag,selectedCount:loadQuery.length}); + }else if(type=='personal'){ + this.setState({loadQueryList:loadQuery,personalLoadQueryList:loadQuery,publicLoadQueryList:[],communityLoadQueryList:[],filteredPersonalEntries:queryList,loadQueryFlag:flag,selectedCount:loadQuery.length}); + } else{ + this.setState({loadQueryList:loadQuery,communityLoadQueryList:loadQuery,publicLoadQueryList:[],personalLoadQueryList:[],filteredCommunityEntries:queryList,loadQueryFlag:flag,selectedCount:loadQuery.length}); + } + } + render() { + let savedQueryCard = (type, totalCount, filterList, filteredEntries) =>{ + let onMultiSelectDropdownSelect= (type==='public') ? this.onMultiSelectPublicDropdownSelect : (type==='community') ? this.onMultiSelectCommunityDropdownSelect : this.onMultiSelectPersonalDropdownSelect; + return <div className='card d3-model-card'> + <div className={'card-header ' + (this.props.isSavedQueryFlow ? 'show' : 'hidden')}> + <div> + <h3>Find A Query</h3> + </div> + </div> + <div className='card-header'> + <div> + <div style={{width:'82%',float:'left'}}> + <h5>Total Saved Queries: <strong>{totalCount}</strong></h5> + </div> + <div className={(this.props.isSavedQueryFlow ? 'show' : 'hidden')}> + <OverlayTrigger placement='top' overlay={<Tooltip id='tooltip-top'>{'Enabled for up to '+this.state.loadQueryLimit+' Queries'}</Tooltip>}> + <span className="d-inline-block" style={{display: 'inline-block'}}> + <button className='btn btn-outline-primary' type='button' onClick={()=>this.loadBulkCallback()} disabled={!(this.state.loadQueryList.length<=10 && this.state.loadQueryList.length>0)}>Load Selected Queries</button> + </span> + </OverlayTrigger> + </div> + </div> + <div> + <form> + <div className='alignFormTwinElements'> + <fieldset className="form-group"> + <input type="text" className="form-control form-control-lg" placeholder="Search" onChange={filterList}/> + </fieldset> + </div> + <div className='alignFormTwinElements'> + <fieldset className="form-group"> + <MultiSelectDropDown + options={this.prepareMultiOptions(type)} + displayValue={this.state.displayValue} + triggerSelect={onMultiSelectDropdownSelect} + /> + </fieldset> + </div> + </form> + </div> + </div> + <div className='card-content model-card-content'> + <table className="table table-hover table-striped"> + <thead> + <tr> + <th scope='col' className={(this.props.isSavedQueryFlow ? 'show' : 'hidden')}>Select</th> + <th scope="col">Name</th> + <th scope="col">Description</th> + <th scope="col">Category</th> + <th scope="col">Creator</th> + <th scope="col">Aggregate</th> + <th scope="col" className={((type === 'personal') ? '' : 'hidden')}>Shared</th> + <th scope="col">Actions</th> + </tr> + </thead> + <tbody> + {Object.keys(filteredEntries).sort(function(a, b) { + var compareA = a.toUpperCase(); + var compareB = b.toUpperCase(); + if(compareA < compareB) return -1; + if(compareA > compareB) return 1; + return 0; + }).map((entry, idx) => { + return ( + <tr> + <td className={(this.props.isSavedQueryFlow ? '' : 'hidden')}> + <div className="checkbox"> + <OverlayTrigger placement='top' overlay={<Tooltip id='tooltip-top'>{(this.state.selectedCount===this.state.loadQueryLimit)?'Reached Maximun Template Count '+this.state.loadQueryLimit:(this.state.loadQueryLimit-this.state.selectedCount)+' More Selectable'}</Tooltip>}> + <span className="d-inline-block" style={{display: 'inline-block'}}> + <label> + <input type="checkbox" checked={filteredEntries[entry].isSelect} onChange={this.onSelectCheckbox.bind(this)} value={filteredEntries[entry].name + '||' + filteredEntries[entry].description + '||' + filteredEntries[entry].category + '||' + filteredEntries[entry].dsl + '||' + filteredEntries[entry]['is_aggregate'] + '||' + type + '||' + entry + '||' + filteredEntries[entry]['community_shared'] + '||' + filteredEntries[entry]['template_details']} disabled={!filteredEntries[entry].isSelect && !this.state.loadQueryFlag}/> + </label> + </span> + </OverlayTrigger> + </div> + </td> + <td><strong>{filteredEntries[entry].name}</strong></td> + <td>{filteredEntries[entry].description}</td> + <td width='15%'>{(filteredEntries[entry].category)?filteredEntries[entry].category:''}</td> + <td>{filteredEntries[entry].creator}</td> + <td>{filteredEntries[entry]['is_aggregate']}</td> + <td className={((type === 'personal') ? '' : 'hidden')}>{filteredEntries[entry]['community_shared']}</td> + <td className="actionsRow"> + <div> + <button className={'btn btn-primary ' + (!this.props.isDSLBuilder ? '' : 'hidden')} type='button' value={filteredEntries[entry].dsl + "||" + filteredEntries[entry]['is_aggregate']} onClick={this.loadAndRunQuery}>Run</button> + <button className='btn btn-outline-secondary' type='button' value={filteredEntries[entry].name + '||' + filteredEntries[entry].description + '||' + filteredEntries[entry].category + '||' + filteredEntries[entry].dsl + '||' + filteredEntries[entry]['is_aggregate'] + '||' + type + '||' + entry + '||' + filteredEntries[entry]['community_shared'] + '||' + filteredEntries[entry]['template_details'] } onClick={this.loadQuery}>Load</button> + <button className={'btn btn-outline-secondary ' + ((this.props.isDataSteward || type === 'personal') && type !== 'community' && !this.props.isDSLBuilder ? '' : 'hidden')} type='button' value={filteredEntries[entry].name + '||' + filteredEntries[entry].description + '||' + filteredEntries[entry].category + '||' + filteredEntries[entry].dsl + '||' + filteredEntries[entry]['is_aggregate'] + '||' + type +'||' + entry + '||' + filteredEntries[entry]['community_shared'] + '||' + filteredEntries[entry]['template_details']} onClick={this.editSavedQuery}>Edit</button> + <button className={'btn btn-outline-secondary ' + ((this.props.isDataSteward || type === 'personal') && type !== 'community' && !this.props.isDSLBuilder ? '' : 'hidden')} type='button' onClick={(e) => this.openDeleteModal(entry,filteredEntries[entry].name, filteredEntries[entry]['is_public'])}>Delete</button> + </div> + </td> + </tr> + ); + })} + </tbody> + </table> + </div> + </div>}; + let savedQueryMessaging = (type, loadedQueries, queryErrMsg) => { return <Col> + <Alert className={!queryErrMsg ? 'show' : 'hidden'} bsStyle="warning"> + {type === 'public' && <h3>No Saved Public Queries Loaded</h3>} + {type === 'community' && <h3>No Saved Community Shared Queries Loaded</h3>} + {type === 'personal' && <h3>No Saved Personal Queries Loaded</h3>} + </Alert> + <Alert bsStyle="danger" className={queryErrMsg ? 'show' : 'hidden'} onDismiss={() => { + if(type==='public'){ + this.setState({queriesPublicErrMsg: false}); + }else if (type === 'community'){ + this.setState({queriesCommunityErrMsg: false}); + }else{ + this.setState({queriesPersonalErrMsg: false}); + }}}> + <h3>An error occurred</h3> + <p> + {queryErrMsg} + </p> + </Alert> + </Col> + } + let savedQueryTabs = () => { return <Tabs defaultActiveKey={'1'} id="multipleTabularView"> + <Tab eventKey={'1'} title={'Public'}> + <Spinner loading={this.state.enablePublicQueriesBusyFeedback}> + {Object.keys(this.state.loadedPublicQueries).length <= 0 && (<div>{savedQueryMessaging('public', this.state.loadedPublicQueries, this.state.queriesPublicErrMsg)}</div>)} + {Object.keys(this.state.loadedPublicQueries).length > 0 && (<div>{savedQueryCard('public', this.state.totalPublicResults, this.filterPublicList, this.state.filteredPublicEntries)}</div>)} + </Spinner> + </Tab> + <Tab eventKey={'2'} title={'Community'}> + <Spinner loading={this.state.enableCommunityQueriesBusyFeedback}> + {Object.keys(this.state.loadedCommunityQueries).length <= 0 && (<div>{savedQueryMessaging('community', this.state.loadedCommunityQueries, this.state.queriesCommunityErrMsg)}</div>)} + {Object.keys(this.state.loadedCommunityQueries).length > 0 && (<div>{savedQueryCard('community', this.state.totalCommunityResults, this.filterCommunityList, this.state.filteredCommunityEntries)}</div>)} + </Spinner> + </Tab> + <Tab eventKey={'3'} title={'My Personal Queries'}> + <Spinner loading={this.state.enablePersonalQueriesBusyFeedback}> + {Object.keys(this.state.loadedPersonalQueries).length <= 0 &&(<div>{savedQueryMessaging('personal', this.state.loadedPersonalQueries, this.state.queriesPersonalErrMsg)}</div>)} + {Object.keys(this.state.loadedPersonalQueries).length > 0 && (<div>{savedQueryCard('personal', this.state.totalPersonalResults, this.filterPersonalList, this.state.filteredPersonalEntries)}</div>)} + </Spinner> + </Tab> + </Tabs> + }; + if (!GlobalExtConstants.INVLIST.IS_ONAP){ + return (<div> + <div className='static-modal'> + <Modal show={this.state.showDeleteModal} onHide={this.closeDeleteModal} dialogClassName="modal-override"> + <Spinner loading={this.state.enableDeleteBusyFeedback}> + <Modal.Header> + <Modal.Title>Delete DSL Query</Modal.Title> + </Modal.Header> + <Modal.Body> + <Alert id="deleteError" className={this.state.deleteErrMsg ? 'show' : 'hidden'} bsStyle="danger" onDismiss={() => this.setState({deleteErrMsg: false})}> + <h3>An error occurred</h3> + <p> + {this.state.deleteErrMsg} + </p> + </Alert> + <p>Are you sure you want to delete the following query?: {this.state.focusedEntryName}</p> + </Modal.Body> + <Modal.Footer> + <Button onClick={this.closeDeleteModal}>Cancel</Button> + <Button onClick={this.submitDelete}>Delete</Button> + </Modal.Footer> + </Spinner> + </Modal> + </div> + + <Row> + <Col className={this.props.isSavedQueryFlow ? 'col-lg-10' : 'col-lg-12'}> + <Alert id="deleteSuccess" bsStyle="success" className={this.state.deleteSuccessfulMsg ? 'show' : 'hidden'} onDismiss={() => this.setState({deleteSuccessfulMsg: false})}> + <h3>Delete Successful</h3> + <p> + {this.state.deleteSuccessfulMsg} + </p> + </Alert> + {!this.props.isSavedQueryFlow && (<Panel> + <Panel.Heading> + <Panel.Title toggle> + <div className="checkbox"> + <h2>Saved Queries</h2> + </div> + </Panel.Title> + </Panel.Heading> + <Panel.Collapse> + <Panel.Body className='cardwrap'> + {savedQueryTabs()} + </Panel.Body> + </Panel.Collapse> + </Panel>)} + {this.props.isSavedQueryFlow && savedQueryTabs()} + </Col> + </Row> + </div>); + }else{ + return (<span></span>); + } + } +} + +export default CustomDSLSaveLoad; diff --git a/src/app/byoq/CustomDsl.jsx b/src/app/byoq/CustomDsl.jsx new file mode 100644 index 0000000..61650ba --- /dev/null +++ b/src/app/byoq/CustomDsl.jsx @@ -0,0 +1,4710 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ +import React, {Component} from 'react'; +import PanelGroup from 'react-bootstrap/lib/PanelGroup'; +import Panel from 'react-bootstrap/lib/Panel'; +import Modal from 'react-bootstrap/lib/Modal'; +import Grid from 'react-bootstrap/lib/Grid'; +import Button from 'react-bootstrap/lib/Button'; +import ModelGallery from 'app/model/modelSearch/components/ModelGallery.jsx'; +import Autosuggest from 'react-autosuggest'; +import DatePicker from 'react-datepicker'; +import moment from "moment"; +import DslHints from 'app/assets/configuration/dsl_hints.json'; +import DslDetailedHelp from 'app/assets/configuration/dsl_detailedHelp.json'; +import {ExportExcel} from 'utils/ExportExcel.js'; +import commonApi from 'utils/CommonAPIService.js'; +import {GlobalExtConstants} from 'utils/GlobalExtConstants.js'; +import {GeneralCommonFunctions} from 'utils/GeneralCommonFunctions.js'; +import Spinner from 'utils/SpinnerContainer.jsx'; +import OutputToggle from 'generic-components/OutputToggle.jsx'; +import Pagination from 'react-js-pagination'; +import Col from 'react-bootstrap/lib/Col'; +import Row from 'react-bootstrap/lib/Row'; +import OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger'; +import Tooltip from 'react-bootstrap/lib/Tooltip'; +import OutputVisualization, {Visualization} from 'generic-components/OutputVisualization.jsx'; +import ModelCard from 'app/model/modelSearch/components/ModelCard.jsx'; +import CustomDSLSaveLoad from 'app/byoq/CustomDSLSaveLoad.jsx'; +import FormGroup from 'react-bootstrap/lib/FormGroup'; +import FormControl from 'react-bootstrap/lib/FormControl'; +import ControlLabel from 'react-bootstrap/lib/ControlLabel'; +import InfoToggle from 'generic-components/InfoToggle.jsx'; +import Alert from 'react-bootstrap/lib/Alert'; +import Tabs from 'react-bootstrap/lib/Tabs'; +import Tab from 'react-bootstrap/lib/Tab'; +import BootstrapTable from 'react-bootstrap-table-next'; +import filterFactory, {textFilter,customFilter} from 'react-bootstrap-table2-filter'; +import FilterTypes from 'generic-components/filter/components/FilterTypes.jsx'; +import DownloadRangeModel from 'generic-components/DownloadRangeModel.jsx'; +import SelectFilter from 'generic-components/filter/components/SelectFilter.jsx'; +import Toggle from 'react-toggle'; +import "react-toggle/style.css"; +import BootstrapSwitchButton from 'bootstrap-switch-button-react'; + +let PAGINATION_CONSTANT = GlobalExtConstants.PAGINATION_CONSTANT; +let EDGERULES = GlobalExtConstants.EDGERULES; +let OXM = GlobalExtConstants.OXM; +let INVLIST = GlobalExtConstants.INVLIST; +let generateExcels = ExportExcel.generateExcels; +let DOWNLOAD_ALL = GlobalExtConstants.DOWNLOAD_ALL; +let DOWNLOAD_TOOLTIP = GlobalExtConstants.DOWNLOAD_TOOLTIP; +let filterTypeList = GlobalExtConstants.FILTER_TYPES; +let TABULAR_FILTER_TYPE = GlobalExtConstants.TABULAR_FILTER_TYPE; +let ENVIRONMENT = GlobalExtConstants.ENVIRONMENT; +let EMAIL_EXT = GlobalExtConstants.EMAIL_EXT; +let APERTURE_SERVICE = JSON.parse(sessionStorage.getItem(ENVIRONMENT + 'APERTURE_SERVICE')); +let buildAttrList = ExportExcel.buildAttrList; + +let dslHints = null; +let nodeTypes = []; +let properties = null; +let traverseRulesDsl = []; +let inputValue = ''; +let testData = null; + +var settings = { + 'NODESERVER': INVLIST.NODESERVER, + 'PROXY': INVLIST.PROXY, + 'PREFIX': INVLIST.PREFIX, + 'VERSION': INVLIST.VERSION, + 'USESTUBS': INVLIST.useStubs, + 'APERTURE': INVLIST.APERTURE, + 'TABULAR': INVLIST.TABULAR, + 'TABULARVERSION': INVLIST.TABULARVERSION +}; +class AttributeFilter extends Component { + + constructor(props) { + super(props); + this.filter = this.filter.bind(this); + this.getValue = this.getValue.bind(this); + this.props = props; + this.state = { + filterText: '', + isPageChange: this.props.isPageChange, + columnValue : '' + }; + } + getValue = () => { + return this.input.value; + } + setPlaceHolder = () => { + let filterText = ''; + filterText = 'Enter ' + this.props.column.text; + return filterText; + } + filter = () => { + let txt=this.props.column.text; + let obj = {}; + obj[txt] = this.getValue(); + var columnFilter = this.props.columnFilter; + for(var i=0;i<columnFilter.length;i++){ + if(columnFilter[i][txt] != undefined){ + columnFilter[i][txt] = this.getValue(); + this.props.handleOnFilter(columnFilter,this.getValue()); + this.props.onFilter(this.getValue()); + } + } + } + render() { + return ( + <div> + + <input + key="input" + ref={ node => this.input = node } + type="text" + placeholder={this.setPlaceHolder()} + onChange={this.filter} + /> + + </div> + ) + } + } + +class CustomDsl extends Component { + nodeResults = ''; + typeOfCall = true; + downloadTooltip = DOWNLOAD_TOOLTIP; + downloadAllTooltip = 'Downloads First ' + DOWNLOAD_ALL + ' Results'; + downloadRangeTooltip= 'Download Results By Custom Range Selection'; + downloadBulkTooltip= 'Download Results Of All Loaded Queries'; + historyStackString = ''; + dslObject={}; + dslObjectList=[]; + nodeTypeArray=[]; + nodeTypeArrayList=[]; + edgesArray=[]; + relationsArray=[]; + tempDslQuery=''; + tempDslQueryList=[]; + templateError=[]; + templateErrorList={}; + baseState=''; + propertiesDsl = []; + tableFilterAliasColumns={}; + constructor(props) { + console.log('CustomDsl:Constuctor props>>>>',props); + super(props); + APERTURE_SERVICE=JSON.parse(sessionStorage.getItem(ENVIRONMENT + 'APERTURE_SERVICE')); + console.log('APERTURE_SERVICE: ' + APERTURE_SERVICE); + TABULAR_FILTER_TYPE=(APERTURE_SERVICE && JSON.parse(sessionStorage.getItem(ENVIRONMENT + 'ENABLE_ANALYSIS')))?'CONTAINS':'='; + this.saveLoadComponent = React.createRef(); + this.saveLoadComponentDsl = React.createRef(); + this.state = { + nodeTypes: [], + hintHtml: {}, + header: null, + multipleNodes: '', + isLoading: false, + nodes: [], + simpleQueries: [], + traversalQueries: [], + unionQueries: [], + negationQueries: [], + topologyQueries: [], + limitQueries: [], + advancedQueries: [], + showModal: false, + query: '', + value: '', + valuePreviousState: '', + suggestions: [], + edgeRules: [], + previousNodeTypeDsl: '', + selected: [], + nodeTypeDsl: '', + model: null, + showPagination: false, + showResults: false, + activePage: 1, + aggregateActivePage: 1, + totalResults: 0, + errorResults: false, + errorMessage: '', + noResults: true, + validInput: false, + isInitialLoad: true, + prevQuery : '', + showHistoryModal:false, + startDate: moment(), + res: null, + visualAddition: false, + nodeDisplay: '', + showNodeModal: false, + focusedNode: {}, + historyType: 'dsl', + focusedNodeUri: 0, + viewName: localStorage.getItem(GlobalExtConstants.ENVIRONMENT + '_' + sessionStorage.getItem(GlobalExtConstants.ENVIRONMENT + 'userId') + '_viewPreference') || 'CardLayout', + focusedNodeType: '', + historyParams: '' , + showModelOptions:false, + enableCalendar: true, + resetColumnFilters: true, + isPageNumberChange: false, + loadedQueries: [], + queryDescription: '', + queryName: '', + category:'', + saveSuccessfulMsg: false, + saveErrorMsg: false, + enableSaveBusyFeedback: false, + isAggregate: false, + isAggregatePreviousState: false, + isAggregateChecked: false, + isCommunitySharedPreviousState: false, + isCommunitySharedChecked: false, + associatedNodesEnabled: false, + associatedNodesEnabledPreviuosState: false, + aggregatePaths: [], + aggregatePathAttrs: [], + aggregateParentGroup: [], + aggregateObjects: [], + tabularAggregateColumns: [], + tabularAggregateData: [], + aggregateAttrList: [], + aggregateNodes: [], + allAggregateNodes: [], + allres: null, + allAggregatePaths: [], + allAggregatePathAttrs: [], + allAggregateObjects: [], + allAggregateParentGroup: [], + allTabularAggregateColumns: [], + allTabularAggregateData: [], + allAggregateAttrList: [], + reRender: false, + columnFilter: [], + filterTemplateEntries: [], + filterTemplateHeader: [], + filterTemplateError: false, + filterTemplateEntriesList:[], + filterTemplateHeaderList:[], + filterTemplateErrorList:[], + nodeTypeOfDslTemplateList:[], + valueList:[], + templateQueryList:[], + editModel: {}, + showEditModal: false, + templateQuery: '', + isDSLFlow: props.viewName === 'BYOQ', + isSavedQueryFlow: props.viewName === 'Saved Queries', + filterTypeDisplay: {'default':'Filter Type'}, + filterTypeDisplayList: [], + disableFilter: true, + totalPages: 0, + pageRange: 1, + showDownloadResultsModal: false, + errorDownloadResults:false, + downloadErrorMsg: '', + enableModelBusyFeedback:false, + downloadCount:DOWNLOAD_ALL, + addAndTemplateState:false, + nodeTypeOfDslTemplate:[], + filterDisplay:'Select Property', + queryId:'', + queryNameList: [], + queryDescriptionList: [], + categoryList: [], + isPublicCheckedList: [], + isCommunitySharedList: [], + queryIdList: [], + isAggregateCheckedList:[], + associatedNodesEnabledList: [], + associatedNodesEnabledPreviuosStateList: [], + enableTreeLoadBusyFeedback: false, + treeLoadErrMsg: null, + isDataSteward: sessionStorage.getItem(ENVIRONMENT + 'roles') && sessionStorage.getItem(ENVIRONMENT + 'roles').indexOf('data_steward_ui_view') > -1, + isPublicChecked: sessionStorage.getItem(ENVIRONMENT + 'roles') && sessionStorage.getItem(ENVIRONMENT + 'roles').indexOf('data_steward_ui_view') > -1, + defaultViewName: localStorage.getItem(GlobalExtConstants.ENVIRONMENT + '_' + sessionStorage.getItem(GlobalExtConstants.ENVIRONMENT + 'userId') + '_viewPreference') || 'CardLayout', + isTypeahead: true, + enableRealTime: JSON.parse(sessionStorage.getItem(ENVIRONMENT + 'ENABLE_ANALYSIS')), + downloadTemplateStatus:false, + failedDownloadedTemplate:[], + failedDownloadedTemplateMsg:'', + failedEmailTemplateMsg:'', + isMergedTabsChecked:false, + isGenerateEmailChecked: false, + emailTriggerMsg:'', + dslConfigArray: [], + staticTemplateFilters: [], + staticTemplateFiltersList: [], + tableAggregateAliasColumns:{} + } + } + componentWillMount = () => { + console.log('CustomDsl:componentWillMount',JSON.stringify(this.props)); + if(!this.props.location.historyStackString){ + this.props.location.historyStackString = this.props.location.pathname + ',,Origin||'; + }else{ + this.historyStackString = this.props.location.historyStackString; + } + dslHints = Object.values(DslHints); + this.setState( {hintHtml: dslHints}); + this.processHelp( DslDetailedHelp ); + console.log('how many nodes? ' + this.state.nodes.length); + this.processEdgeRules(EDGERULES); + nodeTypes = this.buildNodeList(); + this.setState({ + nodeTypes: nodeTypes}, + function () { + console.log('nodeTypes: ' + this.state.nodeTypes.length) ; + this.baseState=this.state; + this.buildDynamicByoq('','','init'); + } + ); + + } + buildDynamicByoq=(queryParam, makeCall, loadType)=> { + let query = ''; + let shouldRun = makeCall; + if(queryParam){ + query = queryParam; + }else if(this.props.match.params.type === 'built' || this.props.match.params.type === 'built-aggregate'){ + query = atob(this.props.match.params.propId).replace('<pre>','').replace('</pre>',''); + shouldRun = true; + }else{ + shouldRun = true; + let nodeType = (this.props.match.params.type) ? this.props.match.params.type : ''; + let propIds = (this.props.match.params.propId) ? this.props.match.params.propId.split(';') : ''; + let propertyValue = ''; + for(var i in propIds){ + let propValue = propIds[i].split(':'); + console.log(propValue[0] + '....' + propValue[1]); + let atobPropValue = atob(propValue[1]).replace('<pre>','').replace('</pre>',''); + if(propertyValue == ''){ + propertyValue ='(\'' + propValue[0] +'\',\''+ atobPropValue + '\')'; + }else{ + propertyValue = propertyValue + '(\'' + propValue[0] +'\',\''+ atobPropValue + '\')'; + } + } + console.log('propertyValue>>>>>',propertyValue); + let relArray = (this.props.match.params.relArray) ? this.props.match.params.relArray.split('&') : ''; + let relativeStr = ''; + let str = ''; + if(relArray.length>0){ + for(var n in relArray){ + relativeStr = relativeStr + relArray[n] + '*' + } + str = relativeStr.replace(/\*/g, '*,').slice(0, -1); + } + let relativeAttachStr = (str === '') ? '' : '>[' + str + ']'; + //encPropValue = (nodeType === '') ? '': atob(propValue[1]); + query = (nodeType === '') ? '' : nodeType + '*' + propertyValue + relativeAttachStr; + if(loadType ==='init'){ + console.log('this.baseState>>>>>',this.baseState) + this.baseState.value=query; + } + } + console.log('query>>>',query); + console.log('this.props.match.params.type>>>',this.props.match.params.type); + if(query != ''){ + this.nodeResults = ''; + this.typeOfCall = true; + let isInitialLoad = this.state.isInitialLoad; + this.setState( {value: query,validInput: true,isInitialLoad: false},() => { if(shouldRun){this.formQueryString(false, isInitialLoad,false)}}); + } +} + getNodeTypes = () =>{ + var result = JSON.parse(OXM); + var arrayOfTypes = result['xml-bindings']['java-types'][0]['java-type']; + var nodeTypeArray = []; + for(var j = 0; j < arrayOfTypes.length; j++){ + if(arrayOfTypes[j]['xml-root-element'] && arrayOfTypes[j]['xml-root-element'][0] + && arrayOfTypes[j]['xml-root-element'][0]['$'] && arrayOfTypes[j]['xml-root-element'][0]['$']['name']){ + nodeTypeArray.push((arrayOfTypes[j]['xml-root-element'][0]['$']['name']).toLowerCase()); + } + } + return nodeTypeArray; + } + + getNodeTypeFromURI = (uri) => { + var nodeTypeArray = this.getNodeTypes(); + var tokenizedUri = uri.split("/"); + var nodeType = ""; + var found = false; + for (var i = tokenizedUri.length - 1; i >= 0 && !found; i--){ + if(nodeTypeArray.indexOf(tokenizedUri[i]) > -1){ + nodeType = tokenizedUri[i]; + found = true; + } + } + return nodeType; + } + + getAttributesFromNodeType = (nt) => { + var result = JSON.parse(OXM); + var arrayOfTypes = result['xml-bindings']['java-types'][0]['java-type']; + var foundIndex = -1; + var attributesArray = []; + var nodeType = nt.replace(/-/g,''); + for (var i = 0; i < arrayOfTypes.length && foundIndex === -1; i++) { + if(arrayOfTypes[i]['$'] && arrayOfTypes[i]['$']['name'] && arrayOfTypes[i]['$']['name'].toLowerCase() === nodeType){ + foundIndex = i; + } + } + for (var j = 0; j < arrayOfTypes[foundIndex]['java-attributes'][0]['xml-element'].length; j++) { + let property = arrayOfTypes[foundIndex]['java-attributes'][0]['xml-element'][j]['$']['name']; + let type = arrayOfTypes[foundIndex]['java-attributes'][0]['xml-element'][j]['$']['type']; + if (type === 'java.lang.String' || type === 'java.lang.Boolean') { + attributesArray.push(property); + } + } + return attributesArray; + } + + getAttributesFromPath = (path,tableAggregateAliasColumns) => { + var nodeParseArray = path.split('>'); + console.log(nodeParseArray); + var attributeArray = []; + var aggregatePaths = this.state.aggregatePathAttrs; + if(!this.typeOfCall){ + aggregatePaths = this.state.allAggregatePathAttrs; + } + for(var i = 0; i < nodeParseArray.length; i++){ + var nodeKey = nodeParseArray[i].trim(); + let tableColumnsBuilt = ExportExcel.buildAttrList(nodeKey,[],'required'); + for(var j = 0; j < aggregatePaths[nodeKey].length; j++){ + let desc=tableColumnsBuilt.map((a) => + { + if(a.value.toLowerCase()==aggregatePaths[nodeKey][j].toLowerCase()) + return a.description; + else + return ''; + }).filter(function (el) { + return el != ''; + }); + if(desc.length===0){ + desc.push(''); + } + if(Object.keys(tableAggregateAliasColumns).length !== 0 && tableAggregateAliasColumns[nodeKey] && tableAggregateAliasColumns[nodeKey][0][aggregatePaths[nodeKey][j]]){ + attributeArray.push(nodeKey + '|' + tableAggregateAliasColumns[nodeKey][0][aggregatePaths[nodeKey][j]] +'|'+ desc[0]); + }else{ + attributeArray.push(nodeKey + '|' + aggregatePaths[nodeKey][j] + '|' + desc[0]); + } + } + } + return attributeArray; + } + + buildNodeList = () => { + var result = JSON.parse(OXM); + var arrayOfTypes = result['xml-bindings']['java-types'][0]['java-type']; + let nodeList = []; + + for (var i = 0; i < arrayOfTypes.length; i++) { + var hasProperties = false; + if (arrayOfTypes[i]['java-attributes']) { + let elementLength = 0; + if (arrayOfTypes[i]['java-attributes'][0]['xml-element']) { + elementLength = arrayOfTypes[i]['java-attributes'][0]['xml-element'].length; + } + for (var j = 0; j < elementLength; j++) { + let property = JSON.stringify(arrayOfTypes[i]['java-attributes'][0]['xml-element'][j]['xml-properties']); + if (property) { //add to the list + hasProperties = true; + } + } + if (hasProperties) { + let node = arrayOfTypes[i]['xml-root-element'][0]['$']['name']; + nodeList.push(node); + } + } + } + nodeList.sort(); + return nodeList; + } + + processHelp(data) { + //console.log('Data' + JSON.stringify(data)); + this.setState( {simpleQueries: data.simple } ); + console.log('Value' + JSON.stringify(this.state.simpleQueries)); + this.setState( {traversalQueries: data.traversal} ); + this.setState( {unionQueries: data.union} ); + this.setState( {negationQueries: data.negation} ); + this.setState( {topologyQueries: data.topology} ); + this.setState( {limitQueries: data.limit} ); + this.setState( {advancedQueries: data.advanced} ); + } + + processEdgeRules = (data) => { + var ruleArr = []; + this.setState({ + edgeRules: data.rules + }); + ruleArr = data.rules; + // console.log("Rule"+JSON.stringify(ruleArr)); + // new = data.Rules; + } + + hint = () => { // open modal + console.log('hint >> showModal'); + this.setState({ + showModal:true + }); + this.hints = this.state.html; + } + + onAddItem = (event) => { + event.preventDefault(); + GeneralCommonFunctions.scrollTo("outputBlock"); + this.nodeResults = ''; + this.typeOfCall = true; + this.setState({ viewName: this.state.defaultViewName, aggregateActivePage: 1, activePage: 1, nodes: [], aggregateNodes: [],errorResults:false},function () { this.formQueryString(false,false,false); }.bind(this)); + }; + + formQueryString = (bypassCall, isInitialLoad, aggregateForGraph) =>{ + console.log('formQueryString>>>>>>this.state.value :',this.state.value); + var DSLQuery = this.state.value; + DSLQuery.trim(); + console.log('DSLQuery.trim().length: ' + DSLQuery.trim().length); + let resp = ''; + if (DSLQuery.trim() !== '' || (this.props.match.params.type && DSLQuery.trim() !== '')){ + console.log('validInput.DSLQuery: ' + DSLQuery); + this.setState({ + validInput: true,isInitialLoad: isInitialLoad + }); + const payload = {dsl: DSLQuery}; + let format = 'simple'; + if((this.state.isAggregateChecked || (isInitialLoad && this.props.match.params.type === 'built-aggregate')) && !aggregateForGraph){ + format = 'aggregate'; + this.setState({isAggregateChecked: true}); + } + let queryStr = ''; + if(this.typeOfCall){ + if(format === 'aggregate' || aggregateForGraph){ + this.setState({isAggregate: true}); + queryStr = 'dsl?format=' + format + '&resultIndex=' + this.state.aggregateActivePage + '&resultSize=' + PAGINATION_CONSTANT.RESULTS_PER_PAGE; + }else{ + this.setState({isAggregate: false}); + queryStr = 'dsl?format=' + format + '&resultIndex=' + + this.state.activePage + '&resultSize=' + PAGINATION_CONSTANT.RESULTS_PER_PAGE; + } + }else{ + let pagerange=this.state.pageRange.toString(); + pagerange=pagerange.split('-'); + if(pagerange.length > 1){ + queryStr = 'dsl?format=' + format + '&resultIndex='+ parseInt(pagerange[0]) +'&resultSize=' + PAGINATION_CONSTANT.RESULTS_PER_PAGE + '&resultRangeEnd=' + parseInt(pagerange[1]); + }else{ + queryStr = 'dsl?format=' + format + '&resultIndex='+ 1 +'&resultSize=' + parseInt(pagerange); + } + + } + const path = queryStr; + this.state.header = DSLQuery; + console.log('DSLQuery: ' + DSLQuery); + console.log('payload: ' + JSON.stringify(payload)); + console.log('path: ' + path); + if(aggregateForGraph){ + this.setState({isLoading: true, prevQuery:DSLQuery}); + } else if(this.typeOfCall){ + if(this.state.prevQuery !== DSLQuery){ + this.setState({isLoading: true, + totalResults: 0, + prevQuery:DSLQuery + }); + }else{ + this.setState({isLoading: true, nodes: [], aggregateNodes: [], prevQuery:DSLQuery}); + } + } + if(!bypassCall){ + resp = this.getNodes(settings, path, payload, aggregateForGraph); + } + }else { // write a msg + console.log('validInput: ' + false); + this.setState({ + validInput: false, + isInitialLoad: isInitialLoad + }); + GeneralCommonFunctions.scrollTo('dslInputError'); + } + console.log('Response: ' + resp); + } + + onSuggestionSelected = (event, { suggestion }) => { + event.preventDefault(); + + let item = suggestion; + console.log('onSuggestionSelected.item: ' + item); + console.log('onSuggestionSelected.inputValue: ' + inputValue); + + this.setState({ + selected: [...this.state.selected, item], + value: inputValue + item + }, + function () { + console.log('onSuggestionSelected.selected: ' + this.state.selected); + console.log('onSuggestionSelected.value: ' + this.state.value); + }); + //if (!item.includes('(')) { + if (item.indexOf('(') === -1) { // not found + this.setState({previousNodeTypeDsl: item}, + function () { + this.setState({ + nodeTypeDsl: item + }); + console.log('onSuggestionSelected.previousNodeTypeDsl: ' + this.state.previousNodeTypeDsl); + console.log('onSuggestionSelected.nodeTypeDsl: ' + this.state.nodeTypeDsl); + } + ); + } + } + + storeInputReference = autosuggest => { + if (autosuggest !== null) { + this.input = autosuggest.input; + } + }; + + clear = () => { + this.setState({ + value: '', + previousNodeTypeDsl: '', + header: '' + }); + } + + openSaveModal = () =>{ + this.setState({ + showSaveModal: true, + saveSuccessfulMsg: false, + treeLoadErrMsg: false, + isPublicChecked:this.state.isDataSteward, + isCommunitySharedChecked: false, + isEditModal:false, + enableTreeLoadBusyFeedback: true, + dslConfigurableFiltersArray: [] + }); + this.getTreeFromDSL(this.state.value).then(tree => { + this.setState({enableTreeLoadBusyFeedback: false, dslConfigArray: this.getConfigArrayFromDSLTree(tree, [], [])}); + }); + }; + + handleTypeaheadChange = (event) =>{ + this.setState({isTypeahead: event.target.checked}); + } + + closeSaveModal = () =>{ + //Set previous loaded state + if(this.state.isEditModal){ + this.setState({ + value: this.state.valuePreviousState, + isAggregateChecked: this.state.isAggregateCheckedPreviousState, + isCommunitySharedChecked: this.state.isCommunitySharedCheckedPreviousState, + associatedNodesEnabled: this.state.associatedNodesEnabledPreviousState, + enableTreeLoadBusyFeedback: false + }); + } + + this.setState({ + showSaveModal: false, + queryDescription: '', + queryName: '', + category:'', + enableSaveBusyFeedback: false, + showQueryExistsWarning: false, + saveFailureMsg: false, + isEditModal:false + }); + }; + + submitSave = (bypassDupeCheck) =>{ + let existQueryName=false; + let queryId=''; + Object.keys(this.state.loadedQueries).map((key) =>{ + if(this.state.loadedQueries[key].name === this.state.queryName){ + existQueryName=true; + if(this.state.showQueryExistsWarning){ + queryId=key; + } + } + }); + if(!bypassDupeCheck && existQueryName){ + this.setState({showQueryExistsWarning:true}); + }else{ + var aggregateString = "false"; + if(this.state.isAggregateChecked){ + aggregateString = "true"; + } + var queryParam=(this.state.queryId==='')?queryId:this.state.queryId; + var body = { + "cols": [ + { + "name": "query_name", + "value": this.state.queryName + }, + { + "name": "creator", + "value": sessionStorage.getItem(ENVIRONMENT + 'userId') + }, + { + "name": "description", + "value": this.state.queryDescription + }, + { + "name": "is_aggregate", + "value": aggregateString + }, + { + "name": "community_shared", + "value": "" + this.state.isCommunitySharedChecked + }, + { + "name": "is_public", + "value": "" + this.state.isPublicChecked + }, + { + "name": "template_details", + "value": JSON.stringify(this.state.staticTemplateFilters) + }, + { + "name": "dsl", + "value": btoa('<pre>' + this.state.value + '</pre>') + } + ] + } + if(this.state.category && this.state.category !=''){ + let catObj={"name": "category","value": this.state.category} + body['cols'].push(catObj); + } + let localVersion=''; + if(this.state.showQueryExistsWarning){ + if(bypassDupeCheck && this.state.loadedQueries[queryParam] && this.state.loadedQueries[queryParam].version ){ + localVersion = this.state.loadedQueries[queryParam].version;; + body.version = localVersion; + + } + }else{ + if(bypassDupeCheck && this.state.loadedQueries[this.state.queryId] && this.state.loadedQueries[this.state.queryId].version ){ + localVersion = this.state.loadedQueries[this.state.queryId].version;; + body.version = localVersion; + } + } + + this.setState({showQueryExistsWarning:false, enableSaveBusyFeedback:true}); + settings['ISTABULAR'] = true; + let localQuery='queries'; + let localHeader=null; + if(queryParam !==''){ + localQuery += '/'+encodeURIComponent(queryParam); + localHeader= [{ + "name":"If-Match", + "value": localVersion + }]; + } + commonApi(settings, localQuery, 'PUT', body, 'BYOQSaveInfo', GlobalExtConstants.OVERRIDE_DOMAIN,null,localHeader) + .then(res => { + console.log('res:' + res.data); + if(res.status === 201){ + if(res.data.status && (res.data.status !== 200 && res.data.status !== 201)){ + this.triggerSaveError(res.data); + }else{ + if(this.state.isEditModal && this.state.isDSLFlow){ + this.setState({ + value: this.state.valuePreviousState, + isAggregateChecked: this.state.isAggregateCheckedPreviousState, + isCommunitySharedChecked: this.state.isCommunitySharedCheckedPreviousState, + associatedNodesEnabled: this.state.associatedNodesEnabledPreviousState, + }); + } + + let jumpToId = "saveSuccess"; + if (this.state.isSavedQueryFlow && this.state.isEditModal){ + jumpToId = "saveSuccessEdit"; + } + else if(this.state.isSavedQueryFlow && !this.state.isEditModal){ + jumpToId = "saveSuccessTemplate"; + } + + this.setState({ + saveSuccessfulMsg: "The following query was successfully saved: " + this.state.queryName, + showSaveModal: false, + enableSaveBusyFeedback:false, + }); + + GeneralCommonFunctions.scrollTo(jumpToId); + if(this.state.isSavedQueryFlow){ + this.saveLoadComponent.current.getQueries(); + }else { + this.saveLoadComponentDsl.current.getQueries(); + } + } + }else{ + this.triggerSaveError(res.data); + } + }, error=>{ + this.triggerSaveError(error.response.data); + }).catch(error => { + this.triggerSaveError(error); + }); + } + }; + + triggerSaveError = (error) => { + console.error('[CustomDsl.jsx] error : ', JSON.stringify(error)); + let errMsg = ''; + if(error.status && error.message){ + errMsg += "Error Occurred: " + error.status + ' - ' +error.message; + }else{ + errMsg += "Error Occurred: " + JSON.stringify(error); + } + console.log(errMsg); + this.setState({saveFailureMsg: errMsg + " - Failed to save query : " + this.state.queryName, enableSaveBusyFeedback:false}); + GeneralCommonFunctions.scrollTo("saveFailure"); + } + + handleQueryDescriptionChange = (e) => { + this.setState({queryDescription: e.target.value}); + }; + handleQueryNameChange = (e) => { + this.setState({queryName: e.target.value}); + }; + handleQueryChange = (e) => { + this.setState({value: e.target.value}); + }; + handleCategoryChange = (e) =>{ + this.setState({category: e.target.value}); + }; + + setQueriesState = (savedQueries) =>{ + this.setState({ + loadedQueries: savedQueries + }); + }; + + getNodes(settings, path, payload, graphCall) { + this.setState({isLoading: true}); + settings['ISTABULAR'] = false; + if(this.state.enableRealTime && APERTURE_SERVICE){ + settings['ISAPERTURE'] = this.state.enableRealTime; + }else{ + Object.keys(settings).forEach((key)=>{ + if(key==='ISAPERTURE'){ + delete settings[key]; + } + }) + } + console.dir('CustomDSL:settings:' + JSON.stringify(settings)); + console.log('CustomDSL:path:' + path); + console.dir('CustomDSL:payload:' + JSON.stringify(payload)); + commonApi(settings, path, 'PUT', payload, 'BYOQDefault', null, null, [{ + "name":"X-DslApiVersion", + "value": "V2" + }]) + .then(res => { + console.log('CustomDSL: Response',Object.keys(res.data)); + if(!graphCall && this.typeOfCall){ + this.setState({aggregatePaths: [], + aggregateParentGroup: [], + aggregateObjects: []}); + } + if(this.state.isAggregate){ + if(graphCall){ + if(res.data.results.length > 0 && this.state.visualAddition){ + Visualization.chart('currentStateAggregate', [], [], res.data, this); + this.setState({isLoading: false, nodes: res.data.results, res: res}); + } + }else{ + this.processAggregateData(res); + } + }else{ + this.processData(res); + if(this.state.nodes.length > 0 && this.state.visualAddition){ + Visualization.chart('currentState', [], [], this.state.res.data, this); + } + } + }, error=>{ + if(this.typeOfCall){ + this.triggerError(error); + }else{ + let errMsg = this.renderErrorMsg(error); + this.setState({ isLoading: false,errorDownloadResults:true,downloadErrorMsg:errMsg,enableModelBusyFeedback:false}); + } + }).catch(error => { + if(this.typeOfCall){ + this.triggerError(error); + }else{ + let errMsg = this.renderErrorMsg(error); + this.setState({ isLoading: false,errorDownloadResults:true,downloadErrorMsg:errMsg,enableModelBusyFeedback:false}); + } + }); + //this.input.focus(); + } + + triggerError = (error) => { + console.error('[CustomDsl.jsx] triggerError error : ', JSON.stringify(error)); + //this.processData(''); + this.setState({isLoading: false, + totalResults: 0, + showPagination: false, + showResults: false, + isInitialLoad: false, + noResults: true, + errorResults: true + }); + this.downloadAllTooltip = 'Downloads First ' + DOWNLOAD_ALL + ' Results'; + let errMsg = this.renderErrorMsg(error); + this.setState({errorMessage:errMsg}); + console.log(error.config); + this.input.focus(); + } + renderErrorMsg = (error) =>{ + let errMsg=''; + if (error.response) { + // The request was made and the server responded with a status code + // that falls out of the range of 2xx + console.log('[CustomDsl.jsx] error :', error.response); + if(error.response.status){ + errMsg += " Code: " + error.response.status; + } + if(error.response.data){ + errMsg += " - " + JSON.stringify(error.response.data); + } + } else if (error.request) { + // The request was made but no response was received + // `error.request` is an instance of XMLHttpRequest in the browser and an instance of + // http.ClientRequest in node.js + console.log(error.request); + errMsg += " - Request was made but no response received"; + } else { + // Something happened in setting up the request that triggered an Error + console.log('Error', error.message); + errMsg += " - Unknown error occurred " + error.message; + } + return errMsg; + } + formAliasFilterPropertes = () =>{ + let tableAggregateAliasColumns={}; + this.tableFilterAliasColumns={}; + let dslQuery = this.state.value; + var limitPattern = /limit[\s]\d+|limit\d+/ig + var limitkey = dslQuery.match(limitPattern); + if(limitkey){ + dslQuery = dslQuery.replace(limitkey[limitkey.length-1],'').trim(); + } + dslQuery = this.alterDslQueryByRemoveSpaces(dslQuery); + //New adding + this.dslObject={}; + this.nodeTypeArray=[]; + //create placeholders for NodeTypes with Propand Propvalues + this.tempDslQuery=this.formTempDslQuery(dslQuery); + //Preparing Json Object to render into Placeholder + this.contructDslNodes(dslQuery,'node',false,false,false,false); + ; + let aliasRegex=/\'(\s)as(\s)\'|\'as\'/ig; + Object.keys(this.dslObject).map((nodekey)=>{ + let nodeprops=this.dslObject[nodekey][0]['props']; + if(nodeprops){ + let nodeTypeProp = nodeprops[0].slice(1,-1).split(','); + let objAlias = {}; + let filterObjAlias={}; + for(var s=0;s<nodeTypeProp.length;s++){ + let nodeTypePropes=nodeTypeProp[s].match(aliasRegex); + let alias=''; + let nprop=''; + if(nodeTypePropes){ + let nodeTypeSplit=nodeTypeProp[s].split(aliasRegex); + nprop=nodeTypeSplit[0].replace(/\'/g,''); + alias=nodeTypeSplit[nodeTypeSplit.length-1].replace(/\'/g,''); + objAlias[nprop]=alias; + filterObjAlias[alias]=nprop; + } + } + let nodeNo=parseInt(nodekey.substr(nodekey.length-2,nodekey.length-1).replace(/\-/g,'')); + let keyact=isNaN(nodeNo); + let actKey=nodekey.split('-'); + if(!keyact){ + actKey.splice(actKey.length-1,1); + nodekey=actKey.join('-')+nodeNo; + } + if(!tableAggregateAliasColumns[nodekey]){ + tableAggregateAliasColumns[nodekey]=[]; + tableAggregateAliasColumns[nodekey].push(objAlias); + + } + if(!this.tableFilterAliasColumns[nodekey]){ + this.tableFilterAliasColumns[nodekey]=[]; + this.tableFilterAliasColumns[nodekey].push(filterObjAlias); + } + } + }); + return tableAggregateAliasColumns; + } + processAggregateData = (resp) =>{ + console.log('CustomDSL:processAggregateData Response data: ' + JSON.stringify(resp.data)); + var downloadCount = DOWNLOAD_ALL; + var uniqueNodePaths = []; + var uniqueNodeAttributes = []; + var groupingByStart = []; + var aggregateObjectArray = []; + if (resp.data && resp.data.results) { + for(var i = 0; i < resp.data.results.length; i++){ + var fullPath = ""; + var nodePath = ""; + var nodeTypesForPath = []; + var startNodeKey = ""; + var aggregateObject = {}; + //Make sure everything is in an array, so pushing single element into the array + if(!Array.isArray(resp.data.results[i])){ + var tempObj = Object.assign({}, resp.data.results[i]); + resp.data.results[i] = []; + resp.data.results[i].push(tempObj); + } + for(var j = 0; j < resp.data.results[i].length; j++){ + var objectIndex = 0; + for(var key in resp.data.results[i][j]){ + var nodeType = this.getNodeTypeFromURI(key); + if (objectIndex === 0){ + startNodeKey = key; + } + objectIndex++; + var nodeTypeLabel = ''; + if(nodeTypesForPath[nodeType] >= 1){ + nodeTypeLabel = nodeType + nodeTypesForPath[nodeType]; + nodeTypesForPath[nodeType] = nodeTypesForPath[nodeType]++; + }else if (nodeTypesForPath[nodeType] === 0){ + nodeTypeLabel = nodeType + 1; + nodeTypesForPath[nodeType] = 1; + }else{ + nodeTypeLabel = nodeType; + nodeTypesForPath[nodeType] = 0; + } + if(!uniqueNodeAttributes[nodeTypeLabel]){ + uniqueNodeAttributes[nodeTypeLabel] = []; + } + for(var propKey in resp.data.results[i][j][key].properties){ + if(uniqueNodeAttributes[nodeTypeLabel].indexOf(propKey) === -1){ + uniqueNodeAttributes[nodeTypeLabel].push(propKey); + } + Object.defineProperty(resp.data.results[i][j][key].properties, nodeTypeLabel + '|' + propKey, Object.getOwnPropertyDescriptor(resp.data.results[i][j][key].properties, propKey)); + delete resp.data.results[i][j][key].properties[propKey]; + } + fullPath += key + ' > '; + nodePath += nodeTypeLabel + ' > '; + } + aggregateObject = Object.assign({}, aggregateObject, resp.data.results[i][j][startNodeKey].properties); + } + nodePath = nodePath.substring(0, nodePath.length - 3); + if(!aggregateObjectArray[nodePath]){ + aggregateObjectArray[nodePath] = []; + } + aggregateObjectArray[nodePath].push(aggregateObject); + resp.data.results[i].fullPath = fullPath.substring(0, fullPath.length - 3); + resp.data.results[i].nodePath = nodePath; + if(!groupingByStart[startNodeKey]){ + groupingByStart[startNodeKey] = []; + groupingByStart[startNodeKey].push(resp.data.results[i]); + }else{ + groupingByStart[startNodeKey].push(resp.data.results[i]); + } + if(uniqueNodePaths.indexOf(resp.data.results[i].nodePath) === -1){ + uniqueNodePaths.push(resp.data.results[i].nodePath); + } + console.log('Grouping by Start: ' + JSON.stringify(groupingByStart)); + console.log('Unique Paths: ' + JSON.stringify(uniqueNodePaths)); + } + if(this.typeOfCall){ + let totalResults = (resp.headers) ? parseInt(resp.headers['total-results']) : 0; + console.log('totalResults>>>>>>>>>>>>>>>>>>>>>',totalResults); + if(totalResults > DOWNLOAD_ALL){ + this.downloadAllTooltip = DOWNLOAD_ALL + ' results out of '+ totalResults +' results will be downloaded, Please filter results further to obtain full report'; + }else{ + this.downloadAllTooltip = (totalResults === 1) ?'Downloads ' + totalResults + ' Results' : 'Downloads all ' + totalResults + ' Results' ; + downloadCount= totalResults; + } + this.setState({ + aggregateNodes: resp.data.results, + res: resp, + aggregatePaths: uniqueNodePaths, + aggregatePathAttrs: uniqueNodeAttributes, + aggregateObjects: aggregateObjectArray, + aggregateParentGroup: groupingByStart, + isLoading: false, + totalResults: totalResults, + showResults: totalResults > 0 ? true : false, + showPagination: totalResults > 0 ? true : false, + isInitialLoad: false, + noResults: totalResults > 0 ? false : true, + errorResults: false, + downloadCount: downloadCount, + },function(){this.formatAggregateIntoTabular();}); + this.multipleNodes = this.state.aggregateNodes.length > 1; + //this.setState({ viewName: "CardLayout" }); commented not to defaulting to CardView + }else{ + console.log('else condition>>>>'); + if(resp.data && resp.data.results) { + this.nodeResults = resp.data.results; + let totalResults = 0; + let totalPages = 0; + totalResults = parseInt(resp.headers['total-results']); + totalPages = parseInt(resp.headers['total-pages']); + this.setState({ + allAggregateNodes: resp.data.results, + allres: resp, + allAggregatePathAttrs: uniqueNodeAttributes, + allAggregatePaths: uniqueNodePaths, + allAggregateObjects: aggregateObjectArray, + allAggregateParentGroup: groupingByStart, + totalPages:totalPages, + totalResults:totalResults, + errorDownloadResults:false, + downloadErrorMsg:'' + },function(){this.formatAggregateIntoTabular();}); + }else{ + this.downloadAllTooltip = 'Downloads First ' + DOWNLOAD_ALL + ' Results'; + } + this.setState({isLoading: false}); + } + } + GeneralCommonFunctions.scrollTo("outputBlock"); + } + + formatAggregateIntoTabular = () =>{ + let tableColumnsList = []; + let tableDataList = []; + let columnFilter = []; + var aggregatePaths = []; + var aggregateObjects = []; + let tableAggregateAliasColumns=this.formAliasFilterPropertes(); + + if(this.typeOfCall){ + aggregatePaths = this.state.aggregatePaths; + aggregateObjects = this.state.aggregateObjects; + }else{ + aggregatePaths = this.state.allAggregatePaths; + aggregateObjects = this.state.allAggregateObjects; + } + for(var p = 0; p < aggregatePaths.length; p++){ + var types = [aggregatePaths[p]]; + var type = types[0]; + var attributeList = this.getAttributesFromPath(type,tableAggregateAliasColumns); + var downloadAllCalled = false; + tableColumnsList[type] = []; + tableColumnsList[type].push({dataField: 'id', text: 'id', hidden: true }); + tableDataList[type] = aggregateObjects[type]; + for(var attrIndex = 0; attrIndex < attributeList.length; attrIndex++){ + let col=attributeList[attrIndex].split('|').splice(0,2).join('|'); + let desc=attributeList[attrIndex].split('|')[2]; + if(!columnFilter[attrIndex] || (columnFilter[attrIndex] && columnFilter[attrIndex][attributeList[attrIndex]] === undefined)){ + let obj = {}; + obj[col] = ''; + obj['description']=desc + columnFilter.push(obj); + } + if(!this.typeOfCall){ + tableColumnsList[type].push({name: col, + dataField: col, + text: col, + hidden: false, + headerAttrs: {title:desc}, + filter: textFilter({getFilter: (f) => { this.setState({filterEnable: true})}}) + }); + }else{ + tableColumnsList[type].push({name: col, + dataField: col, + text: col, + hidden: false, + headerAttrs: { title:desc}, + filter : customFilter(), + filterRenderer : (onFilter, column) => <AttributeFilter handleOnFilter= {this.handleOnFilter} onFilter={ onFilter } column={ column } isPageChange={this.state.isPageNumberChange} nodeType={type} columnFilter={columnFilter}/> + }); + } + } + if(this.typeOfCall){ + this.setState({tabularAggregateColumns: tableColumnsList, tabularAggregateData: tableDataList, aggregateAttrList: attributeList,tableAggregateAliasColumns:tableAggregateAliasColumns}); + }else{ + this.setState({allTabularAggregateColumns: tableColumnsList, allTabularAggregateData: tableDataList, allAggregateAttrList: attributeList,tableAggregateAliasColumns:tableAggregateAliasColumns}, function(){if(!downloadAllCalled){downloadAllCalled = true;this.downloadAllAggregate();}}); + } + } + } + + downloadAggregate = () =>{ + this.typeOfCall = true; + ExportExcel.generateExcelFromTabularViewMultiTabs( this.state.tabularAggregateData, this.state.tabularAggregateColumns, 'AggregateObjects.xlsx'); + } + + downloadAllAggregate = (pageRange,rangeState) =>{ + console.log('downloadAllAggregate>>>>>>>>>>>*',pageRange); + if(pageRange){ + this.typeOfCall=false; + let rangeModelState=(rangeState)? rangeState: false; + this.setState( + { pageRange: pageRange,isLoading: true,showDownloadResultsModal:rangeModelState,enableModelBusyFeedback:true}, + function () { this.formQueryString(false,false,false); }.bind(this) + ); + }else{ + this.setState( + {errorDownloadResults: false, showDownloadResultsModal: false, downloadErrorMsg:'', isLoading: false, enableModelBusyFeedback:false}, + function (){ + ExportExcel.generateExcelFromTabularViewMultiTabs( this.state.allTabularAggregateData, this.state.allTabularAggregateColumns, 'AggregateObjects.xlsx'); + this.typeOfCall = true; + }.bind(this) + ); + } + } + openDownloadRange = () =>{ + this.setState({ + showDownloadResultsModal: true, + errorDownloadResults: false, + downloadErrorMsg:''}); + } + closeDownloadResults = () =>{ + this.setState({ + showDownloadResultsModal: false, + enableModelBusyFeedback: false + }); + } + processData = (resp) => { + console.log('Response data: ' + JSON.stringify(resp.data)); + this.tableFilterAliasColumns=this.formAliasFilterPropertes(); + if(this.typeOfCall){ + if (resp.data && resp.data.results) { + //this.nodes = data.results;setDefaultViewName + this.setState({ + nodes: resp.data.results, + res: resp + }); + this.multipleNodes = this.state.nodes.length > 1; + //this.setState({ viewName: "CardLayout" }); + } + let totalResults = 0; + let downloadCount = DOWNLOAD_ALL; + if(resp.headers) { + totalResults = parseInt(resp.headers['total-results']); + if(totalResults > DOWNLOAD_ALL){ + this.downloadAllTooltip = DOWNLOAD_ALL + ' results out of '+ totalResults +' results will be downloaded, Please filter results further to obtain full report'; + }else{ + this.downloadAllTooltip = (totalResults === 1) ?'Downloads ' + totalResults + ' Results' : 'Downloads all ' + totalResults + ' Results' ; + downloadCount= totalResults; + } + this.setState({isLoading: false, + totalResults: totalResults, + totalPages: parseInt(resp.headers['total-pages']), + showPagination: resp.headers['total-results'] > 0 ? true : false, + showResults: resp.headers['total-results'] > 0 ? true : false, + isInitialLoad: false, + noResults: resp.headers['total-results'] && resp.headers['total-results'] > 0 ? false : true, + errorResults: !resp.headers['total-results'], + downloadCount: downloadCount + }); + } + }else{ + if(resp.data && resp.data.results) { + this.nodeResults = resp.data.results; + let totalResults = 0; + let totalPages = 0; + if(resp.headers) { + totalResults = parseInt(resp.headers['total-results']); + totalPages = parseInt(resp.headers['total-pages']); + } + this.setState({totalPages:totalPages,errorDownloadResults:false,downloadErrorMsg:''},() => {this.getAllExcels()}); + }else{ + this.nodeResults = ''; + this.setState({ isLoading: false,errorDownloadResults:true,downloadErrorMsg:error+'',enableModelBusyFeedback:false}); + } + } + GeneralCommonFunctions.scrollTo("outputBlock"); + } + + close = () => { + this.setState({ + showModal: false + }); + } + + onClick = (event) => { + console.log('onClick'); + } + + onTextAreaChange = (event) => { + this.setState({value: event.target.value}); + } + + onChange = (event, { newValue }) => { + console.log('onChange.newValue: ' + newValue); + let term = null; + this.setState({ + value: newValue}, + function () { + console.log('onChange.selected: ' + this.state.selected); + console.log('onChange.state value set: ' + this.state.value); + if (this.state.value.slice(-1) === '(' || this.state.value.slice(-1) === '>') { + //this.onSuggestionsFetchRequested(term); + term = this.getValue(this.state.value); // this returns term, array of props or rules + if (term) { + console.log('onChange.term: ' + term.toString()); + } + console.log('onChange.setting suggestions'); + this.setState({ + suggestions: term + }); + }else if(this.state.value === ''){ + inputValue=''; + } + } + ); + // if term exists && term length > 0 - try to load suggestions + //if(term && term.length > 0){ + //properties = term.map(property => { + //return <div key={property}>{property}<br/></div>; + //}); + //} + } + + getValue = (term) => { + inputValue = ''; + let isStartNode = (term.split('>')).length <= 1; + console.log('getValue.term is: ' + term); + + let toArray = term.split(' '); + //console.log('Value' + JSON.stringify(toArray[toArray.length - 1])); + if (toArray && toArray.length > 1) { + //this.model = term; + console.log('getValue.toArray: ' + toArray.length); + this.setState({ + model: term + }); + term = toArray[toArray.length - 1]; + + } + for (var i = 0; i < toArray.length - 1; i++) { + inputValue = inputValue + ' ' + toArray[i]; + } + console.log('getValue.inputValue toArray: ' + inputValue); + //console.log(term.slice(-1)); + if (term.slice(-1) === '(') { + console.log('getValue.detected ( property search'); + var nodeVal = term.slice(0, -1); + nodeVal = nodeVal.trim(); + console.log('getValue.property.nodeVal: ' + nodeVal); + var val = []; + val = this.state.nodeTypes.filter(v => v.toLowerCase().indexOf(nodeVal.toLowerCase()) > -1); + console.log('getValue.val.length: ' + val.length); + if (val.length === 0) { + nodeVal = this.state.previousNodeTypeDsl; + inputValue = inputValue + term.slice(0, -1); + }else { + inputValue = inputValue + ' ' + nodeVal; + } + console.log('getValue.inputValue property: ' + inputValue); + if (nodeVal) { + this.propertiesDsl=this.populateColumnOptions(nodeVal, isStartNode); + this.setState({nodeTypeDsl: nodeVal,previousNodeTypeDsl:nodeVal}); + } + term = this.propertiesDsl; + } else if (term.slice(-1) === '>') { + console.log('getValue.detected > edgerule search'); + var nodeVal = this.state.previousNodeTypeDsl; + nodeVal = nodeVal.trim(); + console.log('getValue.edgerule.nodeVal: ' + nodeVal); + var val = []; + + inputValue = term; + + this.populateEdgeRules(nodeVal); + term = traverseRulesDsl; + } + else { + //console.log('getValue.nodeTypes: ' + this.state.nodeTypes); + term = (term === '' ? this.state.nodeTypes : this.state.nodeTypes.filter(v => v.toLowerCase().indexOf(term.toLowerCase()) > -1)).slice(0, 10); + } + //console.log('getValue.term: ' + term); + return term; + } + + camelToDash = (str) => { + console.log('camelToDash.str: ' + str); + return (str.replace(/\W+/g, '-') + .replace(/([a-z\d])([A-Z])/g, '$1-$2')).toLowerCase(); + } + + + populateColumnOptions = (nodeType, isStartNode) =>{ + console.log('populateColumnOptions>>>>>nodeType',nodeType); + let propertiesDsl = []; + var result = JSON.parse(OXM); + var arrayOfTypes = result['xml-bindings']['java-types'][0]['java-type']; + //console.dir(arrayOfTypes); + var foundIndex = -1; + var searchParam = nodeType; + //if(['PSERVER', 'COMPLEX', 'CLOUDREGION', 'NETWORKPROFILE', 'VIRTUALDATACENTER'].indexOf(this.nodeType.toUpperCase()) === -1){ + //searchParam = this.nodeType.substring(0, this.nodeType.length - 1); + //} + //console.log('nodeType:' + nodeType); + if (nodeType.substr(nodeType.length - 3) === 'ies') { + searchParam = nodeType.substring(0, nodeType.length - 3) + 'y'; + } + + if (nodeType.toUpperCase() === 'LINESOFBUSINESS') { + searchParam = 'lineOfBusiness'; + } + //console.log('searchParam:' + searchParam); + for (var i = 0; i < arrayOfTypes.length && foundIndex === -1; i++) { + if (arrayOfTypes[i]['xml-root-element'][0]['$']['name'] === this.camelToDash(searchParam)) { + foundIndex = i; + } + } + for (var j = 0; j < arrayOfTypes[foundIndex]['java-attributes'][0]['xml-element'].length; j++) { + let property = arrayOfTypes[foundIndex]['java-attributes'][0]['xml-element'][j]['$']['name']; + //console.log('array' + JSON.stringify(property)); + let type = arrayOfTypes[foundIndex]['java-attributes'][0]['xml-element'][j]['$']['type']; + //console.log('type: ' + type); + if (type === 'java.lang.String' || type === 'java.lang.Boolean' || type ==='java.lang.Integer' || type ==='java.lang.Long') { + let value = ''; + if(isStartNode !== undefined){ + value = '(\'' + property + '\',\'Value\')'; + }else{ + value= property; + } + propertiesDsl.push(value); + } + } + //console.log('propertiesDsl: ' + propertiesDsl); + let sortedPropertiesDsl = propertiesDsl.sort(function (filter1, filter2) { + if (filter1 < filter2) { + return -1; + } else if (filter1 > filter2) { + return 1; + } else { + return 0; + } + }); + //console.log('sortedPropertiesDsl: ' + sortedPropertiesDsl); + if(isStartNode !== undefined){ + propertiesDsl = sortedPropertiesDsl; + //console.log('FilterList' + JSON.stringify(propertiesDsl)); + } + return propertiesDsl; + + } + componentWillReceiveProps(nextProps) { + console.log('nextProps......', nextProps); + //console.log('this.props.....', this.props); + + var relArray = false; + if(this.props.match.params.relArray){ + if(nextProps.match.params.relArray){ + if(nextProps.match.params.relArray !== this.props.match.params.relArray){ + relArray = true; + } + } + }else{ + relArray = false; + } + console.log('relArray>>>>',relArray); + this.setState({ + isDSLFlow: this.props.viewName === 'BYOQ', + isSavedQueryFlow: this.props.viewName === 'Saved Queries', + showNodeModal:false + },()=>{if (nextProps.match.params.type && nextProps.match.params.propId && + (nextProps.match.params.type !== this.props.match.params.type || + nextProps.match.params.propId !== this.props.match.params.propId || relArray)) { + this.props = nextProps; + this.buildDynamicByoq(); + }}); + } + populateEdgeRules = (nodeType) => { + traverseRulesDsl = []; + console.log('populateEdgeRules.nodeType: ' + nodeType); + for (var i = 0; i < this.state.edgeRules.length; i++) { + var ruleObj = this.state.edgeRules[i]; + if (ruleObj.from === nodeType) { + console.log('from: ' + ruleObj.to); + traverseRulesDsl.push(ruleObj.to); + } + if (ruleObj.to === nodeType) { + console.log('to: ' + ruleObj.from); + traverseRulesDsl.push(ruleObj.from); + } + } + let traverseRulesDslSorted = traverseRulesDsl.sort(function (filter1, filter2) { + if (filter1 < filter2) { + return -1; + } else if (filter1 > filter2) { + return 1; + } else { + return 0; + } + }); + console.log('EdgeRulesList' + JSON.stringify(traverseRulesDslSorted)); + traverseRulesDsl = traverseRulesDslSorted; + } + + // Autosuggest will call this function every time you need to update suggestions. + // You already implemented this logic above, so just use it. + onSuggestionsFetchRequested = ({ value }) => { + this.setState({ + suggestions: this.getSuggestions(value) + }); + }; + getAllExcels = (pageRange,rangeState) =>{ + console.log('getAllExcels>>>>>>>>>>>*',pageRange); + if(pageRange){ + this.typeOfCall=false; + let rangeModelState=(rangeState)? rangeState: false; + this.setState( + { pageRange: pageRange,isLoading: true,showDownloadResultsModal:rangeModelState,enableModelBusyFeedback:true}, + function () { this.formQueryString(false,false,false); }.bind(this) + ); + }else{ + + this.setState( + {errorDownloadResults: false, showDownloadResultsModal: false, downloadErrorMsg:'', isLoading: false, enableModelBusyFeedback:false}, + function () { generateExcels(this.nodeResults,this.state.prevQuery);this.nodeResults='';this.typeOfCall = true;}.bind(this) + ); + } + } + + getTreeFromDSL = (dslQuery) =>{ + var treeObject = []; + var payload = {dsl: dslQuery}; + settings['ISAPERTURE'] = true; + return commonApi(settings, 'dsl/convert-query-to-tree', 'PUT', payload, 'ConvertQueryToTree') + .then(res => { + console.log('res:' + res.data, 'load'); + if(res.status === 200 || res.status === 404){ + if(res.data.status && (res.data.status !== 200 && res.data.status !== 201 && res.data.status !== 404)){ + this.triggerTreeError(res.data, 'treeLoad'); + return {}; + }else{ + treeObject = res.data; + this.setState({ + treeLoadErrMsg: null + }); + console.log("TREE OBJECT: " + JSON.stringify(treeObject)); + //set the init state + var initNode = GeneralCommonFunctions.extractNodeDetails(treeObject.children[0], true, this.triggerTreeError, APERTURE_SERVICE); + if(!this.state.treeLoadErrMsg || this.state.treeLoadErrMsg === ''){ + console.log(JSON.stringify(initNode)); + return initNode; + }else{ + this.triggerTreeError(null, 'treeLoad'); + return {}; + } + } + }else{ + this.triggerTreeError(res.data, 'treeLoad'); + return {}; + } + }, error=>{ + if(error.response.status === 404){ + this.setState({enableTreeLoadBusyFeedback:false}); + return {}; + }else{ + this.triggerTreeError(error.response.data, 'treeLoad'); + return {}; + } + }).catch(error => { + this.triggerTreeError(error, 'treeLoad'); + return {}; + }) + } + triggerTreeError = (error, type) => { + console.error('[CustomDsl.jsx] error : ', JSON.stringify(error)); + let errMsg = ''; + if(error && error.status && error.message){ + errMsg += "Error Occurred: " + error.status + ' - ' +error.message; + }else{ + errMsg += "Error Occurred: " + JSON.stringify(error); + } + console.log(errMsg); + if(type === 'treeLoad' || type === 'invalidQuery'){ + var errorMessage = errMsg; + this.setState({treeLoadErrMsg: errorMessage, enableTreeLoadBusyFeedback: false}); + }else{ + console.log('[CustomDsl.jsx] :: triggerError invoked with invalid type : ' + type); + } + } + getConfigArrayFromDSLTree = (node, configArray, keyArray) =>{ + + var tempKey = node.name; + var nodeKey; + if(keyArray[tempKey]){ + nodeKey = tempKey + '-' + keyArray[tempKey]; + keyArray[tempKey] = keyArray[tempKey]++; + }else{ + nodeKey = tempKey; + keyArray[tempKey] = 1; + } + if(node.details && node.details.attrDetails){ + for (var attr in node.details.attrDetails){ + if(node.details.attrDetails[attr].filterType && node.details.attrDetails[attr].filterType.length > 0 + && node.details.attrDetails[attr].filterType[0] !== ""){ + if(!configArray[nodeKey]){ + configArray[nodeKey] = {}; + configArray[nodeKey].filters = []; + } + configArray[nodeKey].filters.push(attr); + } + } + } + if(node.children && node.children.length > 0){ + for(var i = 0; i < node.children.length; i++){ + configArray = this.getConfigArrayFromDSLTree(node.children[i], configArray, keyArray); + } + } + return configArray; + } + handlePageChange = (pageNumber) => { + console.log('[CustomDsl.jsx] HandelPageChange active page is', pageNumber); + this.typeOfCall = true; + if(this.state.isAggregateChecked){ + this.setState( + { aggregateActivePage: pageNumber, isLoading: true, nodes: [], aggregateNodes: [],resetColumnFilters: false, isPageNumberChange: true}, + function () { this.formQueryString(false,false,false); }.bind(this) + ); + }else{ + this.setState( + { activePage: pageNumber, isLoading: true, nodes: [], aggregateNodes: [],resetColumnFilters: false, isPageNumberChange: true}, + function () { this.formQueryString(false,false,false); }.bind(this) + ); + } + } + // Autosuggest will call this function every time you need to clear suggestions. + onSuggestionsClearRequested = () => { + this.setState({ + suggestions: [] + }); + }; + +// https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions#Using_Special_Characters + escapeRegexCharacters(str) { + return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + } + + getSuggestions = (value) => { + console.log('getSuggestions.value: ' + value); + const escapedValue = this.escapeRegexCharacters(value.trim()); + const regex = new RegExp('^' + escapedValue, 'i'); + return nodeTypes.filter(nodeType => regex.test(nodeType)); + } + + +// When suggestion is clicked, Autosuggest needs to populate the input +// based on the clicked suggestion. Teach Autosuggest how to calculate the +// input value for every given suggestion. + getSuggestionValue = suggestion => suggestion; + +// Use your imagination to render suggestions. + renderSuggestion = suggestion => ( + <div> + {suggestion} + </div> + ); + + onSuggestionsUpdateRequested =( { value }) => { + console.log('onSuggestionsUpdateRequested.value: ' + value); + this.setState({ + suggestions: getSuggestions(value) + }); + } + + shouldRenderSuggestions = () => { + return true; + } + openHistory = (nodeDisplay, nodeUri, nodeType) => { // open modal from Card + console.log('history >> showModal',nodeDisplay); + let historyNodeUri = (nodeUri)?nodeUri.replace('/aperture/','/'):nodeUri; + let paramToPassThrough = ''; + if(nodeType){ + this.setState({ + nodeDisplay: nodeDisplay, + showHistoryModal: true, + showModelOptions:true, + enableCalendar:true, + historyType:(this.state.historyType === 'dsl') ? 'nodeState' : this.state.historyType, + focusedNodeUri: historyNodeUri, + focusedNodeType: nodeType + }); + }else{ + this.setState({ + showHistoryModal:true, + showModelOptions:false, + enableCalendar:true, + historyType : 'dsl', + focusedNodeUri: this.state.value, + focusedNodeType: nodeType + }); + } + } + closeHistory = () => { + this.setState({ + showHistoryModal: false, + enableCalendar:true, + historyType :'nodeState' + }); + } + submitHistory = () => { + console.log("submitting history"); + let paramToPassThrough = ''; + if(this.state.focusedNodeType){ + paramToPassThrough = '/history/' + this.state.historyType +'/' + this.state.focusedNodeType + '/' + btoa(this.state.focusedNodeUri); + }else{ + paramToPassThrough = '/historyQuery/' + this.state.historyType + '/' + btoa(this.state.value); + } + let epochStartTime = (this.state.startDate).unix(); + this.props.history.push(paramToPassThrough + '/' + epochStartTime * 1000); + } + handleDateChange = (newDate) =>{ + this.setState({ startDate: moment(+newDate) }); + console.log('[CustomDsl.jsx] handleDateChange date is ', this.state.startDate); + console.log('[CustomDsl.jsx] handleDateChange date is in millis ', +this.state.startDate); + } + + setViewName(event) { + console.log(event.currentTarget.value); + if(this.state.isAggregate && event.currentTarget.value === 'VisualLayout'){ + this.formQueryString(false, false, true); + } + this.setState({ + viewName: event.currentTarget.value + }); + } + + setDefaultViewName=(event)=>{ + let ENVIRONMENT = GlobalExtConstants.ENVIRONMENT; + let layout = event.target.value; + + if(sessionStorage.getItem(ENVIRONMENT + 'userId')) { + if (event.target.checked) { + localStorage.setItem(ENVIRONMENT + '_' + sessionStorage.getItem(ENVIRONMENT + 'userId') + '_viewPreference', layout); + } else { + localStorage.removeItem(ENVIRONMENT + '_' + sessionStorage.getItem(ENVIRONMENT + 'userId') + '_viewPreference'); + } + } + + this.setState({ + defaultViewName: event.target.value + }); + this.baseState.viewName=event.target.value; + this.baseState.defaultViewName=event.target.value; + } + openNodeModal(nodeDisplay, nodeUri, nodeType){ // open modal + console.log('customdsl >> showModal'); + nodeDisplay = "Node Details of " + nodeUri; + let node = null; + let found = false; + for(var j = 0; j < this.state.nodes.length && !found; j++){ + if(this.state.nodes[j].url === nodeUri){ + node = this.state.nodes[j]; + found = true; + } + } + if(nodeDisplay && found){ + this.setState({ + nodeDisplay: nodeDisplay, + focusedNode: node, + showNodeModal:true + }); + }else{ + this.setState({ + showNodeModal:true + }); + } + } + + closeNodeModal = () => { + this.setState({ + showNodeModal: false + }); + } + + componentDidUpdate(prevProps, prevState, snapshot) { + if((this.state.isAggregate || this.state.aggregateNodes.length > 0 || this.state.nodes.length > 0) && !this.state.visualAddition){ + //Visualization.chart('currentState', [], [], this.state.res.data, this); + this.setState({ + visualAddition: true + }); + } + } + setHistoryType(event) { + console.log(event.target.value); + let enableCalendar = false; + if(event.target.value === 'nodeLifeCycle'){ + enableCalendar = false; + }else{ + enableCalendar = true; + } + this.setState({ + historyType: event.target.value, + enableCalendar: enableCalendar + }); + console.log(this.state.enableCalendar); + } + loadBulkCallback=(loadQueryList)=>{ + console.log('Start:Load bulk Callback>>>>>>'); + let filterEntriesList=[]; + let filterTemplateHeaderList=[]; + let filterTemplateErrorList=[]; + let nodeTypeOfDslTemplateList=[]; + let templateQueryList=[]; + let valueList=[]; + this.dslObjectList=[]; + this.nodeTypeArrayList=[]; + this.tempDslQueryList=[]; + this.templateErrorList={}; + let isAggregateCheckedList=[]; + let associatedNodesEnabledList=[]; + let queryNameList=[]; + let queryDescriptionList=[]; + let categoryList=[]; + let isPublicCheckedList=[]; + let queryIdList=[]; + let filterTypeDisplayList=[]; + let isCommunitySharedList = []; + let staticTemplateFiltersList=[]; + for(var idx=0;idx<loadQueryList.length;idx++){ + let splitString = loadQueryList[idx].split('||'); + let name = splitString[0]; + let description = splitString[1]; + let category=(splitString[2] !== 'undefined')? splitString[2]:''; + let dsl = splitString[3]; + let isAggregate = splitString[4]; + let type = splitString[5]; + let queryId = splitString[6]; + let isCommunityShared = splitString[7]; + let templateDetails = splitString[8]; + if(name !== '' && description !== '' && this.state.isSavedQueryFlow){ + var staticTemplateFilters = templateDetails; + if(staticTemplateFilters.length > 0){ + staticTemplateFilters = JSON.parse(staticTemplateFilters); + }else{ + staticTemplateFilters = []; + } + staticTemplateFiltersList.push(staticTemplateFilters); + queryNameList.push(name); + queryIdList.push(queryId); + queryDescriptionList.push(description); + isPublicCheckedList.push(type === 'public'); + categoryList.push(category); + isCommunitySharedList.push(isCommunityShared); + } + associatedNodesEnabledList.push(false); + if(isAggregate === "true"){ + isAggregateCheckedList.push(true); + }else{ + isAggregateCheckedList.push(false); + } + filterTypeDisplayList.push({'default':'Filter Type'}); + this.setState({ + queryNameList:queryNameList, + queryDescriptionList:queryDescriptionList, + categoryList:categoryList, + isPublicCheckedList: isPublicCheckedList, + queryIdList: queryIdList, + filterTemplateEntries:[], + filterTemplateError: false, + isTypeahead: false, + isAggregateCheckedList: isAggregateCheckedList, + associatedNodesEnabledList: associatedNodesEnabledList, + filterTypeDisplayList: filterTypeDisplayList, + downloadTemplateStatus:false, + failedDownloadedTemplate:[], + failedDownloadedTemplateMsg:'', + failedEmailTemplateMsg:'', + emailTriggerMsg:'', + isMergedTabsChecked: false, + staticTemplateFiltersList: staticTemplateFiltersList + }); + + if(this.state.isSavedQueryFlow){ + + dsl=atob(dsl).replace('<pre>','').replace('</pre>',''); + this.dslObject={}; + this.nodeTypeArray=[]; + + var limitPattern = /limit[\s]\d+|limit\d+/ig; + var limitkey = dsl.match(limitPattern); + if(limitkey){ + dsl = dsl.replace(limitkey[limitkey.length-1],'').trim(); + } + dsl = this.alterDslQueryByRemoveSpaces(dsl); + //create placeholders for NodeTypes with Propand Propvalues + this.tempDslQuery=this.formTempDslQuery(dsl); + this.tempDslQueryList.push(this.tempDslQuery); + //Preparinga Json Object to render into Placeholder + this.contructDslNodes(dsl,'node',false,false,false,false); + //Query to replace placeholders with JSON Object values depends on Flow either SavedQuery or TableFilters + let query=this.formTemplateQuery('savedQuery',idx,true); + query=query.replace(/\'(as)\'/g,'\' as \'').replace(/\(\'\s(as)\s\'\)/g,'(\'as\')'); + if(limitkey){ + query+=' '+limitkey[limitkey.length-1]; + } + let filterEntries=[]; + let filterTemplateHeader={}; + var errorOccurred=false; + Object.keys(this.dslObject).map((key)=>{ + filterEntries.push(this.dslObject[key]['filterEntries'][0]); + filterTemplateHeader[key]= {} + filterTemplateHeader[key]=this.dslObject[key]['filterTemplateHeader'][key]; + if(!errorOccurred){ + errorOccurred=this.dslObject[key]['errorOccurred']; + } + }); + filterEntriesList.push(filterEntries); + filterTemplateHeaderList.push(filterTemplateHeader); + filterTemplateErrorList.push(errorOccurred); + nodeTypeOfDslTemplateList.push(this.nodeTypeArray); + templateQueryList.push(query); + valueList.push(dsl); + this.dslObjectList.push(this.dslObject); + + } + } + this.setState({ valueList: valueList, + templateQueryList: templateQueryList, + filterTemplateEntriesList: filterEntriesList, + filterTemplateHeaderList:filterTemplateHeaderList, + filterTemplateErrorList: filterTemplateErrorList, + nodeTypeOfDslTemplateList:nodeTypeOfDslTemplateList, + isAggregateCheckedList: isAggregateCheckedList, + associatedNodesEnabledList: associatedNodesEnabledList, + isInitialLoad:false + },()=>{GeneralCommonFunctions.scrollTo('templateList');}); + } + loadCallback = (name, description, category, dslQuery, isAggregate, type, queryId, isCommunityShared, id, templateDetails, makeCall) =>{ + let filterEntriesList=[]; + let filterTemplateHeaderList=[]; + let filterTemplateErrorList=[]; + let nodeTypeOfDslTemplateList=[]; + let templateQueryList=[]; + let valueList=[]; + this.dslObjectList=[]; + this.nodeTypeArrayList=[]; + this.tempDslQueryList=[]; + this.templateErrorList={}; + let isAggregateCheckedList=[]; + let associatedNodesEnabledList=[]; + let queryNameList=[]; + let queryDescriptionList=[]; + let categoryList=[]; + let isPublicCheckedList=[]; + let queryIdList=[]; + let filterTypeDisplayList=[]; + let isCommunitySharedList=[]; + let staticTemplateFiltersList=[]; + let idx=parseInt(id); + if(isNaN(idx)){ + idx=0; + } + if(name !== '' && description !== '' && this.state.isSavedQueryFlow){ + queryNameList.push(name); + queryIdList.push(queryId); + queryDescriptionList.push(description); + isPublicCheckedList.push(type === 'public'); + var staticTemplateFilters = templateDetails; + if(staticTemplateFilters.length > 0){ + staticTemplateFilters = JSON.parse(staticTemplateFilters); + }else{ + staticTemplateFilters = []; + } + staticTemplateFiltersList.push(staticTemplateFilters); + categoryList.push(category); + isCommunitySharedList.push(isCommunityShared); + this.setState({ + queryNameList:queryNameList, + queryDescriptionList:queryDescriptionList, + categoryList:categoryList, + isPublicCheckedList: isPublicCheckedList, + isCommunitySharedChecked: isCommunityShared === "true", + queryIdList: queryIdList, + isCommunitySharedList:isCommunitySharedList, + staticTemplateFiltersList: staticTemplateFiltersList, + downloadTemplateStatus:false, + failedDownloadedTemplate:[], + failedDownloadedTemplateMsg:'', + failedEmailTemplateMsg:'', + emailTriggerMsg:'', + isMergedTabsChecked: false, + isGenerateEmailChecked: false + }); + } + //reset any filter template forms + this.setState({ filterTemplateEntries: [], filterTemplateError: false, isTypeahead: false}); + associatedNodesEnabledList.push(false); + let associatedNodesEnable=false; + let isAggregateChecked=false; + if(isAggregate === "true"){ + isAggregateCheckedList.push(true); + isAggregateChecked=true; + }else{ + isAggregateCheckedList.push(false); + } + this.setState({ isAggregateCheckedList: isAggregateCheckedList, associatedNodesEnabledList: associatedNodesEnabledList,isAggregateChecked:isAggregateChecked,associatedNodesEnabled:associatedNodesEnable}); + if(this.state.isSavedQueryFlow && !makeCall){ + this.loadTemplateForm(atob(dslQuery).replace('<pre>','').replace('</pre>',''),idx); + }else{ + this.setState({viewName: this.state.defaultViewName, + activePage: 1, + aggregateActivePage: 1}); + this.buildDynamicByoq(atob(dslQuery).replace('<pre>','').replace('</pre>',''), makeCall); + } + if(this.state.isDSLFlow){ + GeneralCommonFunctions.scrollTo("jumbotron"); + }else if(this.state.isSavedQueryFlow){ + GeneralCommonFunctions.scrollTo("templateList"); + } + } + + editCallback = (name, description, category, dsl, isAggregateStr, type, queryId, isCommunityShared, templateDetails) =>{ + //Save stated of loaded queries + this.state.valuePreviousState = this.state.value; + this.state.isAggregateCheckedPreviousState = this.state.isAggregateChecked; + this.state.isCommunitySharedCheckedPreviousState = this.state.isCommunitySharedChecked; + this.state.associatedNodesEnabledPreviousState = this.state.associatedNodesEnabled; + + let isAggregateChecked = false; + let isCommunitySharedChecked = false; + let associatedNodesEnabled = false; + + if(isAggregateStr === 'true'){ + isAggregateChecked = true; + associatedNodesEnabled = true; + } + + if(isCommunityShared === 'true'){ + isCommunitySharedChecked = true; + } + + var staticTemplateFilters = templateDetails; + if(staticTemplateFilters.length > 0){ + staticTemplateFilters = JSON.parse(staticTemplateFilters); + }else{ + staticTemplateFilters = []; + } + this.getTreeFromDSL(dsl).then(tree => { + this.setState({ + enableTreeLoadBusyFeedback: false, + dslConfigArray: this.getConfigArrayFromDSLTree(tree, [], []), + showSaveModal: true, + saveSuccessfulMsg: false, + isPublicChecked: type === 'public', + isEditModal:true, + queryName:name, + queryDescription:description, + category:category, + isAggregateChecked: isAggregateChecked, + isCommunitySharedChecked: isCommunitySharedChecked, + associatedNodesEnabled: associatedNodesEnabled, + value: dsl, + queryId: queryId, + staticTemplateFilters: staticTemplateFilters + }); + }); + } + + saveTemplate = (idx) => { + var saveModal = () => { + this.setState( + { + showSaveModal: true, + saveSuccessfulMsg: false, + isPublicChecked: this.state.isPublicChecked, + isEditModal:false, + queryName:'', + queryDescription:'', + category:'', + queryId:'', + isPublicChecked: this.state.isPublicCheckedList[idx], + isAggregateChecked: this.state.isAggregateCheckedList[idx], + enableTreeLoadBusyFeedback: true + }); + this.getTreeFromDSL(this.state.value).then(tree => { + this.setState({enableTreeLoadBusyFeedback: false, dslConfigArray: this.getConfigArrayFromDSLTree(tree, [], [])}); + }); + } + this.populateTemplate(false, saveModal, idx); + } + + runTemplate = (idx) =>{ + this.populateTemplate(true, null, idx); + } + submitEditAndRunDSL = () =>{ + this.setState({ showEditModal: false, value: this.state.editModel,aggregateActivePage:1,activePage:1 }, () => this.formQueryString(false,false,false)); + } + showEditDSLModal = (idx) => { + console.log("enabling DSL edit modal"); + var openModal = () => { + this.setState({ editModel: this.state.value, enableTreeLoadBusyFeedback: true, showEditModal: true }); + } + this.populateTemplate(false, openModal, idx); + } + closeEditDSLModal = () => { + console.log("closing DSL edit modal"); + this.setState({ showEditModal: false, enableTreeLoadBusyFeedback: false }); + } + bindEdits = (e) => { + this.setState({ editModel: e.target.value }); + } + populateTemplate = (shouldRun, callback, indx) =>{ + console.log('CustomDSL:populateTemplate this.state>>>>>>>>>>>>>>>>>>>*',this.state); + let query=this.formFinalTemplateQuery(indx); + console.log('CustomDSL:query>>>>>>>>>*',query); + console.log('CustomDSL:query>>>>>>>>>BTOA*',btoa(query)); + this.setState({ value: query,aggregateActivePage:1,activePage:1}, () => {if(shouldRun){this.formQueryString(false,false,false)}else{callback()}}); + } + formFinalTemplateQuery = (indx)=>{ + console.log('formFinalTemplateQuery>> forming finalQuery before Run scenarios>>>>'); + var query = this.state.templateQueryList[indx]; + for(var i = 0; i < this.state.filterTemplateEntriesList[indx].length; i++){ + let filterTemplateEntries=this.state.filterTemplateEntriesList[indx][i]; + Object.keys(filterTemplateEntries).map((key)=>{ + Object.keys(filterTemplateEntries[key]).map((entry)=>{ + let templateEntry=filterTemplateEntries[key][entry]; + if(templateEntry.name !== ''){ + let templateFilterQuery = "'" + templateEntry.name + "','" + templateEntry.value + "'"; + console.log('Before templateFilterQuery>>>>>',templateFilterQuery); + let valueArray=templateEntry.value.split('^'); + let typeArray=templateEntry.type.split('^'); + templateFilterQuery = "'" + templateEntry.name + "'"; + let templatekeyValues=''; + for(var x=0;x<valueArray.length;x++){ + if(valueArray[x] !==''){ + if(templatekeyValues === ''){ + templatekeyValues = (this.state.enableRealTime)?typeArray[x] +"('" + valueArray[x] + "')":"'"+valueArray[x]+"'"; + }else{ + templatekeyValues = (this.state.enableRealTime)?templatekeyValues+","+typeArray[x] +"('" + valueArray[x] + "')":templatekeyValues+",'"+ valueArray[x] + "'"; + } + } + } + templateFilterQuery=templateFilterQuery+","+templatekeyValues; + console.log('templateFilterQuery>>>>>',templateFilterQuery); + query = query.replace('$' + (templateEntry.templateKey + 1),templateFilterQuery); + query = query.replace(/\"/g,'\''); + } + }) + }); + } + return query; + } + stripFirstCharacter=(str)=>{ + return str.substr(1); + } + stripLastCharacter=(str)=>{ + return str.substr(0, str.length - 1); + } + stripFirstTwoCharacter(str){ + return str.substr(2); + } + updateTemplateFilterValues=(key,templateKey,value,id,idx)=>{ + if(value!==''){ + var filterTemplateEntriesList = this.state.filterTemplateEntriesList; + var filterTemplateHeaderList=this.state.filterTemplateHeaderList; + var filterMap = filterTemplateEntriesList[idx]; + var filterTemplateHeader=filterTemplateHeaderList[idx]; + let idArray=id.split('_'); + let ind=parseInt(idArray[idArray.length-1]); + let finalSelectedProp=''; + let existing=false; + console.log(ind+'<<<updateTemplateFilterValues>>>>'+key+'<><>',value); + console.log(templateKey+'filterMap>>>>>>>>>>>>>>>>',filterMap); + Object.keys(filterMap).forEach((index) =>{ + if(filterMap[index][key]){ + Object.keys(filterMap[index][key]).forEach((i)=>{ + if(filterMap[index][key][i].templateKey === templateKey){ + console.log(key+'<<filterMap[index][key][templateKey]>>>'+filterMap[index][key][i]); + let filterValue=filterMap[index][key][i].value.split('^'); + filterValue[ind]=value; + filterMap[index][key][i].value=filterValue.join('^'); + console.log('Updated Filtered Template Entries map' + JSON.stringify(filterMap)); + if(filterMap[index][key][i].name !== '' ){ + filterTemplateHeader[key]['propName'] = filterMap[index][key][i].name; + existing =true; + }else{ + console.log('set listname >>>>***',filterTemplateHeader[key]['propName']); + finalSelectedProp=filterTemplateHeader[key]['propName']; + let status=false; + if(filterTemplateHeader[key]['propName'] !== this.state.filterDisplay){ + filterMap[index][key][i].name= filterTemplateHeader[key]['propName']; + status=true; + }else{ + filterMap[index][key][i].name= 'ERROR'; + if(!(this.templateErrorList[idx] && this.templateErrorList[idx].length>0)){ + this.templateErrorList[idx]=[]; + } + this.templateErrorList[idx].push(key); + } + let selectedProp=[]; + console.log('filterTemplateHeader[key][selectedProp]>>>>',filterTemplateHeader[key]['selectedProp']); + if(filterTemplateHeader[key]['selectedProp'] && status){ + selectedProp=filterTemplateHeader[key]['selectedProp']; + let indSelect= selectedProp.indexOf(filterTemplateHeader[key]['propName']); + if(indSelect !== -1){ + selectedProp=selectedProp.splice(indSelect,1); + filterTemplateHeader[key]['selectedProp']=selectedProp; + } + } + } + filterTemplateHeader[key]['enableAnd'] = true; + this.updateSavedQueryTemplate('add',key,templateKey,filterMap,filterTemplateHeader,idx); + } + }); + } + }); + } + // this.setState({filterTemplateError: true}); +} +updateSavedQueryTemplate=(action,key,templatekey,templateMaps,templateHeader,idx)=>{ + console.log(action+'updateSavedQueryTemplate>>>>>>>>>>>>>*'); + let templateEntriesList = this.state.filterTemplateEntriesList; + let filterTemplateHeaderList=this.state.filterTemplateHeaderList; + let templateEntries = templateEntriesList[idx]; + let filterTemplateHeader= filterTemplateHeaderList[idx]; + let finalSelectedProp=''; + idx=parseInt(idx); + if(templateMaps){ + templateEntries=templateMaps; + } + if(templateHeader){ + filterTemplateHeader=templateHeader + } + let templateQuery = this.state.templateQueryList[idx]; + if(templateQuery.charAt(templateQuery.length-1) !== ']'){ + templateQuery=templateQuery+','; + } + let keyact=isNaN(parseInt(key.substr(key.length-2,key.length-1))); + console.log('keyact>>>>****',keyact); + console.log('TemplateQuery>>>&&*',templateQuery); + let nodeInd=0; + let tempkey =key; + if(!keyact){ + let actKey=key.split('-'); + nodeInd=parseInt(actKey[actKey.length-1]); + actKey.splice(actKey.length-1,1); + tempkey=actKey.join('-'); + } + let dslObject=this.dslObjectList[idx]; + if(action === 'add'){ + Object.keys(dslObject).map((nodekey)=>{ + if(nodekey === key){ + let tempEntries=[]; + Object.keys(templateEntries).map((index) =>{if(templateEntries[index][key] && nodekey === key){ tempEntries= templateEntries[index][key]}}); + console.log('tempEntries>>>>',tempEntries); + dslObject[nodekey]['templateEntries']=tempEntries; + dslObject[nodekey]['filterTemplateHeader']=filterTemplateHeader[nodekey]; + } + }) + }else{ + let findEntry=true; + Object.keys(templateEntries).map((index) =>{ + console.log('templateEntries[index][key]??????',templateEntries[index][key]); + if(templateEntries[index][key]){ + Object.keys(templateEntries[index][key]).map((i)=>{ + console.log(i+'templateEntries[index][key][i].templateKey>>>',templateEntries[index][key][i]); + if(findEntry && templateEntries[index][key][i].templateKey === templatekey){ + findEntry=false; + let name = templateEntries[index][key][i].name; + finalSelectedProp=name; + templateEntries[index][key].splice(i,1); + filterTemplateHeader[key]['enableAnd'] = true; + filterTemplateHeader[key]['propName'] = this.state.filterDisplay; + let selectedProp=[]; + console.log('filterTemplateHeader[key][selectedProp]???????',filterTemplateHeader[key]['selectedProp']); + if(filterTemplateHeader[key]['selectedProp']){ + selectedProp=filterTemplateHeader[key]['selectedProp']; + let ind= selectedProp.indexOf(name); + if(ind !== -1){ + selectedProp=selectedProp.splice(ind,1); + filterTemplateHeader[key]['selectedProp']=selectedProp; + } + } + if(name=='ERROR'){ + if(this.templateErrorList[idx] && this.templateErrorList[idx].length>0){ + this.templateErrorList[idx].pop(); + } + } + console.log('selectedProp>>>>',filterTemplateHeader[key]['selectedProp']); + } + }); + } + }); + Object.keys(dslObject).map((nodekey)=>{ + if(nodekey === key && !findEntry){ + let tempEntries=[]; + Object.keys(templateEntries).map((index) =>{if(templateEntries[index][key] && nodekey === key){ tempEntries= templateEntries[index][key]}}); + console.log('Delete tempEntries>>>>',tempEntries); + dslObject[nodekey]['templateEntries']=tempEntries; + dslObject[nodekey]['filterTemplateHeader']=filterTemplateHeader[nodekey]; + } + }) + } + console.log(action+' .......Update Saved ***************this.dslObject',dslObject); + Object.keys(dslObject).map((nodekey)=>{ + //console.log(nodekey+'this.dslObject[nodekey][0]>>>>>',dslObject[nodekey][0]); + //console.log('key>>>>',key); + if(nodekey === key && dslObject[nodekey][0]){ + Object.keys(templateEntries).map((index) =>{ + console.log('templateEntries[index][key]>>>>',templateEntries[index][key]); + if(templateEntries[index][key]){ + let props='{'; + Object.keys(templateEntries[index][key]).map((i)=>{ + console.log(i+'templateEntries[index][key]>>>>',templateEntries[index][key][i]); + let prop=''; + let newProps=(parseInt(i)!==0)?',\''+templateEntries[index][key][i]['name']+'\'':'\''+templateEntries[index][key][i]['name']+'\''; + props+=newProps; + if(templateEntries[index][key][i].templateKey === templatekey){ + let name=templateEntries[index][key][i]['name'] + let value=templateEntries[index][key][i]['value'].split('^'); + let type=templateEntries[index][key][i]['type'].split('^'); + prop='(\''+name+'\','; + for(var x=0;x<value.length;x++){ + if(this.state.enableRealTime){ + prop+=type[x]+'(\''+value[x]+'\')'; + if(x===value.length-1){ + prop+=')'; + }else{ + prop+=','; + } + }else{ + prop+='\''+value[x]+'\''; + if(x===value.length-1){ + prop+=')'; + }else{ + prop+=','; + } + } + } + let values=dslObject[nodekey][0]['values']; + //console.log('values>>>>>',values); + if(values && values.length>0){ + let findState=false; + let errorPropMsg=null; + for(var n=0;n<values.length;n++){ + if(values[n].indexOf('!(\''+name+'\'') !==-1){ + values[n]='!'+prop; + findState=true; + }else if(values[n].indexOf('(\''+name+'\'') !==-1){ + values[n]=prop; + findState=true; + } + if(values[n].indexOf('(\'ERROR\',') !==-1){ + errorPropMsg=n; + } + } + if(errorPropMsg){ + values.splice(errorPropMsg,1); + } + if(!findState){ + values.push(prop); + } + dslObject[nodekey][0]['values']=values; + }else{ + dslObject[nodekey][0]['values']=[]; + dslObject[nodekey][0]['values'].push(prop); + } + //console.log(prop+'this.dslObject[nodekey][0][values]>>>>',dslObject[nodekey][0]['values']); + } + }); + props+='}'; + if(action!=='add' && dslObject[nodekey][0]['values']){ + dslObject[nodekey][0]['values'].splice(idx,1); + } + } + }); + } + }); + //console.log('After Setting ***************this.dslObject',dslObject); + this.dslObjectList[idx]=dslObject; + let queryList=this.state.templateQueryList; + let dslquery=queryList[idx]; + var limitPattern = /limit[\s]\d+|limit\d+/ig + var limitkey = dslquery.match(limitPattern); + //this.tempDslQuery=this.formTempDslQuery(dsl); + let query=this.formTemplateQuery('savedQuery',idx); + query=query.replace(/\'(as)\'/g,'\' as \'').replace(/\(\'\s(as)\s\'\)/g,'(\'as\')'); + if(limitkey){ + query+=' '+limitkey[limitkey.length-1]; + } + console.log('query>>>>>>>>>>>>>',query); + queryList[idx]=query; + templateEntriesList[idx]=templateEntries; + filterTemplateHeaderList[idx]=filterTemplateHeader; + this.setState({filterTemplateEntriesList:templateEntriesList,filterTemplateHeaderList:filterTemplateHeaderList,templateQueryList:queryList}); + + } + capturingGroups=(dsl)=>{ + var capturedGroups=[]; + let findGroup=true; + var block = dsl; + do{ + var startIndex = block.indexOf('['),/* index of first bracket */ + currPos = startIndex, + openBrackets = 0, + stillSearching = true, + waitForChar = false; + if(currPos === -1){ + findGroup=false; + } + while (stillSearching && currPos <= block.length) { + var currChar = block.charAt(currPos); + switch (currChar) { + case '[': + openBrackets++; + break; + case ']': + openBrackets--; + break; + } + currPos++ + if (openBrackets === 0) { stillSearching = false; } + } + console.log('capturingGroups>>>>>>>>>>>>',block.substring(startIndex , currPos)); + if(block.substring(startIndex , currPos) !==''){ + capturedGroups.push(block.substring(startIndex , currPos)); + block=block.replace(block.substring(startIndex , currPos),'#$') + } + }while(findGroup); + return capturedGroups; + } + formTempDslQuery=(dsl) =>{ + let tempQuery=''; + tempQuery=dsl.replace(/\!\((?:[^>)(]|\((?:[^)(]+)\))*\)/g,'').replace(/\((?:[^>)(]|\((?:[^)(]+)\))*\)/g,'').replace(/\{(.*?)\}/g,'').replace(/\*/g,'').trim('')+','; + tempQuery = tempQuery.replace(/\s+/g, ''); + tempQuery=tempQuery.replace(/[a-zA-Z0-9*\-]/g,'#').replace(/\!\!/g,'!').replace(/\!\>/g,'>'); + tempQuery=tempQuery.replace(/\#(.*?)(?=\>|\!|\(|\)|\,|\])/g,'#').trim(''); + tempQuery=this.stripLastCharacter(tempQuery); + return tempQuery; + } + loadTemplateForm=(dsl,idx) =>{ + console.log('loadTemplateForm>>>idx>>>>',idx); + this.dslObject={}; + this.nodeTypeArray=[]; + var limitPattern = /limit[\s]\d+|limit\d+/ig; + var limitkey = dsl.match(limitPattern); + if(limitkey){ + dsl = dsl.replace(limitkey[limitkey.length-1],'').trim(); + } + dsl = this.alterDslQueryByRemoveSpaces(dsl); + //create placeholders for NodeTypes with Propand Propvalues + this.tempDslQuery=this.formTempDslQuery(dsl); + this.tempDslQueryList.push(this.tempDslQuery); + //Preparinga Json Object to render into Placeholder + this.contructDslNodes(dsl,'node',false,false,false,false); + console.log('dsl>>>>>>>>>>>>>',dsl); + //Query to replace placeholders with JSON Object values depends on Flow either SavedQuery or TableFilters + let query=this.formTemplateQuery('savedQuery',idx,true); + query=query.replace(/\'(as)\'/g,'\' as \'').replace(/\(\'\s(as)\s\'\)/g,'(\'as\')'); + if(limitkey){ + query+=' '+limitkey[limitkey.length-1]; + } + let filterEntries=[]; + let filterTemplateHeader={}; + var errorOccurred=false; + console.log('before setting DSLOBJECT>>',this.dslObject); + Object.keys(this.dslObject).map((key)=>{ + filterEntries.push(this.dslObject[key]['filterEntries'][0]); + filterTemplateHeader[key]= {} + filterTemplateHeader[key]=this.dslObject[key]['filterTemplateHeader'][key]; + if(!errorOccurred){ + errorOccurred=this.dslObject[key]['errorOccurred']; + } + }); + let filterEntriesList=[]; + let filterTemplateHeaderList=[]; + let filterTemplateErrorList=[]; + let nodeTypeOfDslTemplateList=[]; + let templateQueryList=[]; + let valueList=[]; + if(idx === 0){ + this.setState({ valueList: [], + templateQueryList: [], + filterTemplateEntriesList: [], + filterTemplateHeaderList:[], + filterTemplateErrorList: [], + nodeTypeOfDslTemplateList:[] + }); + } + filterEntriesList.push(filterEntries); + filterTemplateHeaderList.push(filterTemplateHeader); + filterTemplateErrorList.push(errorOccurred); + nodeTypeOfDslTemplateList.push(this.nodeTypeArray); + templateQueryList.push(query); + valueList.push(dsl); + this.dslObjectList.push(this.dslObject); + this.setState({ valueList: valueList, + templateQueryList: templateQueryList, + filterTemplateEntriesList: filterEntriesList, + filterTemplateHeaderList:filterTemplateHeaderList, + filterTemplateErrorList: filterTemplateErrorList, + nodeTypeOfDslTemplateList:nodeTypeOfDslTemplateList, + isInitialLoad:false + },()=>{GeneralCommonFunctions.scrollTo('templateList');}); + + } + formTemplateQuery=(flow,idx,state)=>{ + let query=''; + let count = 0; + let tempDslQueryArr=(idx !== undefined && !state)?this.tempDslQueryList[idx].split('#'):this.tempDslQuery.split('#'); + let newCustomQuery=(idx !== undefined && !state)?this.dslObjectList[idx]:this.dslObject; + Object.keys(newCustomQuery).map((key)=>{ + query=''; + let newDslObject=newCustomQuery[key][0]; + let filterValues=''; + if(newDslObject){ + //console.log('this>>>>>>>>>>>>>>>>>>>>>>',this); + if(flow==='savedQuery'){ + //reformed the DSL Object with Filter Entries and Template Entries + this.formTemplateFilterValues(newDslObject['values'],newDslObject['nodeName'],key,idx); + let entries=[]; + if(newCustomQuery[key]['templateEntries']){ + entries=newCustomQuery[key]['templateEntries']; + }else{ + entries=''; + } + filterValues=(newDslObject['values']) ? this.replaceFilterValues(newDslObject['values'],entries) :''; + }else{ + filterValues=(newDslObject['values'])? this.formFilterValues(newDslObject['values']):''; + } + query+=newDslObject['nodeName']; + if(newDslObject['props']){ + query+=newDslObject['props']; + } + if(newDslObject['values']){ + query+=filterValues; + } + tempDslQueryArr[count]=tempDslQueryArr[count]+query; + count++; + } + }); + query=tempDslQueryArr.join(''); + return query; + } + contructDslNodes=(dsl,type,groupStart,groupEnd,edgeStart,edgeEnd)=>{ + console.log(type+'contructDslNodes>>>>>>>>>>>>>>',dsl); + dsl=dsl.replace(/\s*\,\s*/g, ',') + var declareEdgePattern=/\(\>(?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*\)|\!\(\>(?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*\)/g; + let localEdges=dsl.match(declareEdgePattern); + let edgesDsl=dsl; + if(localEdges){ + this.edgesArray=localEdges.concat(this.edgesArray); + edgesDsl=dsl.replace(declareEdgePattern,'>@$'); + edgesDsl=edgesDsl.replace(/\!\>\@\$/g,'>!@$'); + } + //capturing relations group b/w [] Parent only + let relations=this.capturingGroups(edgesDsl); + if(relations){ + this.relationsArray=relations.concat(this.relationsArray); + for(var z in relations){ + edgesDsl=edgesDsl.replace(relations[z],'#$'); + } + } + //console.log('edgesDsl to padd getDslNodes>>>>>',edgesDsl); + this.getDslNodes(edgesDsl,type,groupStart,groupEnd,edgeStart,edgeEnd); +} + + getDslNodes=(dsl,type,groupStart,groupEnd,edgeStart,edgeEnd)=>{ + console.log('getDslNodes>>>>',dsl); + let dslArray=[]; + let localDslNodes=''; + let relations=false; + let edges=false; + let traversal=false; + dslArray = dsl.split('>'); + if(type === 'relationalNode'){ + traversal=(dsl.indexOf('#$') === -1 && dslArray.length>1 && dsl.indexOf('@$') === -1); + } + for(var i=0;i<dslArray.length;i++){ + if(dslArray[i] !== ''){ + if(dslArray[i] === '#$'){//RelationalNode + //relations to be enables + localDslNodes=this.relationsArray[0]; + console.log(dslArray[i]+'<<<dslArray[i] localDslNodes>>>>>>>****>>>>',localDslNodes); + localDslNodes=this.stripLastCharacter(this.stripFirstCharacter(localDslNodes)); + type='relationalNode'; + this.relationsArray=this.relationsArray.slice(1,this.relationsArray.length); + this.getDslRelationalNodes(localDslNodes,type); + }else if(dslArray[i].trim() === '@$' || dslArray[i].trim() === '!@$'){//EdgeNode + //edges should be enable + localDslNodes=this.edgesArray[0]; + type='edgeNode' + localDslNodes=this.stripLastCharacter(localDslNodes); + if(localDslNodes.startsWith('!')){ + localDslNodes=localDslNodes.substr(3); + type='negEdgeNode'; + }else{ + localDslNodes=localDslNodes.substr(2); + type='edgeNode'; + } + this.edgesArray=this.edgesArray.slice(1,this.edgesArray.length); + this.getDslEdgeNodes(localDslNodes,type); + } + //node,traversal,relationalEdges + let x=i+1; + if(dslArray[x] && dslArray[x] === '#$'){ + relations=true; + } + if(dslArray[x] && dslArray[x] === '@$'){ + edges=true; + } + let tStart=(parseInt(i) === 0 && traversal)?true:false; + let tEnd=(parseInt(i) === dslArray.length-1 && traversal)?true:false; + if(i === dslArray.length-1){ + if(type==='edgeNode' || type === 'negEdgeNode'){ + edgeEnd=true; + edgeStart=(dslArray.length===1)?true:false; + groupStart=false; + groupEnd=false; + }else if(type==='relationalNode'){ + edgeEnd=false; + edgeStart=false; + }else{ + groupStart=false; + groupEnd=false; + edgeEnd=false; + edgeStart=false; + } + } + if(!(dslArray[i] === '#$' || dslArray[i].trim() === '@$' || dslArray[i].trim() === '!@$')){ + dslArray[i]=dslArray[i].replace(/\,$/g,'').replace(/\]$/g,'').replace(/\>$/g,'').trim(); + this.formDslObject(dslArray[i],type,groupStart,groupEnd,relations,traversal,tStart,tEnd,edges,edgeStart,edgeEnd); + } + } + } + console.log('<<formDslObject>>>>>',JSON.stringify(this.dslObject)); +} +getDslEdgeNodes=(edgesDsl,type)=>{ + //space for future changes + this.contructDslNodes(edgesDsl,type,false,false,true,false); +} +getDslRelationalNodes=(relationDsl,type)=>{ + console.log('getDslRelationalNodes>>>>>>>>>>>>',relationDsl) + //var dslRelationNodes=relationDsl.substring(relationDsl.indexOf('['),relationDsl.lastIndexOf(']')+1); + let dslRelationNodes=this.capturingGroups(relationDsl); + let dslRelations= relationDsl; + if(dslRelationNodes){ + for(var z in dslRelationNodes){ + dslRelations=dslRelations.replace(dslRelationNodes[z],'#$'); + } + this.relationsArray=dslRelationNodes.concat(this.relationsArray); + } + let relationsList=dslRelations.replace(/\((?:[^)(]+|\((?:[^)(]+)\))*\)/g,'').replace(/\{(.*?)\}/g,'').trim('').replace(/\>\#\$/g,'').replace(/\>\@\$/g,'').replace(/\>\!\@\$/g,'').replace(/\!/g,'').split(','); + dslRelations=','+dslRelations+'&&'; + let groupStart=false; + let groupEnd=false; + //relationsList: have all Relations like node [node1>#$,node2,node3>node4]: possible to contain EdgeNodes,Traversal condition and inner relationNodes + for(var k in relationsList){ + console.log(k+'relationsList>>>>**',relationsList); + if(parseInt(k)===0){ + groupStart=true; + groupEnd=false; + }else if(parseInt(k) === relationsList.length-1){ + groupStart=false; + groupEnd=true; + }else{ + groupStart=false; + groupEnd=false; + } + if(relationsList.length === 1){ + groupStart=true; + groupEnd=true; + } + var relationPattern=''; + + console.log('dslRelations>>>>>>>>>>>>',dslRelations); + let pattern=relationsList[k]+"(.*?)>\\#\\$(?=\\,|\\&&)|"+relationsList[k]+"(.*?)>\\@\\$(?=\\,|\\&&)|"+relationsList[k]+"(.*?)>\\!\\@\\$(?=\\,|\\&&)"; + console.log('pattern>>>>>',pattern); + let relationP1 = new RegExp(pattern, 'g'); + let findDslRelation=dslRelations.match(relationP1); + console.log('findDslRelation>>>>>>',findDslRelation); + if(findDslRelation){//dslRelations.indexOf(relationsList[k]+'>#') !==-1 || dslRelations.indexOf(relationsList[k]+'>@$') !==-1){ + relationPattern="(?:[^-]"+relationsList[k].split('>')[0]+"(.*?)(?=\,[a-z]|&&))|"+"(?:[^-]"+relationsList[k].split('>')[0]+"(?=\,[a-z]|&&))"; + }else if(dslRelations.indexOf(relationsList[k]+',#') !== -1){ + relationPattern="(?:[^-]"+relationsList[k]+"(.*?)(?=\,#))|"+"(?:[^-]"+relationsList[k]+"(?=\,#))"; + }else if(relationsList[k] !== '#$'){ + relationPattern="(?:[^-|^>]"+relationsList[k]+"(.*?)(?=\,[a-z]|>|&&))|"+"(?:[^-|^>]"+relationsList[k]+"(?=\,[a-z]|>|&&))"; + } + if(relationsList[k] !== '#$'){ + console.log(k+'for relationPattern>>>',relationPattern); + console.log(k+'for dslRelations>>>>',dslRelations); + let relationPatternExp = new RegExp(relationPattern, 'g'); + let dslRelationArray=dslRelations.match(relationPatternExp); + console.log(k+'for dslRelationArray>>>>',dslRelationArray); + if(dslRelationArray){ + for(var j in dslRelationArray){ + console.log('dslRelationArray[j]>>>',dslRelationArray[j]); + let dslRelationNode=null; + dslRelationArray[j]= dslRelationArray[j].substr(1); + dslRelations=dslRelations.replace(dslRelationArray[j],'@'); + console.log('groupStart>>>>>>>>>>',groupStart); + this.contructDslNodes(dslRelationArray[j],type,groupStart,groupEnd); + } + }else{ + var relationPatternArray=relationsList[k].split('>'); + relationPattern=''; + for(var x=0;x<relationPatternArray.length;x++){ + if(x === 0){ + relationPattern=relationPatternArray[x]+'(.*?)'; + }else{ + relationPattern=relationPattern+'>'+relationPatternArray[x]+'(.*?)'; + if(x===relationPatternArray.length-1){ + relationPattern=relationPattern+'(?=\,[a-z]|&&)'; + } + } + } + console.log('relationPattern>>>>>>',relationPattern); + relationPatternExp = new RegExp(relationPattern, 'g'); + dslRelationArray=dslRelations.match(relationPatternExp); + if(dslRelationArray){ + dslRelations=dslRelations.replace(dslRelationArray[0],'@'); + console.log('dslRelationArray!!!!!!!!!!!!!>>>>>',dslRelationArray); + this.contructDslNodes(dslRelationArray[0],type,groupStart,groupEnd); + } + } + }else{ + let localDslNodes=this.relationsArray[0]; + relationsList[k]=this.stripLastCharacter(this.stripFirstCharacter(localDslNodes)); + this.relationsArray=this.relationsArray.slice(1,this.relationsArray.length); + console.log('relationsList[k]>***>>>',relationsList[k]); + //dslRelations=dslRelations.replace(dslRelationArray[j],'@'); + this.contructDslNodes(relationsList[k],type,groupStart,groupEnd); + + } + } +} +formDslObject=(dslArray,type,groupStart,groupEnd,relationState,traversal,tStart,tEnd,edges,eStart,eEnd,id)=>{ + let nodeType=dslArray.replace(/\((?:[^)(]+|\((?:[^)(]+)\))*\)/g,'').replace(/\{(.*?)\}/g,'').replace(/\!/g,'').trim(''); + let props=dslArray.match(/\{(.*?)\}/g); + let propValues=dslArray.match(/\((?:[^)(]+|\((?:[^)(]+)\))*\)|\!\((?:[^)(]+|\((?:[^)(]+)\))*\)/g); + var entries=[] + var entry = {}; + entry.type = type; + entry.relationsStart = groupStart; + entry.relationsEnd= groupEnd; + entry.relations=relationState; + entry.nodeName = nodeType; + entry.props=props; + entry.traversal=traversal; + entry.traversalStart=tStart; + entry.traversalEnd=tEnd; + entry.edgeEnable=(edges)?edges:false; + entry.edgeStart=(eStart)?eStart:false; + entry.edgeEnd=(eEnd)?eEnd:false; + entry.values=propValues; + entries.push(entry); + let entityId=nodeType.replace(/\*/g,''); + if(!this.nodeTypeArray.includes(entityId)){ + this.nodeTypeArray.push(entityId); + this.dslObject[entityId] = entries; + }else{ + let newNodeType=''; + let repeatMode=true; + for(var n=1;n<=this.nodeTypeArray.length;n++){ + if(!this.nodeTypeArray.includes(entityId+'-'+n) && repeatMode){ + newNodeType=entityId+'-'+n; + repeatMode=false; + } + } + this.nodeTypeArray.push(newNodeType); + this.dslObject[newNodeType] = entries; + } + console.log('nodeTypeArray>>>>',this.nodeTypeArray); + console.log('this.dslObject>>>>',this.dslObject); +} +formFilterValues=(propValues)=>{ + let templateQuery=''; + let negQuery=''; + for(var k = 0; k < propValues.length; k++){ + if(propValues[k].indexOf('!') !== -1){ + negQuery += propValues[k]; + }else{ + templateQuery += propValues[k]; + } + } + if(negQuery!==''){ + templateQuery+=negQuery; + } + console.log('templateQuery>>>>>>>>>>>>',templateQuery); + return templateQuery; +} +replaceFilterValues=(propValues,entries)=>{ + console.log(propValues+'<<<propValues>>>>>',entries); + let templateQuery=''; + let negQuery=''; + let count=1; + for(var k = 0; k < propValues.length; k++){ + let templatekey=(entries)?entries[k].templateKey+1:count; + if(propValues[k].indexOf('!') !== -1){ + negQuery += "!($" + templatekey + ")"; + }else{ + templateQuery += "($" + templatekey + ")"; + } + count++; + } + if(negQuery!==''){ + templateQuery+=negQuery; + } + console.log('templateQuery>>>>>>>>>>>>',templateQuery); + return templateQuery; +} +formTemplateFilterValues=(propvalues,nodeName,nodeId,idx)=>{ + let filterTemplateHeader = {}; + let filterEntries=[]; + var spaceRemoverPattern=/\,\s/g; + var errorOccurred = false; + var filterTypeDisplayArray = this.state.filterTypeDisplayList; + let filterTypeDisplay= {'default':'Filter Type'}; + if(!filterTypeDisplayArray[idx] || filterTypeDisplayArray[idx] === undefined){ + filterTypeDisplayArray.push(filterTypeDisplay); + } + var entries = []; + var filterTypeEntries =[]; + var selectedProp=[]; + if(propvalues){ + for(var i = 0; i < propvalues.length; i++){ + console.log('propvalues['+i+']>>>>',propvalues[i]); + var entry = {}; + let propVal = ''; + if(propvalues[i].indexOf('!') !==-1){ + propVal=this.stripLastCharacter(this.stripFirstTwoCharacter(propvalues[i].trim())); + }else{ + propVal=this.stripLastCharacter(this.stripFirstCharacter(propvalues[i].trim())); + } + propVal = propVal.replace(spaceRemoverPattern,','); + //console.log('propVal>>>>>>>>>>>',propVal); + var matchesList = propVal.split(/',|\),/g) + //console.log('matchesList>>>>',matchesList); + let type=''; + let value=''; + let errorFound=true; + let entryState=true; + for(var n=0;n<matchesList.length;n++){ + let scenario=true; + let found=true; + if(n==0){ + entry.name = this.stripFirstCharacter(matchesList[n].trim()); + selectedProp.push(this.stripFirstCharacter(matchesList[n].trim())); + }else{ + let obj={}; + var lastChar=matchesList[n].charAt(matchesList[n].length-1); + for(var x in filterTypeList){ + if(found){ + let pattern= new RegExp('^'+filterTypeList[x]+'\\((.*?)', 'g'); + var filterExist=matchesList[n].match(pattern); + //console.log(matchesList[n]+'filterExist>>>>>',filterExist); + if(filterExist){ + var nodevalue=''; + if(lastChar===')'){ + nodevalue=matchesList[n].replace(filterTypeList[x],'').replace(/\(\'/,'').replace(/\'\)/,''); + }else{ + nodevalue=this.stripLastCharacter(matchesList[n].replace(filterTypeList[x],'').replace(/\(\'/,'')); + } + //console.log('before srtip>>>',nodevalue); + type=(type==='')?filterTypeList[x]:type+'^'+filterTypeList[x]; + value=(value==='')?nodevalue:value+'^'+nodevalue; + scenario=false; + found=false; + errorFound=false; + entryState=false; + obj[entry.templateKey+1] = filterTypeList[x]; + filterTypeEntries.push(obj); + console.log('filterTypeDisplayArray....>*',filterTypeEntries); + } + } + console.log(found+'found>>>>>>>>>>>>',value); + } + if(scenario){ + console.log('inside else'); + type=(type==='')?'EQ':type+'^'+'EQ'; + let val=this.stripFirstCharacter(matchesList[n].trim()); + if(lastChar == '\''){ + val=this.stripLastCharacter(val); + } + value=(value==='')?val:value+'^'+val; + entryState=false; + found=false; + errorFound=false; + } + } + } + if(!entryState){ + entry.type =type; + entry.value = value; + entry.templateKey = i; + entries.push(entry); + } + if(errorFound && !errorOccurred){ + errorOccurred=true; + } + } + } + console.log('Initial Filtered Template Entries ' + JSON.stringify(entries)); + //nodeTypeOfDsl.push(nodeTypes[z]); + let obj = {}; + obj[nodeId] = entries; + filterTemplateHeader[nodeId]= {}; + filterTemplateHeader[nodeId]['enableAnd'] = true; + filterTemplateHeader[nodeId]['propName'] = this.state.filterDisplay; + filterTemplateHeader[nodeId]['selectedProp']=selectedProp; + filterEntries.push(obj) + filterTypeDisplayArray[idx][nodeId] = filterTypeEntries; + let dslObject=this.dslObjectList[idx]; + if(dslObject){ + dslObject[nodeId]['filterTemplateHeader']= filterTemplateHeader; + dslObject[nodeId]['filterEntries']=filterEntries; + dslObject[nodeId]['errorOccurred']=errorOccurred; + this.dslObjectList[idx]=dslObject; + }else{ + this.dslObject[nodeId]['filterTemplateHeader']= filterTemplateHeader; + this.dslObject[nodeId]['filterEntries']=filterEntries + this.dslObject[nodeId]['errorOccurred']=errorOccurred; + } + } + + onAssociatedNodesCheckbox(e) { + var cbValue = false; + if (e.target.checked) { + cbValue = true; + }else { + cbValue = false; + } + this.setState({ associatedNodesEnabled: cbValue }); + } + onAggregateCheckbox(e) { + var cbValue = false; + if (e.target.checked) { + cbValue = true; + this.setState({associatedNodesEnabled: false}); + }else { + cbValue = false; + } + this.setState({ isAggregateChecked: cbValue }); + } + onPublicCheckbox(e) { + var cbValue = false; + if (e.target.checked) { + cbValue = true; + this.setState({ isPublicChecked: cbValue, isCommunitySharedChecked: false }); + }else { + cbValue = false; + this.setState({ isPublicChecked: cbValue }); + } + } + onMergedTabsCheckbox(e){ + var cbValue = false; + if (e.target.checked) { + cbValue = true; + this.setState({ isMergedTabsChecked: cbValue}); + }else { + cbValue = false; + this.setState({ isMergedTabsChecked: cbValue }); + } + } + onGenerateEmailButton(){ + let path='email-bulk-dsl-to-excel'; + this.generatebulkDslToExcel(path,true); + } + onCommunitySharedCheckbox(e) { + var cbValue = false; + if (e.target.checked) { + cbValue = true; + }else { + cbValue = false; + } + this.setState({ isCommunitySharedChecked: cbValue }); + } + onDslConfigCheckbox(e, key) { + var cbValue = false; + var staticTemplateFilters = this.state.staticTemplateFilters; + if (e.target.checked) { + cbValue = true; + staticTemplateFilters = staticTemplateFilters.filter(e => e !== key); + }else { + cbValue = false; + staticTemplateFilters.push(key); + } + this.setState({ staticTemplateFilters: staticTemplateFilters }); + } + handleOnFilter = (columnFilter,value) =>{ + console.log('handleOnFilter to Re-render', this.state.columnFilter); + var applyState = true; + if(value === ''){ + for(var i= 0; i < columnFilter.length; i++){ + var x = columnFilter[i]; + console.log('handleOnfilter ColumnFilterList.....',Object.keys(x)); + Object.keys(x).forEach(function(key){ + if(x[key] !==''){ + applyState=false; + } + }); + } + }else{ + applyState = false; + } + + this.setState({columnFilter : columnFilter,reRender:true,disableFilter: applyState}); + } + + alterDslQueryByRemoveSpaces = (dslQuery) =>{ + var p2=''; + if((dslQuery.indexOf('(>') !==-1) || (dslQuery.indexOf('!(>') !==-1)){ + p2=/\((?:[^>)(]|\((?:[^)(]+)\))*\)/g; + } + else{ + p2 = /\((?:[^)(]+|\((?:[^)(]+)\))*\)/g; + } + var prop = dslQuery.match(p2); + var spacepattern = /\s(?!(^)]*\()/g; + var newDslQuery=''; + if(prop && prop.length > 0){ + var x = dslQuery.replace(p2,'{*$}'); + var matchStr = x.replace(spacepattern,''); + var propArray=matchStr.split('{*$}'); + for(var i in prop){ + newDslQuery=newDslQuery+propArray[i]+prop[i]; + } + newDslQuery = newDslQuery + propArray[propArray.length-1]; + }else{ + newDslQuery = dslQuery.replace(spacepattern,''); + } + newDslQuery = newDslQuery.trim(); + console.log('New DSl Query after alterDslQueryByRemoveSpaces>>>>>>',newDslQuery); + return newDslQuery; + } + + isTableFilterForAggregation = (columnFilterList,columnsList) => { + console.log('isTableFilterForAggregation:aggregateTableFilterColumns>>>>>>',this.state.aggregateTableFilterColumns); + //console.log('isTableFilterForAggregation:columnFilterList>>>>>>>>',columnFilterList); + var nodeTypeArray = []; + var columnsList = {}; + var filterMessage = {}; + var j = 0; + for(var i= 0; i < columnFilterList.length; i++){ + var x = columnFilterList[i]; + console.log('isTableFilterForAggregation:Aggregate columnFilterList.....',Object.keys(x)); + var propValue = ''; + Object.keys(x).forEach((key)=>{ + var grabNode = key.split("|"); + let indx=false; + let index=''; + if(nodeTypeArray.indexOf(grabNode[0]) === -1){ + nodeTypeArray.push(grabNode[0]); + j = j + 1; + indx=true; + index=j-1; + }else{ + index=nodeTypeArray.indexOf(grabNode[0]); + } + + if(!columnsList[nodeTypeArray[index]]){ + columnsList[nodeTypeArray[index]] = []; + } + if(!filterMessage[nodeTypeArray[index]]){ + filterMessage[nodeTypeArray[index]]=[]; + } + let col=''; + if(this.tableFilterAliasColumns[grabNode[0]][0] && this.tableFilterAliasColumns[grabNode[0]][0][grabNode[1]]){ + col=this.tableFilterAliasColumns[grabNode[0]][0][grabNode[1]]; + }else{ + col=grabNode[1]; + } + if(columnsList[nodeTypeArray[index]].indexOf(col) === -1){ + columnsList[nodeTypeArray[index]].push(col); + if(x[key] != ''){ + let filterMsg = ''; + if(this.state.enableRealTime){ + filterMsg='(\''+col +'\'' + ',' + TABULAR_FILTER_TYPE+'(\'' + x[key]+ '\'))'; + }else{ + filterMsg='(\''+col +'\'' + ',' + '\'' + x[key] + '\')'; + } + filterMessage[nodeTypeArray[j-1]].push(filterMsg); + } + } + propValue=x[key]; + }); + } + console.log('isTableFilterForAggregation:nodeTypeArray><><><>',nodeTypeArray); + console.log('isTableFilterForAggregation:columnsList<><><>',columnsList); + console.log('isTableFilterForAggregation:filterMessage>>>>>>>>',filterMessage); + let dslQuery = this.state.value; + var limitPattern = /limit[\s]\d+|limit\d+/ig + var limitkey = dslQuery.match(limitPattern); + if(limitkey){ + dslQuery = dslQuery.replace(limitkey[limitkey.length-1],'').trim(); + } + dslQuery = this.alterDslQueryByRemoveSpaces(dslQuery); + //New adding + this.dslObject={}; + this.nodeTypeArray=[]; + //create placeholders for NodeTypes with Propand Propvalues + this.tempDslQuery=this.formTempDslQuery(dslQuery); + //Preparing Json Object to render into Placeholder + this.contructDslNodes(dslQuery,'node',false,false,false,false); + console.log('dslQuerydsl>>>>>>>>>>>>>',dslQuery); + //adding + Object.keys(this.dslObject).map((nodekey)=>{ + let nodeNo=parseInt(nodekey.substr(nodekey.length-2,nodekey.length-1).replace(/\-/g,'')); + console.log('nodeNo>>>>>>>>>>>>>>',nodeNo); + let keyact=isNaN(nodeNo); + let nodeType=nodekey; + let actKey=nodekey.split('-'); + console.log(nodeType+'>>>>nodeType<<<<nodeType>>>>',actKey); + if(!keyact){ + actKey.splice(actKey.length-1,1); + nodeType=actKey.join('-')+nodeNo; + } + if(!nodeTypeArray.includes(nodeType) && nodeTypeArray.includes(actKey.join('-'))){ + nodeType=actKey.join('-'); + } + console.log('nodeType>>>>>>>>>>',nodeType); + var columns = columnsList[nodeType]; + var filterMsg= filterMessage[nodeType]; + console.log('CustomDsl js filterMsg:',filterMsg); + if(nodeType && this.dslObject[nodekey][0]){ + if(filterMsg && filterMsg.length>0){ + for(var i=0;i<filterMsg.length;i++){ + let values=this.dslObject[nodekey][0]['values']; + let nonExist=true + let columnCompare=filterMsg[i].split(',')[0]; + if(values && values.length>0){ + for(var n=0;n<values.length;n++){ + console.log('values[n].indexOf(columnCompare)>>>>',values[n].indexOf(columnCompare)); + if(values[n].indexOf(columnCompare) !==-1 && values[n].indexOf('!'+columnCompare) ===-1){ + values[n]=filterMsg[i]; + nonExist=false; + } + } + if(nonExist){ + this.dslObject[nodekey][0]['values'].push(filterMsg[i]); + }else{ + this.dslObject[nodekey][0]['values']=values; + } + }else{ + this.dslObject[nodekey][0]['values']=[]; + this.dslObject[nodekey][0]['values'].push(filterMsg[i]); + } + } + } + } + }); + this.dslObjectList =[]; + this.dslObjectList.push(this.dslObject); + //Query to replace placeholders with JSON Object values depends on Flow either SavedQuery or TableFilters + let newDslQuery=this.formTemplateQuery('tableFilter'); + newDslQuery=newDslQuery.replace(/\'(as)\'/g,'\' as \'').replace(/\(\'\s(as)\s\'\)/g,'(\'as\')'); + if(limitkey){ + newDslQuery+=' '+limitkey[limitkey.length-1]; + } + console.log('query>>>>>>>>>>>>>>>>>>>>>****',newDslQuery); + this.setState({value : newDslQuery, viewName: "CellLayout", aggregateActivePage:1}, function () { this.formQueryString(false,false,false); }.bind(this)); + //End + } + + isTableFilterApply = (columnFilterList,nodeTypeList,columnsList,aliasColumnList) => { + console.log('CustomDSL js ....columnFilterList:',columnFilterList); + console.log('CustomDSL js .... nodeTypeList:',nodeTypeList); + var nodeTypeListArray = []; + if(!Array.isArray(nodeTypeList)){ + nodeTypeListArray.push(nodeTypeList); + nodeTypeList = nodeTypeListArray; + } + console.log('CustomDSL js .... nodeTypeList After set:',nodeTypeList); + var dslQuery = this.state.value; + var limitPattern = /limit[\s]\d+|limit\d+/ig + var limitkey = dslQuery.match(limitPattern); + if(limitkey){ + dslQuery = dslQuery.replace(limitkey[limitkey.length-1],'').trim(); + } + dslQuery = this.alterDslQueryByRemoveSpaces(dslQuery); + //New adding + this.dslObject={}; + this.nodeTypeArray=[]; + //create placeholders for NodeTypes with Propand Propvalues + this.tempDslQuery=this.formTempDslQuery(dslQuery); + //Preparinga Json Object to render into Placeholder + this.contructDslNodes(dslQuery,'node',false,false,false,false); + console.log('dslQuerydsl>>>>>>>>>>>>>',dslQuery); + //adding + Object.keys(this.dslObject).map((nodekey)=>{ + var nodeType=this.dslObject[nodekey][0]['nodeName'].replace(/\*/g,''); + console.log('nodeType>>>>>>>>>>',nodeType); + var columnFilter = (columnFilterList[nodeType])?columnFilterList[nodeType][0]:[]; + var aliasColumnFilters = (aliasColumnList[nodeType])?aliasColumnList[nodeType][0]:[]; + console.log('CustomDsl js columnFilter:',columnFilter); + var columns = columnsList[nodeType]; + console.log('CustomDsl js Columns:',columns); + if(columns && columnFilter.length>0){ + for(var i=0;i<columns.length;i++){ + console.log(columnFilter[i]+'<<<<<<columnFilter[i]columns[i].value>>>>',columns[i]); + var colAliasFilter=''; + for(var z=0;z<aliasColumnFilters.length;z++){ + if(aliasColumnFilters[z][columns[i].value]){ + colAliasFilter=aliasColumnFilters[z][columns[i].value]; + } + } + var colFilterValue = columnFilter[i][columns[i].value]; + if(colFilterValue != ""){ + let filterMsg = ''; + let col=(colAliasFilter)?colAliasFilter:columns[i].value; + if(this.state.enableRealTime){ + filterMsg='(\''+col +'\'' + ',' + TABULAR_FILTER_TYPE+'(\'' + colFilterValue + '\'))'; + }else{ + filterMsg='(\''+col +'\'' + ',' +'\'' + colFilterValue + '\')'; + } + let values=this.dslObject[nodekey][0]['values']; + let nonExist=true; + if(values && values.length>0){ + for(var n=0;n<values.length;n++){ + if(values[n].indexOf('(\''+col+'\'') !==-1 && values[n].indexOf('!(\''+col+'\'') ===-1){ + values[n]=filterMsg; + nonExist=false; + } + } + if(nonExist){ + this.dslObject[nodekey][0]['values'].push(filterMsg); + }else{ + this.dslObject[nodekey][0]['values']=values; + } + }else{ + this.dslObject[nodekey][0]['values']=[]; + this.dslObject[nodekey][0]['values'].push(filterMsg); + } + } + } + } + }); + //Query to replace placeholders with JSON Object values depends on Flow either SavedQuery or TableFilters + this.dslObjectList =[]; + this.dslObjectList.push(this.dslObject); + let newDslQuery=this.formTemplateQuery('tableFilter'); + newDslQuery=newDslQuery.replace(/\'(as)\'/g,'\' as \'').replace(/\(\'\s(as)\s\'\)/g,'(\'as\')'); + if(limitkey){ + newDslQuery+=' '+limitkey[limitkey.length-1]; + } + console.log('query>>>>>>>>>>>>>>>>>>>>>****',newDslQuery); + this.setState({value : newDslQuery, viewName: "CellLayout", activePage:1}, function () { this.formQueryString(false,false,false); }.bind(this)); + //End + } + + onTargetMenuOfFilterTypes = (listName,id) => { + console.log('onTargetMenuOfFilterTypes>>>>',listName); + let idArray=id.split('#'); + let key=idArray[0]; + let templateKey=parseInt(idArray[1]); + let filterTypeIndex = parseInt(idArray[2]); + let idx= parseInt(idArray[3]); + var filterTypeDisplayList = this.state.filterTypeDisplayList; + var filterTypeDisplayArray = filterTypeDisplayList[idx]; + Object.keys(filterTypeDisplayArray).map((entry) => { + if(entry === key){ + console.log('filterTypeDisplayArray.entry....',filterTypeDisplayArray[entry]); + if(filterTypeDisplayArray[entry][templateKey]){ + filterTypeDisplayArray[key][templateKey] = listName; + }else{ + let obj={}; + obj[templateKey+1]=listName; + filterTypeDisplayArray[key].push(obj); + } + } + }); + let filterTemplateEntriesList = this.state.filterTemplateEntriesList; + var filterTemplateEntriesArray = filterTemplateEntriesList[idx]; + Object.keys(filterTemplateEntriesArray).map((entry)=>{ + if(filterTemplateEntriesArray[entry][key]){ + Object.keys(filterTemplateEntriesArray[entry][key]).map((ind) =>{ + if(filterTemplateEntriesArray[entry][key][ind].templateKey === templateKey){ + let type=filterTemplateEntriesArray[entry][key][ind].type.split('^'); + if(type[filterTypeIndex]){ + type[filterTypeIndex]=listName + }else{ + type.push(listName); + } + filterTemplateEntriesArray[entry][key][ind].type=type.join('^'); + } + }) + } + }); + console.log('onTargetMenuOfFilterTypes filterTemplateEntriesArray>>>',filterTemplateEntriesArray); + filterTemplateEntriesList[idx]=filterTemplateEntriesArray; + filterTypeDisplayList[idx]=filterTypeDisplayArray; + this.setState({filterTypeDisplayList:filterTypeDisplayList,filterTemplateEntriesList:filterTemplateEntriesList}); + } + filterTags = (type,templateKey,key,idx) =>{ + console.log(key+'<<<filterTags>>>>>*',type); + let filterType = (type === '')? this.state.filterTypeDisplayList[idx]['default']:type; + let filterTag = ''; + if(APERTURE_SERVICE && this.state.enableRealTime){ + console.log(filterType+'before passing Filter>*',this.state); + let filterTypesArray=filterType.split('^'); + let filters = Object.keys(filterTypesArray).map((index)=>{ + return <div style={{margin:'0px 0px 0px 5px'}}> + <label> + <FilterTypes param={this.state} + selectedFilter={filterTypesArray[index]} + id={key+'#'+templateKey+'#'+index+'#'+idx} + onMenuSelect={this.onTargetMenuOfFilterTypes} /> + </label> + </div> + }); + filterTag=<td width='20%'>{filters}</td>; + } + return filterTag; + } + populateFilteredColumnOptions = (nodekey,indx) =>{ + let keyact=isNaN(parseInt(nodekey.substr(nodekey.length-2,nodekey.length-1))); + let actColumns =''; + if(keyact){ + actColumns =this.populateColumnOptions(nodekey);//this.populateColumnOptions(key); + }else{ + let actKey=nodekey.split('-'); + actKey.splice(actKey.length-1,1); + actColumns =this.populateColumnOptions(actKey.join('-')); + } + let filterTemplateEntries=this.state.filterTemplateEntriesList[indx]; + let filterTemplateHeader=this.state.filterTemplateHeaderList[indx]; + let selectedColumns=[]; + Object.keys(filterTemplateEntries).map((index) => { + let filterTemplateEntry = filterTemplateEntries[index]; + Object.keys(filterTemplateEntry).map((key) =>{ + let filterTemplateEntryKey=filterTemplateEntry[key]; + if(nodekey === key){ + Object.keys(filterTemplateEntryKey).sort().map((entryKey, entry) => { + if(filterTemplateEntryKey[entryKey].name !==''){ + let index=actColumns.indexOf(filterTemplateEntryKey[entryKey].name); + actColumns.splice(index,1); + selectedColumns.push(filterTemplateEntryKey[entryKey].name); + } + }); + filterTemplateHeader[key]['selectedProp']=selectedColumns; + } + }); + }); + return actColumns; + }; + /**AND OR functionality */ + addAndTemplate = (key,idx) =>{ + console.log('addAndTemplate:key',key); + let templateEntriesList = this.state.filterTemplateEntriesList; + let filterTemplateHeaderList= this.state.filterTemplateHeaderList; + let templateEntries = this.state.filterTemplateEntriesList[idx]; + let filterTemplateHeader= this.state.filterTemplateHeaderList[idx]; + Object.keys(templateEntries).map((index) =>{ + Object.keys(templateEntries[index]).map((entryKey)=>{ + if(entryKey === key){ + let length=templateEntries[index][entryKey].length; + let tempKey = (length===0)?length:templateEntries[index][entryKey][length-1].templateKey+1; + let obj ={} + obj['name']=''; + obj['value']=''; + obj['type']=(this.state.enableRealTime)?'EQ':''; + obj['templateKey']=tempKey; + obj['addition']=true; + templateEntries[index][entryKey].push(obj); + //templateEntries[index][entryKey]['enableAnd']=false; + filterTemplateHeader[key]['enableAnd'] = false; + filterTemplateHeader[key]['propName'] = this.state.filterDisplay; + } + }); + }); + templateEntriesList[idx]=templateEntries; + filterTemplateHeaderList[idx]=filterTemplateHeader; + this.setState({filterTemplateHeaderList:filterTemplateHeaderList,filterTemplateEntriesList:templateEntriesList}); + } + addOrTemplate = (key,name,templateKey,idx) =>{ + console.log('addOrTemplate: key',key); + let templateEntriesList = this.state.filterTemplateEntriesList; + let templateEntries = templateEntriesList[idx]; + Object.keys(templateEntries).map((index) =>{ + Object.keys(templateEntries[index]).map((entryKey)=>{ + let templateEntry=templateEntries[index][entryKey]; + if(entryKey === key){ + Object.keys(templateEntry).map((entry)=>{ + if(templateEntry[entry].templateKey === templateKey){ + let value = templateEntry[entry].value; + let type = templateEntry[entry].type; + templateEntry[entry].value=value+'^'; + let fType=(this.state.enableRealTime)?'EQ':''; + templateEntry[entry].type=type+'^'+fType; + templateEntry[entry].name = name; + } + }) + } + }); + }); + console.log('addOrTemplate templateEntries>>>>',templateEntries); + templateEntriesList[idx]=templateEntries; + this.setState({filterTemplateEntriesList:templateEntriesList}); + } + deleteOrTemplate = (key,templatekey,id,idx) =>{ + console.log('deleteOrTemplate'); + let templateEntriesList = this.state.filterTemplateEntriesList; + let templateEntries = templateEntriesList[idx]; + let delIndx=parseInt(id.split('-')[1]); + Object.keys(templateEntries).map((index) =>{ + if(templateEntries[index][key]){ + Object.keys(templateEntries[index][key]).map((i)=>{ + if(templateEntries[index][key][i].templateKey===templatekey){ + let valueArray = templateEntries[index][key][i].value.split('^'); + let typeArray = templateEntries[index][key][i].type.split('^'); + valueArray.splice(delIndx,1); + typeArray.splice(delIndx,1) + console.log('valueArray>>>>>>',valueArray); + templateEntries[index][key][i].value=valueArray.join('^'); + templateEntries[index][key][i].type=typeArray.join('^'); + } + }) + } + }); + console.log('deleteOrTemplate templateEntries>>>>',templateEntries); + templateEntriesList[idx]=templateEntries; + this.setState({filterTemplateEntriesList:templateEntriesList}); + } + updatePropertyFilter = (listName,idkey) =>{ + console.log('updatePropertyFilter:',listName) + let keys=idkey.split('#'); + let key=keys[0]; + let idx=parseInt(keys[2]); + let templateKey=parseInt(keys[1]); + let filterTemplateHeaderList = this.state.filterTemplateHeaderList; + let filterTemplateHeader= filterTemplateHeaderList[idx]; + var filterTemplateEntriesList = this.state.filterTemplateEntriesList; + var filterMap = filterTemplateEntriesList[idx]; + filterTemplateHeader[key]['propName']=listName; + //this.setState({filterTemplateHeader:filterTemplateHeader}); + let status=false; + Object.keys(filterMap).forEach((index) =>{ + if(filterMap[index][key]){ + Object.keys(filterMap[index][key]).forEach((i)=>{ + if(filterMap[index][key][i].templateKey === templateKey){ + if(filterMap[index][key][i].name === 'ERROR'){ + filterMap[index][key][i].name= listName; + let selectedProp=[]; + console.log('filterTemplateHeader[key][selectedProp]>>>>',filterTemplateHeader[key]['selectedProp']); + if(filterTemplateHeader[key]['selectedProp']){ + selectedProp=filterTemplateHeader[key]['selectedProp']; + let indSelect= selectedProp.indexOf(listName); + if(indSelect !== -1){ + selectedProp=selectedProp.splice(indSelect,1); + filterTemplateHeader[key]['selectedProp']=selectedProp; + } + } + filterTemplateHeader[key]['enableAnd'] = true; + console.log('ERRROOR CONDITION HANDLING!!!!'); + this.templateErrorList[idx].pop(); + this.updateSavedQueryTemplate('add',key,templateKey,filterMap,filterTemplateHeader,idx); + }else{ + console.log('Regular Scenario>>>>>'); + filterTemplateHeaderList[idx]=filterTemplateHeader; + this.setState({filterTemplateHeaderList:filterTemplateHeaderList}); + } + } + }) + } + }); + }; + /** */ + prepareDownloadRangeModel = () =>{ + let downloadExcelsFunc= this.getAllExcels; + if(this.state.isAggregate){ + downloadExcelsFunc=this.downloadAllAggregate; + } + let downloadRangeModel = (this.state.showDownloadResultsModal)? <DownloadRangeModel + showDownloadResultsModal={this.state.showDownloadResultsModal} + totalPages={this.state.totalPages} + totalResults={this.state.totalResults} + triggerDownload={downloadExcelsFunc} + errorDownloadResults={this.state.errorDownloadResults} + downloadErrorMsg={this.state.downloadErrorMsg} + triggerClose={this.closeDownloadResults} + enableModelBusyFeedback={this.state.enableModelBusyFeedback} + /> : ''; + return downloadRangeModel; + } + toggleRealTimeAnalysisCallback=(checked)=>{ + console.log('toggleRealTimeAnalysisCallback>>>>',checked); + sessionStorage.setItem(ENVIRONMENT + 'ENABLE_ANALYSIS', !checked); + TABULAR_FILTER_TYPE=(APERTURE_SERVICE && !checked)?'CONTAINS':'='; + this.baseState.enableRealTime=!checked; + this.baseState.header=''; + this.baseState.templateQuery=''; + this.baseState.filterTemplateEntries=[]; + this.baseState.filterTemplateHeader=[]; + this.baseState.filterTemplateError=false; + this.baseState.nodeTypeOfDslTemplate=[]; + this.baseState.filterTemplateEntriesList=[]; + this.baseState.filterTemplateHeaderList=[]; + this.baseState.filterTemplateErrorList=[]; + this.baseState.nodeTypeOfDslTemplateList=[]; + this.baseState.templateQueryList=[]; + this.baseState.valueList=[]; + this.dslObject={}; + this.nodeTypeArray=[]; + this.dslObjectList=[]; + this.nodeTypeArrayList=[]; + this.edgesArray=[]; + this.relationsArray=[]; + this.tempDslQuery=''; + this.tempDslQueryList=[]; + this.templateError=[]; + this.templateErrorList={}; + this.setState({...this.baseState},()=>{this.buildDynamicByoq();}); + } + templateheaderSaveQuery = (id)=>{ + console.log('templateheaderSaveQuery>>>>>>>>>>>>>',id); + let templateSavedQuery = ''; + let entityKeyAddition = 1; + let templateheaderSaveQuery = ''; + let filterTemplateHeaderList = this.state.filterTemplateHeaderList; + //templateheaderSaveQuery=Object.keys(this.state.filterTemplateEntriesList).map((id)=>{ + //let tempheaderSavedQuery='' + if(this.state.filterTemplateEntriesList[id].length > 0 && !this.state.filterTemplateErrorList[id]){ + let filterTemplateEntries=this.state.filterTemplateEntriesList[id]; + let staticTemplateFilters = this.state.staticTemplateFiltersList[id]; + templateheaderSaveQuery= <div> + {Object.keys(filterTemplateEntries).map((index) => { + let filterTemplateEntry = filterTemplateEntries[index]; + return Object.keys(filterTemplateEntry).map((key) =>{ + let filterTemplateEntryKey=filterTemplateEntry[key]; + let columns =this.populateFilteredColumnOptions(key,id);//this.populateColumnOptions(key); + return <table className='table table-hover table-striped savedQueryTemplate' style={{margin:'0px',padding:'2px'}} id={'table_'+key}> + <thead> + <tr> + <th colSpan='2'>{key.toUpperCase()}</th> + {this.state.enableRealTime && <th width='20%'></th>} + <th width={(this.state.enableRealTime)?'30%':'25%'}></th> + <th width={(this.state.enableRealTime)?'20%':'25%'}> + <button id={key+'_addAND'} className='btn btn-secondary' disabled ={!filterTemplateHeaderList[id][key]['enableAnd']} type='button' onClick={e => {this.addAndTemplate(key,id)}}>Add Filter</button> + </th> + </tr> + </thead> + <tbody> + {Object.keys(filterTemplateEntryKey).sort().map((entryKey, entry) => { + entityKeyAddition = parseInt(entryKey) + 2; + let valueArray = filterTemplateEntryKey[entryKey].value.split('^'); + console.log("Comparing Static Array: " + JSON.stringify(staticTemplateFilters) + " with " + key + "|" + filterTemplateHeaderList[id][key]['propName']); + if(staticTemplateFilters.indexOf(key + "|" + filterTemplateEntryKey[entryKey].name) === -1 ){ + return( + <tr> + <td width={(this.state.enableRealTime)?'10%':'25%'}> + <label>{'$' + (filterTemplateEntryKey[entryKey].templateKey + 1)}</label> + </td> + <td width={(this.state.enableRealTime)?'20%':'25%'}> + {filterTemplateEntryKey[entryKey].name !== '' && filterTemplateEntryKey[entryKey].name !== 'ERROR' && <label>{filterTemplateEntryKey[entryKey].name}</label>} + {filterTemplateEntryKey[entryKey].name === '' && <SelectFilter param={this.state} + filterList={columns} + id={key+'#'+filterTemplateEntryKey[entryKey].templateKey+'#'+id} + selectedFilter={filterTemplateHeaderList[id][key]['propName']} + onMenuSelect={this.updatePropertyFilter}/>} + {filterTemplateEntryKey[entryKey].name === 'ERROR' && <div className='inputBoxError'><SelectFilter param={this.state} + filterList={columns} + id={key+'#'+filterTemplateEntryKey[entryKey].templateKey+'#'+id} + selectedFilter={this.state.filterDisplay} + onMenuSelect={this.updatePropertyFilter}/></div>} + </td> + {this.filterTags(filterTemplateEntryKey[entryKey].type,filterTemplateEntryKey[entryKey].templateKey,key,id)} + <td width={(this.state.enableRealTime)?'30%':'25%'}> + {Object.keys(valueArray).map((indx) =>{ + return( + <div style={{margin:'5px'}}> + {valueArray[indx] === '' && <input id={key+'_'+indx} onBlur={e => this.updateTemplateFilterValues(key,filterTemplateEntryKey[entryKey].templateKey,e.target.value,e.target.id,id)}/>} + {valueArray[indx] !== '' && <input id={key+'_'+valueArray[indx]+'_'+indx} value={valueArray[indx]} onChange={e => this.updateTemplateFilterValues(key,filterTemplateEntryKey[entryKey].templateKey,e.target.value,e.target.id,id)}/>} + {indx == 0 && <button className={(filterTemplateEntryKey[entryKey].name !== '')?'btn btn-primary':'btn btn-secondary'} style={{padding:'2px',margin:'0px 0px 7px 5px'}} disabled={filterTemplateEntryKey[entryKey].name === ''} type='button' onClick={e => {this.addOrTemplate(key,filterTemplateEntryKey[entryKey].name,filterTemplateEntryKey[entryKey].templateKey,id)}}>+</button>} + {indx>0 && <button style={{padding:'2px',margin:'0px 0px 7px 5px'}} id={'delete-'+indx} className='btn btn-danger' type='button' onClick={e => {this.deleteOrTemplate(key,filterTemplateEntryKey[entryKey].templateKey,e.target.id,id)}}>x</button> } + </div> + ) + })} + </td> + <td width={(this.state.enableRealTime)?'20%':'25%'}> + {filterTemplateEntryKey[entryKey].addition &&<button id='deleteAnd' className='btn btn-secondary' type='button' onClick={e => {this.updateSavedQueryTemplate('delete',key,filterTemplateEntryKey[entryKey].templateKey,'','',id)}}>Delete</button>} + </td> + </tr>); + }else { + return; + } + })} + </tbody> + </table> + }) + })} + </div> + } + return templateheaderSaveQuery; + }; + downloadBulkDslToExcel = () =>{ + console.log('downloadBulkDslToExcel>>>>>>>>>>>'); + let path='bulk-dsl-to-excel'; + this.generatebulkDslToExcel(path,false) + } + generatebulkDslToExcel = (path,state) =>{ + this.setState({isLoading: true}); + Object.keys(settings).forEach((key)=>{ + if(key==='ISAPERTURE' || key==='ISTABULAR'){ + delete settings[key]; + } + }) + let mergedTabs=this.state.isMergedTabsChecked; + var payload = {'headers':{ + 'X-DslApiVersion':'V2', + 'use-aperture': this.state.enableRealTime, + 'schema-version': INVLIST.VERSION, + 'merge-tabs':mergedTabs, + 'accept': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' + },'dsls': []}; + + Object.keys(this.state.queryNameList).map((index)=>{ + if(!this.state.filterTemplateErrorList[index]){ + let query=this.formFinalTemplateQuery(index); + let obj={ + "query-id": parseInt(index)+1, + "query-name": this.state.queryNameList[index], + "query-description": this.state.queryDescriptionList[index], + "is-aggregate": this.state.isAggregateCheckedList[index], + "dsl": query + }; + payload['dsls'].push(obj); + } + }); + var email=''; + if(state){ + let userid = sessionStorage.getItem(ENVIRONMENT + 'userId'); + if(userid ==='testuid'){// For testing Purpose + email='AAI-UI-DEV@list.att.com'; + }else{ + email=userid+EMAIL_EXT; + } + payload['headers']['email'] = email; + } + console.dir('CustomDSL:payload:' + JSON.stringify(payload)); + commonApi(settings, path, 'POST', payload, '',GlobalExtConstants.OVERRIDE_DOMAIN, null, [{ + "name":"X-DslApiVersion", + "value": "V2"}, + { + "name":"use-aperture", + "value": this.state.enableRealTime + }, + { + "name":"schema-version", + "value":INVLIST.VERSION}, + { + "name":"accept", + "value":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" + },{ + "name":"encode-response", + "value":true} + ]) + .then(res => { + let success =true; + let failures=[]; + if(!state){ + if(res['headers']['failures']){ + failures=res['headers']['failures'].split(','); + for (var i = 0; i < failures.length; i++) { + var a = failures[i].split('|'); + a.splice(1, 1); + failures[i] = a.join(); + } + success=false; + }else{ + let filename=''; + if(res['headers']['content-disposition']){ + filename=res['headers']['content-disposition'].split('=')[1]; + }else if(res['headers']['Content-Disposition']){ + filename=res['headers']['content-disposition'].split('=')[1]; + } + const blob = new Blob([this.s2ab(atob(res.data))], + { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,'}); + const url = window.URL.createObjectURL(blob); + const anchor = document.createElement('a'); + document.body.appendChild(anchor); + anchor.href = url; + anchor.download = filename; + anchor.click(); + window.URL.revokeObjectURL(url); + } + this.setState({ + isLoading: false, + downloadTemplateStatus:success, + failedDownloadedTemplate:failures, + failedDownloadedTemplateMsg:'', + failedEmailTemplateMsg:'', + emailTriggerMsg:'' + },()=>{GeneralCommonFunctions.scrollTo("downloadTemplateStatusAlert");}); + }else{ + let emailTriggerMsg=''; + let failedEmailTriggerMsg=''; + success=false; + failures=[]; + if(res.status === 202){ + emailTriggerMsg='The job has been successfully triggered. The results will be emailed to '+ email +' when finished.' + }else{ + failedEmailTriggerMsg='Failed to Generate an Email for selected template queries'; + } + this.setState({ + isLoading: false, + downloadTemplateStatus:success, + failedDownloadedTemplate:failures, + failedDownloadedTemplateMsg:'', + failedEmailTemplateMsg:failedEmailTriggerMsg, + emailTriggerMsg:emailTriggerMsg + },()=>{GeneralCommonFunctions.scrollTo("downloadTemplateStatusAlert");}); + } + }).catch(error => { + console.log('Bulk download xls Catch the Error>>>>>',error.response); + let ErrorMessage=(state)?'Failed to Generate an Email for selected template queries':'Failed to Download selected template queries'; + if (error.response && error.response.data) { + if(error.response.data.status){ + ErrorMessage += " Code: " + error.response.data.status; + } + if(error.response.data.msg){ + ErrorMessage += " - " + JSON.stringify(error.response.data.msg); + } + } + if(state){ + this.setState({ + isLoading: false, + downloadTemplateStatus:false, + failedDownloadedTemplate:[], + failedDownloadedTemplateMsg:'', + failedEmailTemplateMsg:ErrorMessage + },()=>{GeneralCommonFunctions.scrollTo("downloadTemplateStatusAlert");}); + }else{ + this.setState({ + isLoading: false, + downloadTemplateStatus:false, + failedDownloadedTemplate:[], + failedDownloadedTemplateMsg:ErrorMessage, + failedEmailTemplateMsg:'', + emailTriggerMsg:'' + },()=>{GeneralCommonFunctions.scrollTo("downloadTemplateStatusAlert");}); + } + + }); + } + s2ab=(s)=> { + var buf = new ArrayBuffer(s.length); + var view = new Uint8Array(buf); + for (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF; + return buf; + } + templateList = () =>{ + var filterTypeHeader=''; + if(APERTURE_SERVICE){ + filterTypeHeader = (this.state.enableRealTime)?<th scope='col' width='20%'>Filter Type</th>:''; + } + var listOfTemplate=[]; + Object.keys(this.state.filterTemplateEntriesList).map((idx)=>{ + let templateList =<div id={"template_"+idx} className="col-lg-10 templateview"> + {this.state.filterTemplateEntriesList[idx].length > 0 && !this.state.filterTemplateErrorList[idx] && + <div className='card d3-model-card model-card-content'> + <Alert id='saveSuccess' bsStyle='success' className={this.state.saveSuccessfulMsg && !this.state.isEditModal ? 'show' : 'hidden'} onDismiss={() => this.setState({saveSuccessfulMsg: false})}> + <h3>Query Saved Successfully</h3> + <p> + {this.state.saveSuccessfulMsg} + </p> + </Alert> + <div className='card-header'> + <div> + <h3><strong>{parseInt(idx)+1}.{this.state.queryNameList[idx]}</strong> - {this.state.queryDescriptionList[idx]}</h3> + </div> + </div> + <div> + <div className='card-header'> + <h5>{this.state.templateQueryList[idx]}</h5> + </div> + <table className="table table-hover table-striped" style={{margin:'0px',padding:'2px'}}> + <thead> + <tr> + <th scope="col" width={(this.state.enableRealTime)?'10%':'25%'}>Filter Key</th> + <th scope="col" width={(this.state.enableRealTime)?'20':'25%'}>Filter Name</th> + {filterTypeHeader} + <th scope="col" width={(this.state.enableRealTime)?'30%':'25%'}>Filter Value</th> + <th scope="col" width={(this.state.enableRealTime)?'20%':'25%'}> Action</th> + </tr> + </thead> + </table> + </div> + <div className='card-content model-card-content' style={{margin:'0px'}}> + {this.templateheaderSaveQuery(idx)} + </div> + <div className='card-footer'> + <button id='runSavedQuery' className='btn btn-primary btn-space' type='button' onClick={e => {this.runTemplate(idx)}}>Run Query</button> + <button id='manualEditQuery' className='btn btn-secondary btn-space' type='button' onClick={e =>{this.showEditDSLModal(idx)}} disabled={this.templateError.length>0}>Manual Edit & Run</button> + <button id='saveQuery' className='btn btn-outline-secondary btn-space' type='button' onClick={e =>{this.saveTemplate(idx)}} disabled={this.templateError.length>0}>Save</button> + <div className={'checkbox ' + (GlobalExtConstants.INVLIST.IS_ONAP ? 'hidden' : '' )}> + <label> + <input type="checkbox" id='aggregateObjects' checked={this.state.isAggregateCheckedList[idx]} onChange={this.onAggregateCheckbox.bind(this)} /> + Aggregate Objects + </label> + </div> + </div> + </div> + } + {this.state.queryNameList[idx] && this.state.filterTemplateEntriesList[idx].length === 0 && !this.state.filterTemplateErrorList[idx] && + <div className='addPaddingTop alert alert-warning' role="alert"> + No filters present to populate for this saved query, please run as is or edit the query manually and run. + </div> + } + {this.state.filterTemplateErrorList[idx] && + <div className='addPaddingTop alert alert-danger' role="alert"> + An error occurred in parsing the template, please try a different template or contact the data steward to resolve this issue. + </div> + } + </div>; + listOfTemplate.push(templateList); + }); + console.log('listOfTemplate>>>>>#####>>>>>>>',listOfTemplate); + return listOfTemplate; + } + + + render(){ + let downloadRangeModel = this.prepareDownloadRangeModel(); + let templateList= this.templateList(); + var toggelRealtimeAnalysis = ''; + var emailCheckbox = <div className={(this.dslObjectList.length>0)?'show':'hidden'}> + <div className="checkbox"> + <OverlayTrigger placement='top' overlay={<Tooltip id='tooltip-top'>{'Report will be generated and emailed to '+sessionStorage.getItem(ENVIRONMENT + 'userId')+'@att.com when finished'}</Tooltip>}> + <span className="d-inline-block" style={{display: 'inline-block'}}> + <Button bsSize='small' disabled={(this.dslObjectList.length===0)} onClick={() => {this.onGenerateEmailButton()}}> + Generate & Email <i className='icon-documents-folder'></i> + </Button> + </span> + </OverlayTrigger> + </div> + </div> + var mergedTabs = <div className={(this.dslObjectList.length>0)?'show':'hidden'}> + <div className="checkbox"> + <label> + <input type="checkbox" checked={this.state.isMergedTabsChecked} onChange={this.onMergedTabsCheckbox.bind(this)} /> + Merge Tabs + </label> + </div> + </div> + var downloadAllTemplateQueries = <div className={(this.dslObjectList.length>0)?'show':'hidden'}> + <OverlayTrigger placement='top' overlay={<Tooltip id='tooltip-top'>{this.downloadBulkTooltip}</Tooltip>}> + <span className="d-inline-block" style={{display: 'inline-block'}}> + <Button bsSize='small' disabled={(this.dslObjectList.length===0)} onClick={() => {this.downloadBulkDslToExcel()}}> + Download Loaded Queries <i className='icon-documents-downloadablefile'></i> + </Button> + </span> + </OverlayTrigger> + </div> + let downloadTemplateStatusAlert= <div className={(this.dslObjectList.length>0)?'show':'hidden'}> + <Alert id="saveSuccess" bsStyle="success" className={(this.state.downloadTemplateStatus && this.state.failedDownloadedTemplate.length===0)?'show':'hide'} onDismiss={() => this.setState({ + downloadTemplateStatus:false, + failedDownloadedTemplate:[], + failedDownloadedTemplateMsg:'', + failedEmailTemplateMsg:'', + emailTriggerMsg:''})}> + <h3>Download Loaded Templates are Successfully</h3> + <p> + The selected templates downloaded successfull. + </p> + </Alert> + {this.state.failedDownloadedTemplate.length>0 && <Alert id="saveFailure" bsStyle="danger" onDismiss={() => this.setState({ + downloadTemplateStatus:false, + failedDownloadedTemplate:[], + failedDownloadedTemplateMsg:'', + failedEmailTemplateMsg:'', + emailTriggerMsg:''})}> + <h3>Download Loaded Templates are Failed</h3> + <p> + {this.state.failedDownloadedTemplate.toString()} templates are failed to download.Please refer the downloaded spreadsheet for more details. + </p> + </Alert>} + {this.state.failedDownloadedTemplateMsg !=='' && <Alert id="saveFailure" bsStyle="danger" onDismiss={() => this.setState({ + downloadTemplateStatus:false, + failedDownloadedTemplate:[], + failedDownloadedTemplateMsg:'', + failedEmailTemplateMsg:'', + emailTriggerMsg:''})}> + <h3>Download Loaded Templates are Failed</h3> + <p> + {this.state.failedDownloadedTemplateMsg} + </p> + </Alert>} + {this.state.emailTriggerMsg !=='' && <Alert id="saveSuccess" bsStyle="success" onDismiss={() => this.setState({failedEmailTemplateMsg:'',emailTriggerMsg:''})}> + <h3>Generate & Email Triggered</h3> + <p> + {this.state.emailTriggerMsg} + </p> + </Alert>} + {this.state.failedEmailTemplateMsg !=='' && <Alert id="saveFailure" bsStyle="danger" onDismiss={() => this.setState({failedEmailTemplateMsg:'',emailTriggerMsg:''})}> + <h3>Generate & Email Templates is Failed</h3> + <p> + {this.state.failedEmailTemplateMsg} + </p> + </Alert>} + </div> + if(APERTURE_SERVICE){ + toggelRealtimeAnalysis = <div className='toggleSwitch'><BootstrapSwitchButton + checked={!this.state.enableRealTime} + onlabel='Real Time' + onstyle='danger' + offlabel='Analysis' + offstyle='success' + style='w-100 mx-3' + onChange={(checked) => { + this.toggleRealTimeAnalysisCallback(checked); + }} + /></div> + } + const inputProps = { + placeholder: 'Please enter a query', + value: this.state.value, + onChange: this.onChange, + onSelect: this.onSelect, + onClick: this.onClick + }; + + let nodes = []; + if ( this.state.isAggregate && this.state.aggregateNodes.length > 0 ) { + + console.log('nodes exist', JSON.stringify(this.state.aggregateNodes[0])); + if(this.state.isAggregate && this.state.viewName === 'CardLayout'){ + var nodeDetails = this.state.aggregateNodes.map(entry => { + return <Col lg={4} md={4} sm={6} xs={12}> + <div className='card aggregate-card'> + <div className='card-header'> + <h4 className='card-title'>{entry.nodePath}</h4> + </div> + <div className='card-content aggregate-card-content'> + <span> + {entry && typeof entry.map === 'function' && entry.map(subEntry => + { let nodesPropList={}; + return Object.keys(subEntry).map((node) => { + console.log("subentry : " + JSON.stringify(node + ' ' + JSON.stringify(subEntry[node]))); + let description=''; + let nodeType=subEntry[node]['node-type']; + if(!nodesPropList[nodeType]){ + var requiredParams = buildAttrList(nodeType,[],'mandatory'); + nodesPropList[nodeType]=requiredParams; + } + return (<span> + {this.state.associatedNodesEnabled && (<Alert bsStyle="info"><strong>{node}</strong></Alert>)} + {Object.keys(subEntry[node].properties).map((key)=>{ + let propKey=key.split('|')[1]; + let found=true; + for(var a in nodesPropList[nodeType]){ + if(propKey===nodesPropList[nodeType][a].value){ + found=false; + return (<p className="aggregate-attribute"><strong title={nodesPropList[nodeType][a].description}>{key}</strong> : {"" + subEntry[node].properties[key]}</p>); + } + } + if(found){ + return (<p className="aggregate-attribute"><strong>{key}</strong> : {"" + subEntry[node].properties[key]}</p>); + } + }) + } + </span>) + }) + }) + } + + {this.state.associatedNodesEnabled && (<Alert bsStyle="info"><strong>{entry.fullPath}</strong></Alert>)} + </span> + </div> + </div> + </Col>; + }); + nodes = + <div className='model-container'> + {nodeDetails} + </div>; + }else if(this.state.isAggregate && this.state.viewName === 'CellLayout'){ + if(this.state.aggregateAttrList.length > 0 && this.state.aggregatePaths){ + var types = this.state.aggregatePaths; + var type = types[0]; + let tabs=types.map((nodeType,index) => { + if(this.state.tabularAggregateData[nodeType] && this.state.tabularAggregateColumns[nodeType]){ + return( + <Tab eventKey={nodeType} title={nodeType}> + <BootstrapTable + id={nodeType} + keyField='id' + data={this.state.tabularAggregateData[nodeType]} + columns={this.state.tabularAggregateColumns[nodeType]} + bordered={ true } + headerClasses='table-header-view' + columnFilter={ true } + filter={ filterFactory() } + bootstrap4 striped hover condensed + /> + </Tab> + ) + } + }); + + nodes = + <div> + <button type='button' className={(this.state.disableFilter)? 'btn btn-outline-secondary' : 'btn btn-primary'} disabled={this.state.disableFilter} onClick={() => {this.isTableFilterForAggregation(this.state.columnFilter,this.state.tabularAggregateColumns[type])}} style={{float: 'right', margin: '2px'}}>Apply Filters (All)</button> + <Tabs defaultActiveKey={type} id="multipleTabularView"> + {tabs} + </Tabs> + </div>; + } + }else if(this.state.isAggregate && this.state.viewName === 'VisualLayout'){ + nodes = <span></span>; + } + }else if (this.state.nodes.length > 0){ + const modelGalleryElement = <ModelGallery + nodes={this.state.nodes} + viewName={this.state.viewName} + historyStackString={this.props.location.historyStackString} + openHistoryModal={this.openHistory} + isPageNumberChange={this.state.isPageNumberChange} + resetColumnInd={this.state.resetColumnFilters} + isTableFilterApply={this.isTableFilterApply} + dslQuery={this.state.value} + enableRealTime={this.state.enableRealTime} + tableFilterAliasColumns={this.tableFilterAliasColumns}/>; + nodes = + <div className='model-container'> + {modelGalleryElement} + </div>; + } + return( + <div> + {toggelRealtimeAnalysis} + <div className='addPadding customDsl'> + <div className='static-modal'> + <Modal show={this.state.showHistoryModal} onHide={this.closeHistory}> + <Modal.Header> + <Modal.Title>Retrieve {(this.state.focusedNodeType) ? this.state.focusedNodeType: ' BYOQ Query '} History</Modal.Title> + </Modal.Header> + <Modal.Body> + <form className={this.state.showModelOptions ? 'show' : 'hidden'} id='historyForm' name='historyForm'> + <div className="radio"> + <label> + <input type="radio" value="nodeState" + checked={this.state.historyType === 'nodeState'} + onChange={(e) => this.setHistoryType(e)} /> + View state at + </label> + </div> + <div className="radio"> + <label> + <input type="radio" value="nodeLifeCycleSince" + checked={this.state.historyType === 'nodeLifeCycleSince'} + onChange={(e) => this.setHistoryType(e)} /> + View updates since + </label> + </div> + <div className="radio"> + <label> + <input type="radio" value="nodeLifeCycle" + checked={this.state.historyType === 'nodeLifeCycle'} + onChange={(e) => this.setHistoryType(e)} /> + View all updates + </label> + </div> + </form> + <div className={this.state.enableCalendar ? 'show' : 'hidden'}> + <DatePicker + inline + selected={this.state.startDate} + onChange={(newDate) => this.handleDateChange(newDate)} + showTimeSelect + timeFormat="HH:mm" + timeIntervals={15} + dateFormat="MMMM D, YYYY h:mm a" + timeCaption="time" + /> + </div> + </Modal.Body> + <Modal.Footer> + <Button onClick={this.closeHistory}>Close</Button> + <Button onClick={this.submitHistory}>Submit</Button> + </Modal.Footer> + </Modal> + </div> + <div className='static-modal'> + <Modal show={this.state.showEditModal} onHide={this.closeEditDSLModal}> + <Modal.Header> + <Modal.Title>Edit DSL Query</Modal.Title> + </Modal.Header> + <Modal.Body> + <form id='dslQueryEditable' name='dslQueryEditable'> + <FormGroup controlId="dslQuery"> + <ControlLabel>DSL Query</ControlLabel> + <FormControl className="template-textarea" onChange={this.bindEdits.bind(this)} value={this.state.editModel} componentClass="textarea" placeholder="Enter DSL Query" /> + </FormGroup> + </form> + </Modal.Body> + <Modal.Footer> + <Button onClick={this.closeEditDSLModal}>Close</Button> + <Button onClick={this.submitEditAndRunDSL}>Submit</Button> + </Modal.Footer> + </Modal> + </div> + <div className='static-modal'> + <Modal show={this.state.showNodeModal} onHide={this.closeNodeModal} dialogClassName="modal-override"> + <Modal.Header> + <Modal.Title>Retrieve {this.state.nodeDisplay}</Modal.Title> + </Modal.Header> + <Modal.Body> + <Grid fluid={true}> + <Row className='show-grid'> + <Col lg={12} md={12} sm={12} xs={12}> + <ModelCard + key={this.state.focusedNode.id} + nodeId={this.state.focusedNode.id} + nodeType={this.state.focusedNode['node-type']} + nodeProps={this.state.focusedNode.properties} + nodeRelatives={this.state.focusedNode['related-to']} + nodeUrl={this.state.focusedNode.url} + historyStackString={this.props.location.historyStackString} + openHistoryModal={this.openHistory} + enableRealTime={this.state.enableRealTime}/> + </Col> + </Row> + </Grid> + </Modal.Body> + <Modal.Footer> + <Button onClick={this.closeNodeModal}>Close</Button> + </Modal.Footer> + </Modal> + </div> + <div className='static-modal'> + <Modal show={this.state.showSaveModal} onHide={this.closeSaveModal} dialogClassName="modal-override"> + <Spinner loading={this.state.enableSaveBusyFeedback}> + <Modal.Header> + <Modal.Title>{this.state.isEditModal ? 'Edit' : 'Save'} DSL Query</Modal.Title> + </Modal.Header> + <Modal.Body> + <Alert id="saveFailure" bsStyle="danger" className={this.state.saveFailureMsg ? 'show' : 'hidden'} onDismiss={() => this.setState({saveFailureMsg: false})}> + <h3>Query Save Failed</h3> + <p> + {this.state.saveFailureMsg} + </p> + </Alert> + <form className={!this.state.showQueryExistsWarning ? 'show' : 'hidden'} id='saveDslQueryForm' name='saveDslQueryForm'> + <FormGroup controlId="queryName"> + <ControlLabel>Query Name</ControlLabel> + {!this.state.isEditModal && (<input id='dslNameHelp' type='name' className='form-control' id='queryName' aria-describedby='dslNameHelp' placeholder='Enter query name' value={this.state.queryName} onChange={this.handleQueryNameChange}/>)} + {!this.state.isEditModal && (<small id='queryNameHelp' className='form-text text-muted'>Select a name for your saved query, do not reuse names.</small>)} + {this.state.isEditModal && (<p>{this.state.queryName}</p>)} + </FormGroup> + <FormGroup controlId="queryDescription"> + <ControlLabel>Query Description</ControlLabel> + <FormControl componentClass="textarea" id="queryDescription" aria-describedby="queryDescriptionHelp" placeholder="Enter query description" value={this.state.queryDescription} onChange={this.handleQueryDescriptionChange} /> + <small id="queryDescriptionHelp" className="form-text text-muted">Be as descriptive as possible to describe the purpose of the saved query (this will be searchable)</small> + </FormGroup> + <FormGroup controlId="category"> + <ControlLabel>Category</ControlLabel> + <input id='category' type="name" className="form-control" aria-describedby="category of SavedQuery" placeholder="Enter category" value={this.state.category} onChange={this.handleCategoryChange}/> + </FormGroup> + <FormGroup controlId="privacy_indicator"> + {this.state.isDataSteward && (<div className="checkbox"> + <label> + <input type="checkbox" checked={this.state.isPublicChecked} onChange={this.onPublicCheckbox.bind(this)} /> + Public + </label> + </div>)} + <div className={"checkbox " + ((!this.state.isPublicChecked || !this.state.isDataSteward) ? 'show' : 'hidden')}> + <label> + <input type="checkbox" checked={this.state.isCommunitySharedChecked} onChange={this.onCommunitySharedCheckbox.bind(this)} /> + Share with Community + </label> + </div> + {!this.state.isDataSteward && (<ControlLabel>Personal Query</ControlLabel>)} + </FormGroup> + <FormGroup controlId='aggregate'> + {this.state.isAggregateChecked && !(this.state.isEditModal || this.state.isSavedQueryFlow) && (<ControlLabel>Aggregate Query</ControlLabel>)} + {!this.state.isAggregateChecked && !(this.state.isEditModal || this.state.isSavedQueryFlow) && (<ControlLabel>Standard Query</ControlLabel>)} + {(this.state.isEditModal || this.state.isSavedQueryFlow) && (<div className='checkbox'> + <label> + <input type='checkbox' checked={this.state.isAggregateChecked} onChange={this.onAggregateCheckbox.bind(this)}/> + Aggregate Query + </label> + </div>)} + </FormGroup> + <FormGroup controlId='queryDSL'> + <ControlLabel>DSL Query</ControlLabel> + {!this.state.isEditModal && !this.state.isSavedQueryFlow ? <p>{this.state.value}</p> : <FormControl componentClass='textarea' id='queryDSL' aria-describedby='queryDSLHelp' placeholder='Enter dsl query' value={this.state.value} onChange={this.handleQueryChange} />} + </FormGroup> + <FormGroup controlId='templateDetails'> + <Spinner loading={this.state.enableTreeLoadBusyFeedback}> + <div className={!this.state.treeLoadErrMsg ? 'show' : 'hidden'}> + <ControlLabel>Configuration Template Details - check for configurable, uncheck for static</ControlLabel> + {Object.keys(this.state.dslConfigArray).map(key => { + return (this.state.dslConfigArray[key].filters).map(filter =>{ + return (<div className='checkbox'> + <label> + <input type='checkbox' checked={this.state.staticTemplateFilters.indexOf(key + '|' + filter) === -1} onChange={(e) => {this.onDslConfigCheckbox(e, key + '|' + filter)}} /> + {key} - {filter} + </label> + </div>) + }) + }) + } + </div> + <Alert bsStyle="danger" className={this.state.treeLoadErrMsg ? 'show' : 'hidden'}> + <h3>Error Loading Configurable Filters</h3> + <p> + {this.state.treeLoadErrMsg} + </p> + </Alert> + </Spinner> + </FormGroup> + </form> + <Alert bsStyle="warning" className={this.state.showQueryExistsWarning ? 'show' : 'hidden'} onDismiss={() => this.setState({showQueryExistsWarning: false})}> + <h3>Query Name Already Exists</h3> + <p> + There is already a query with the name {this.state.queryName}, do you wish to overwrite the existing query? + </p> + </Alert> + </Modal.Body> + <Modal.Footer className={!this.state.showQueryExistsWarning ? 'show' : 'hidden'}> + <Button onClick={this.closeSaveModal}>Close</Button> + <Button disabled={this.state.queryName.trim() === '' || this.state.queryDescription.trim() === ''} onClick={() => {this.submitSave()}}>Save</Button> + </Modal.Footer> + <Modal.Footer className={this.state.showQueryExistsWarning ? 'show' : 'hidden'}> + <Button onClick={() => this.setState({showQueryExistsWarning : false})}>No</Button> + <Button onClick={() => {this.submitSave(true)}}>Yes</Button> + </Modal.Footer> + </Spinner> + </Modal> + </div> + <div id="jumbotron" className='row'> + <div className={'row container-fluid my-4 ' + (this.state.isDSLFlow ? 'show' : 'hidden')}> + <div className='col-lg-12'> + <header className='jumbotron'> + <h1 className='display-2'><strong>B</strong>uild <strong>Y</strong>our <strong>O</strong>wn <strong>Q</strong>uery</h1> + <p className='lead'> + On this page you have the ability to craft your own query to retrieve objects from the database. + There are help menus in the accordions and a modal triggered from the light bulb icon to help with syntax. + There are is also a typeahead feature that will help you build your query as you type, providing valid nodes and attributes to use. + </p> + </header> + </div> + </div> + <div className={'row container-fluid my-4 ' + (this.state.isSavedQueryFlow ? 'show' : 'hidden')}> + <div className='col-lg-12'> + <header className='jumbotron'> + <h1 className='display-2'>Saved Queries</h1> + <p className='lead'> + On this page you have the ability to load and run previously saved queries. + You can run them as they are saved or choose to load them to replace the filters + in the template. + </p> + </header> + </div> + </div> + </div> + <div className='row'> + <div className={'addPadding col-md-12 ' + (this.state.isSavedQueryFlow ? 'show' : 'hidden')}> + <div className='row'> + <div className='col-lg-10'> + <Alert id="saveSuccessEdit" bsStyle="success" className={this.state.saveSuccessfulMsg && this.state.isEditModal ? 'show' : 'hidden'} onDismiss={() => this.setState({saveSuccessfulMsg: false})}> + <h3>Query Saved Successfully</h3> + <p> + {this.state.saveSuccessfulMsg} + </p> + </Alert> + </div> + </div> + <CustomDSLSaveLoad loadCallback={this.loadCallback} loadBulkCallback={this.loadBulkCallback} setQueriesState={this.setQueriesState} ref={this.saveLoadComponent} isDataSteward={this.state.isDataSteward} isSavedQueryFlow={this.state.isSavedQueryFlow} editCallback={this.editCallback}/> + <div className={'col-xs-1 ' + (GlobalExtConstants.INVLIST.IS_ONAP ? 'hidden' : '' )} > + <a href={INVLIST.USERGUIDE_URL} target="_blank"> + <i className="dsl-hint icon-documents-manual"></i> + </a> + <pre>User<br />Guide</pre> + </div> + <div className='col-lg-11'><InfoToggle/></div> + </div> + <div className='row'> + <div className='col-md-12' id='templateList'> + {templateList} + </div> + <div className='col-md-10' id='downloadTemplateStatusAlert'> + <div className='col-md-6'> + {downloadTemplateStatusAlert} + </div> + <div className='col-md-6'> + <div style={{float:'right'}}> + {emailCheckbox} + </div> + <div style={{float:'right',margin: '10px'}}> + {downloadAllTemplateQueries} + </div> + <div style={{float:'right',margin: '10px'}}> + {mergedTabs} + </div> + </div> + </div> + </div> + <div className={'addPadding col-md-9 ' + (this.state.isDSLFlow ? 'show' : 'hidden')}> + <form onSubmit={this.onAddItem} id='byoqFormForQuery' name='byoqFormForQuery'> + <div className='row'> + <div className='col-lg-9 form-group'> + <Alert id="saveSuccess" bsStyle="success" className={this.state.saveSuccessfulMsg ? 'show' : 'hidden'} onDismiss={() => this.setState({saveSuccessfulMsg: false})}> + <h3>Query Saved Successfully</h3> + <p> + {this.state.saveSuccessfulMsg} + </p> + </Alert> + <div id="byoqInput"><label htmlFor='newQuery'>Build Your Own Query</label></div> + <div className={this.state.isTypeahead ? 'show' : 'hidden'}> + <Autosuggest + suggestions={this.state.suggestions} + onSuggestionsFetchRequested={this.onSuggestionsFetchRequested} + onSuggestionsClearRequested={this.onSuggestionsClearRequested} + getSuggestionValue={this.getSuggestionValue} + renderSuggestion={this.renderSuggestion} + inputProps={inputProps} + shouldRenderSuggestions={this.shouldRenderSuggestions} + onSuggestionSelected={this.onSuggestionSelected} + ref={this.storeInputReference} + /> + </div> + <div className={this.state.isTypeahead ? 'hidden' : 'show'}> + <FormControl componentClass="textarea" + rows="4" + onChange={this.onTextAreaChange} + style={{width: '655px'}} + value={this.state.value} + /> + </div> + </div> + <div className={'col-xs-1 ' + (GlobalExtConstants.INVLIST.IS_ONAP ? 'hidden' : '' )}> + <a href={INVLIST.USERGUIDE_URL} target="_blank"> + <i className="dsl-hint icon-documents-manual"></i> + </a> + <pre>User<br />Guide</pre> + </div> + <InfoToggle/> + <div className='col-xs-1'> + <i className='dsl-hint fa fa-question-circle-o' onClick={this.hint} ></i> + </div> + <div className='static-modal'> + <Modal show={this.state.showModal} onHide={this.close}> + <Modal.Header> + <Modal.Title>DSL Syntax</Modal.Title> + </Modal.Header> + <Modal.Body> + { + this.state.hintHtml.map(hints => { + return <div key={hints.notation}> + <label>{hints.notation}</label> => + <pre style={{color: 'blue'}}> {hints.description}</pre> + </div>; + }) + } + </Modal.Body> + <Modal.Footer> + <Button onClick={this.close}>Close</Button> + </Modal.Footer> + </Modal> + </div> + </div> + <div className='row'> + <div className='col-sm-10'> + <button id='runByoqQuery' className='btn btn-primary' type='submit'>Run</button> + { !INVLIST.IS_ONAP &&(<button id='saveByoqQuery' className='btn btn-outline-secondary' type='button' disabled={this.state.value.trim() === ''} onClick={this.openSaveModal}>Save</button>)} + { INVLIST.isHistoryEnabled && (<button id='historyByoqQuery' className='btn btn-outline-secondary' type='button' disabled={this.state.value.trim() === ''} onClick={this.openHistory}>History</button>)} + <button id='clearByoqQuery' className='btn btn-outline-secondary' type='button' onClick={this.clear}>Clear</button> + <Toggle + id="typeAheadToggle" + defaultChecked={this.state.isTypeahead} + checked={this.state.isTypeahead} + className='toggle-theme' + onChange={this.handleTypeaheadChange} /> + <span className='addPaddingLeft'>Typeahead</span> + </div> + </div> + </form> + <div className={this.state.isInitialLoad ? 'hidden' : 'show'} id='dslInputError'> + <Row className={this.state.validInput ? 'hidden' : 'show show-grid'}> + <Col md={12}> + <span className='label badge-pill label-danger'><strong>Error </strong>: Please enter a valid query input</span> + </Col> + </Row> + </div> + <div className={'checkbox ' + (GlobalExtConstants.INVLIST.IS_ONAP ? 'hidden' : '' )}> + <label> + <input type="checkbox" id='aggregateObjectsChkbox' checked={this.state.isAggregateChecked} onChange={this.onAggregateCheckbox.bind(this)} /> + Aggregate Objects + </label> + {this.state.isAggregateChecked && (<label> + <input id='includeAssociatedNodes' type="checkbox" checked={this.state.associatedNodesEnabled} onChange={this.onAssociatedNodesCheckbox.bind(this)} /> + Include Associated Nodes + </label>)} + </div> + <CustomDSLSaveLoad loadCallback={this.loadCallback} loadBulkCallback={this.loadBulkCallback} setQueriesState={this.setQueriesState} ref={this.saveLoadComponentDsl} isDataSteward={this.state.isDataSteward} editCallback={this.editCallback}/> + </div> + <div className={'col-lg-2 col-md-12 ' + (this.state.isDSLFlow ? 'show' : 'hidden')}> + <PanelGroup accordion id='rb-accordion'> + <Panel eventKey='1'> + <Panel.Heading> + <Panel.Title toggle>+ Simple Queries</Panel.Title> + </Panel.Heading> + <Panel.Body collapsible> + <div className='cardwrap'> + <div className='cardWrapHeaderTxt'> + <label>{this.state.simpleQueries.abstract}</label> + </div> + <div> + {this.state.simpleQueries.notation.map(entry => { + return ( + <div key={entry.notation}> + <b><label>{entry.notation}</label></b> => + <span style={{color: 'blue'}}> {entry.description}</span> + </div> + ); + })} + </div> + </div> + </Panel.Body> + </Panel> + <Panel eventKey='2'> + <Panel.Heading> + <Panel.Title toggle>+ Traversal Queries</Panel.Title> + </Panel.Heading> + <Panel.Body collapsible> + <div className='cardwrap'> + <div className='cardWrapHeaderTxt'> + <label>{this.state.traversalQueries.abstract}</label> + </div> + <div> + {this.state.traversalQueries.notation.map(entry => { + return ( + <div key={entry.notation}> + <b><label>{entry.notation}</label></b> => + <span style={{color: 'blue'}}> {entry.description}</span> + </div> + ); + })} + </div> + </div> + </Panel.Body> + </Panel> + <Panel eventKey='3'> + <Panel.Heading> + <Panel.Title toggle>+ Union Queries</Panel.Title> + </Panel.Heading> + <Panel.Body collapsible> + <div className='cardwrap'> + <div className='cardWrapHeaderTxt'> + <label>{this.state.unionQueries.abstract}</label> + </div> + <div> + {this.state.unionQueries.notation.map(entry => { + return ( + <div key={entry.notation}> + <b><label>{entry.notation}</label></b> => + <span style={{color: 'blue'}}> {entry.description}</span> + </div> + ); + })} + </div> + </div> + </Panel.Body> + </Panel> + <Panel eventKey='4'> + <Panel.Heading> + <Panel.Title toggle>+ Limit Queries</Panel.Title> + </Panel.Heading> + <Panel.Body collapsible> + <div className='cardwrap'> + <div className='cardWrapHeaderTxt'> + <label>{this.state.limitQueries.abstract}</label> + </div> + <div> + {this.state.limitQueries.notation.map(entry => { + return ( + <div key={entry.notation}> + <b><label>{entry.notation}</label></b> => + <span style={{color: 'blue'}}> {entry.description}</span> + </div> + ); + })} + </div> + </div> + </Panel.Body> + </Panel> + <Panel eventKey='5'> + <Panel.Heading> + <Panel.Title toggle>+ Negation Queries</Panel.Title> + </Panel.Heading> + <Panel.Body collapsible> + <div className='cardwrap'> + <div className='cardWrapHeaderTxt'> + <label>{this.state.negationQueries.abstract}</label> + </div> + <div> + {this.state.negationQueries.notation.map(entry => { + return ( + <div key={entry.notation}> + <b><label>{entry.notation}</label></b> => + <span style={{color: 'blue'}}> {entry.description}</span> + </div> + ); + })} + </div> + </div> + </Panel.Body> + </Panel> + <Panel eventKey='6'> + <Panel.Heading> + <Panel.Title toggle>+ Topology Queries</Panel.Title> + </Panel.Heading> + <Panel.Body collapsible> + <div className='cardwrap'> + <div className='cardWrapHeaderTxt'> + <label>{this.state.topologyQueries.abstract}</label> + </div> + <div> + {this.state.topologyQueries.notation.map(entry => { + return ( + <div key={entry.notation}> + <b><label>{entry.notation}</label></b> => + <span style={{color: 'blue'}}> {entry.description}</span> + </div> + ); + })} + </div> + </div> + </Panel.Body> + </Panel> + <Panel eventKey='7' className={(this.state.enableRealTime) ? 'show' : 'hidden'}> + <Panel.Heading> + <Panel.Title toggle>+ Advanced Queries</Panel.Title> + </Panel.Heading> + <Panel.Body collapsible> + <div className='cardwrap'> + <div className='cardWrapHeaderTxt'> + <label>{this.state.advancedQueries.abstract}</label> + </div> + <div> + {this.state.advancedQueries.notation.map(entry => { + return ( + <div key={entry.notation}> + <b><label>{entry.notation}</label></b> => + <span style={{color: 'blue'}}> {entry.description}</span> + </div> + ); + })} + </div> + </div> + </Panel.Body> + </Panel> + </PanelGroup> + </div> + </div> + <div className='row'> + <div className='multipleNodes' id="outputBlock"> + <Spinner loading={this.state.isLoading && this.state.isInitialLoad}> + </Spinner> + <div className={this.state.isInitialLoad ? 'hidden' : 'show'}> + <Spinner loading={this.state.isLoading} fullscreen={true}> + <div className={this.state.validInput ? 'show' : 'hidden'}> + <Col md={12}> + <h2 className='pre-wrap-text'>{this.state.header}</h2> + <br/> + <h5>Total Results: <strong>{this.state.totalResults}</strong></h5> + </Col> + {this.state.showResults && <div className="addPaddingTop" > + <OutputToggle scope={this} visualDisabled={this.state.totalResults > PAGINATION_CONSTANT}/> + </div> } + {!this.state.isAggregate && (<div id="standardOutput" className="col-md-12"> + <Row className={this.state.showResults ? 'show' : 'hidden'}> + <Col md={8} className={this.state.showPagination ? 'show' : 'hidden'}> + <Pagination + activePage={this.state.activePage} + itemsCountPerPage={PAGINATION_CONSTANT.RESULTS_PER_PAGE} + totalItemsCount={this.state.totalResults} + pageRangeDisplayed={PAGINATION_CONSTANT.PAGE_RANGE_DISPLAY} + onChange={this.handlePageChange} /> + </Col> + <Col md={2} className='text-right'> + <OverlayTrigger placement='top' overlay={<Tooltip id='tooltip-top'>{this.downloadAllTooltip}</Tooltip>}> + <span className="d-inline-block" style={{display: 'inline-block'}}> + <Button bsSize='small' onClick={() => {this.getAllExcels(this.state.downloadCount)}}> + Download XLSX <i className='icon-documents-downloadablefile'></i> + </Button> + </span> + </OverlayTrigger> + </Col> + <Col md={2} className='text-right'> + <OverlayTrigger placement='top' overlay={<Tooltip id='tooltip-top'>{this.downloadRangeTooltip}</Tooltip>}> + <span className="d-inline-block" style={{display: 'inline-block'}}> + <Button bsSize='small' onClick={this.openDownloadRange}> + Download XLSX (Range) <i className='icon-documents-downloadablefile'></i> + </Button> + </span> + </OverlayTrigger> + </Col> + </Row> + <hr/> + <div className={'addPaddingTop alert alert-danger ' +(this.state.errorResults ? 'show' : 'hidden')} role="alert"> + An error occurred, please try again later. If this issue persists, please contact the system administrator. {this.state.errorMessage} + </div> + <Row className={this.state.noResults ? 'show' : 'hidden'}> + <Col md={12}> + <h2>No Results Found</h2> + </Col> + </Row> + <div className={this.state.errorResults || this.state.noResults ? 'hidden' : 'show'}> + <div className='nodes container-fluid'> + <div className='row-dsl'> + {nodes} + </div> + </div> + </div> + <Row className={this.state.showPagination ? 'show' : 'hidden'}> + <Col md={6}> + <Pagination + activePage={this.state.activePage} + itemsCountPerPage={PAGINATION_CONSTANT.RESULTS_PER_PAGE} + totalItemsCount={this.state.totalResults} + pageRangeDisplayed={PAGINATION_CONSTANT.PAGE_RANGE_DISPLAY} + onChange={this.handlePageChange} /> + </Col> + </Row> + </div>)} + {this.state.isAggregate && (<div id="aggregateOutput"> + <Row className={ this.state.errorResults || this.state.noResults ? 'hidden' : 'show'}> + <Col md={8} className={this.state.showPagination ? 'show' : 'hidden'}> + <Pagination + activePage={this.state.aggregateActivePage} + itemsCountPerPage={PAGINATION_CONSTANT.RESULTS_PER_PAGE} + totalItemsCount={this.state.totalResults} + pageRangeDisplayed={PAGINATION_CONSTANT.PAGE_RANGE_DISPLAY} + onChange={this.handlePageChange} /> + </Col> + <Col md={2} className='text-right'> + <OverlayTrigger placement='top' overlay={<Tooltip id='tooltip-top'>{this.downloadAllTooltip}</Tooltip>}> + <span className="d-inline-block" style={{display: 'inline-block'}}> + <Button bsSize='small' onClick={() => {this.downloadAllAggregate(this.state.downloadCount)}}> + Download XLSX <i className='icon-documents-downloadablefile'></i> + </Button> + </span> + </OverlayTrigger> + </Col> + <Col md={2} className='pull-right text-right'> + <OverlayTrigger placement='top' overlay={<Tooltip id='tooltip-top'>Download All Aggregate Objects By Custom Range Selection</Tooltip>}> + <span className="d-inline-block" style={{display: 'inline-block'}}> + <Button bsSize='small' onClick={this.openDownloadRange}> + Download XLSX (Range) <i className='icon-documents-downloadablefile'></i> + </Button> + </span> + </OverlayTrigger> + </Col> + </Row> + <hr/> + <div className={'addPaddingTop alert alert-danger ' + (this.state.errorResults ? 'show' : 'hidden')} role="alert"> + An error occurred, please try again later. If this issue persists, please contact the system administrator. {this.state.errorMessage} + </div> + <Row className={this.state.noResults ? 'show' : 'hidden'}> + <Col md={12}> + <h2>No Results Found</h2> + </Col> + </Row> + <div className={this.state.errorResults || this.state.noResults ? 'hidden' : 'show'}> + <div className='nodes container-fluid'> + <div className='row-dsl'> + {nodes} + <div className={this.state.viewName === "VisualLayout" ? 'show' : 'hidden'}> + <OutputVisualization identifier="currentStateAggregate" width={ window.outerWidth * 0.8 } height="1200" overflow="scroll"/> + </div> + </div> + </div> + </div> + <Row className={this.state.showPagination ? 'show' : 'hidden'}> + <Col md={6}> + <Pagination + activePage={this.state.aggregateActivePage} + itemsCountPerPage={PAGINATION_CONSTANT.RESULTS_PER_PAGE} + totalItemsCount={this.state.totalResults} + pageRangeDisplayed={PAGINATION_CONSTANT.PAGE_RANGE_DISPLAY} + onChange={this.handlePageChange} /> + </Col> + </Row> + </div>)} + </div> + <Spinner loading={this.state.enableModelBusyFeedback}> + {downloadRangeModel} + </Spinner> + </Spinner> + </div> + <div className='row'> + <div className='col-sm-10'></div> + </div> + </div> + </div> + </div> + </div> + ); + } +} + +export default CustomDsl; diff --git a/src/app/byoq/CustomDslBuilder.jsx b/src/app/byoq/CustomDslBuilder.jsx new file mode 100644 index 0000000..1e034fa --- /dev/null +++ b/src/app/byoq/CustomDslBuilder.jsx @@ -0,0 +1,1725 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React, {Component} from 'react'; +import commonApi from 'utils/CommonAPIService.js'; +import {GeneralCommonFunctions} from 'utils/GeneralCommonFunctions.js'; +import Modal from 'react-bootstrap/lib/Modal'; +import Grid from 'react-bootstrap/lib/Grid'; +import FormGroup from 'react-bootstrap/lib/FormGroup'; +import FormControl from 'react-bootstrap/lib/FormControl'; +import ControlLabel from 'react-bootstrap/lib/ControlLabel'; +import Button from 'react-bootstrap/lib/Button'; +import {GlobalExtConstants} from 'utils/GlobalExtConstants.js'; +import Spinner from 'utils/SpinnerContainer.jsx'; +import Row from 'react-bootstrap/lib/Row'; +import Col from 'react-bootstrap/lib/Col'; +import Panel from 'react-bootstrap/lib/Panel'; +import Tooltip from 'react-bootstrap/lib/Tooltip'; +import FilterTypes from 'generic-components/filter/components/FilterTypes.jsx'; +import PathFilterDslBuilder from './PathFilterDslBuilder.jsx'; +import CustomDSLSaveLoad from 'app/byoq/CustomDSLSaveLoad.jsx'; +import BootstrapSwitchButton from 'bootstrap-switch-button-react'; +import * as d3 from "d3"; +import 'd3-selection-multi'; + + +let EDGERULES = GlobalExtConstants.EDGERULES; +let OXM = GlobalExtConstants.OXM; +let INVLIST = GlobalExtConstants.INVLIST; +let ENVIRONMENT = GlobalExtConstants.ENVIRONMENT; +let APERTURE_SERVICE = JSON.parse(sessionStorage.getItem(ENVIRONMENT + 'APERTURE_SERVICE')); + + +let nodeTypes = []; +let properties = null; +let traverseRulesDsl = []; + +const settings = { + 'NODESERVER': INVLIST.NODESERVER, + 'PROXY': INVLIST.PROXY, + 'PREFIX': INVLIST.PREFIX, + 'VERSION': INVLIST.VERSION, + 'APERTURE': INVLIST.APERTURE, + 'USESTUBS': INVLIST.useStubs +}; +class CustomDslBuilder extends Component { + constructor(props) { + console.log('props>>>>',props); + super(props); + this.saveLoadComponent = React.createRef(); + APERTURE_SERVICE=JSON.parse(sessionStorage.getItem(ENVIRONMENT + 'APERTURE_SERVICE')); + this.state = {edgeRules : null, + connectableNodes:[], + showNodeModal: false, + enableModalFeedback: false, + showEditNodeModal: false, + treemap: null, + root: null, + svg: null, + duration: null, + g: null, + selectedNode: null, + traverseToNodes:[], + traverseToNodeAttributes: [], + nodeDetails: [], + dslQuery: '', + editModel:'', + showEditModal: false, + zoomFit: null, + autoZoomEnabled: true, + aggregateObjects: false, + init: true, + filterTypeDisplay: 'Filter Type', + selectedfilterType:[], + oxmMapping: null, + initialRootEdit: true, + showPathFilterDslBuilder: false, + pathFilterNodeType: '', + pathFilterNodeName:'', + pathFIlterAttrDetails: [], + dslPathBuilder:'', + dslPathTree:'', + loadedQueries: [], + queryDescription: '', + queryName: '', + category:'', + queryId:'', + treeLoadErrMsg: '', + isEditEnable:false, + pathFilterIndex:0, + isDataSteward: sessionStorage.getItem(ENVIRONMENT + 'roles') && sessionStorage.getItem(ENVIRONMENT + 'roles').indexOf('data_steward_ui_view') > -1, + isPublicChecked: sessionStorage.getItem(ENVIRONMENT + 'roles') && sessionStorage.getItem(ENVIRONMENT + 'roles').indexOf('data_steward_ui_view') > -1, + enableRealTime: JSON.parse(sessionStorage.getItem(ENVIRONMENT + 'ENABLE_ANALYSIS')) + } + this.baseState=this.state; + } + componentDidMount () { + console.log('componentDidMount',JSON.stringify(this.props)); + //this.buildSQLStatementsFromSchema(); + this.processEdgeRules(EDGERULES); + if(this.props.match.params.type && this.props.match.params.propId) { + this.build(this.props.match.params.type, this.props.match.params.propId); + } + } + initialize = () =>{ + this.setState({enableModalFeedback: true}, function () { + //console.log("EnableModalFeedback: " + this.state.enableModalFeedback); + setTimeout(() => {this.postSpinner()},1); + }); + } + + postSpinner = () => { + + var nodeDetails = []; + var node = null; + console.log('initializing'); + var id = GeneralCommonFunctions.generateID(); + var nodeTypes = GeneralCommonFunctions.getNodeTypes(); + for (var i = 0; i < nodeTypes.length; i++) { + node = nodeTypes[i] + id; + var attributes = GeneralCommonFunctions.getFilteringOptions(nodeTypes[i]); + if(!nodeDetails[node] && Object.keys(attributes).length > 0){ + nodeDetails[node] = {}; + nodeDetails[node].nodeType = nodeTypes[i]; + nodeDetails[node].isSelected = false; + nodeDetails[node].attrDetails = attributes; + nodeDetails[node].parentContainer = GeneralCommonFunctions.populateContainer(nodeTypes[i]); + } + } + let nodesSorted = nodeDetails.sort(function (filter1, filter2) { + if (filter1.nodeType < filter2.nodeType) { + return -1; + } else if (filter1.nodeType > filter2.nodeType) { + return 1; + } else { + return 0; + } + }); + //console.log('Node Types List' + JSON.stringify(nodesSorted)); + nodeDetails = nodesSorted; + this.setState({nodeDetails: nodeDetails, showNodeModal: true, enableModalFeedback: false}); + } + processEdgeRules = (data) => { + this.setState({ + edgeRules: data.rules + },()=>{this.baseState=this.state}); + } + closeNodeModal = () =>{ + this.setState({ + showNodeModal: false, + enableModalFeedback: false, + traverseToNodes: [], + selectedNode: null + }); + } + closeEditNodeModal = () =>{ + this.setState({ + showEditNodeModal: false, + selectedNode: null, + showPathFilterDslBuilder: false + }); + } + closePathNodeModal = () =>{ + console.log('closePathNodeModal>>>>>>>'); + this.setState({ + showPathFilterDslBuilder: false, + pathFilterNodeType: '', + pathFilterNodeName:'', + pathFIlterAttrDetails: [] + }); + } + submitPathNodeModal = (dslQuery,nodetype,dslQueryTree,isEditEnable,pathFilterIndex) =>{ + console.log('CustomDSLBuilder submitPathNodeModel>>>>>dslQuery ###',dslQuery); + console.log(isEditEnable+'<<submitPathNodeModal this.state.nodeDetails>>>>',this.state.nodeDetails) + var nodeDetails = this.state.nodeDetails; + if(!nodeDetails[nodetype].dslPath){ + nodeDetails[nodetype].dslPath=[]; + nodeDetails[nodetype].dslPathTree=[]; + } + if(isEditEnable){ + nodeDetails[nodetype].dslPath[pathFilterIndex]=dslQuery; + nodeDetails[nodetype].dslPathTree[pathFilterIndex]=dslQueryTree; + console.log('nodeDetails on edit>>>>>>>>>',nodeDetails); + }else{ + nodeDetails[nodetype].dslPath.push(dslQuery); + nodeDetails[nodetype].dslPathTree.push(dslQueryTree); + } + this.setState({ nodeDetails: nodeDetails },()=>{this.closePathNodeModal()}); + } + editPathNodeModal = (key,path,tree,indx) =>{ + console.log('editPathNodeModal>>>>>>>>>###',indx); + let attrDetails=this.state.nodeDetails[key].attrDetails; + let nodeType=this.state.nodeDetails[key].nodeType; + this.setState({showPathFilterDslBuilder: true,pathFilterNodeType: key,pathFilterNodeName:nodeType,pathFIlterAttrDetails: '',dslPathBuilder: path,dslPathTree:tree,isEditEnable:true,pathFilterIndex:indx}); + } + deletePathNodeModal = (key,path,tree,index) =>{ + console.log(index+'<<deletePathNodeModal>>>>>',key); + var nodeDetails = this.state.nodeDetails; + nodeDetails[key].dslPath.splice(index,1); + nodeDetails[key].dslPathTree.splice(index,1); + this.setState({ nodeDetails: nodeDetails }); + } + onNodeCheckbox(e) { + var nodeDetails = this.state.nodeDetails; + if (e.target.checked) { + nodeDetails[e.target.value].isSelected = true; + this.selectAll(e.target.value); + }else { + nodeDetails[e.target.value].isSelected = false; + this.deselectAll(e.target.value); + } + // update the state with the new array of traverse to nodes + this.setState({ nodeDetails: nodeDetails }); + } + onNodeRadio(e) { + var nodeDetails = this.state.nodeDetails; + if (e.target.checked) { + nodeDetails[e.target.value].isSelected = true; + this.selectAll(e.target.value); + } + for (var key in nodeDetails) { + if(key != e.target.value && nodeDetails[key].isSelected ){ + nodeDetails[key].isSelected = false; + this.deselectAll(key); + } + } + // update the state with the new array of traverse to nodes + this.setState({ nodeDetails: nodeDetails }); + } + onAutoZoomCheckbox(e) { + var cbValue = false; + if (e.target.checked) { + cbValue = true; + }else { + cbValue = false; + } + this.setState({ autoZoomEnabled: cbValue }); + } + onAggregateCheckbox(e) { + var cbValue = false; + if (e.target.checked) { + cbValue = true; + }else { + cbValue = false; + } + this.setState({ aggregateObjects: cbValue }); + } + onAttributeCheckbox(e){ + let splitVal = e.target.value.split("|"); + let nodeKey = splitVal[0]; + let attrValue = splitVal[1]; + let nodeDetails = this.state.nodeDetails; + let node = nodeDetails[nodeKey]; + let attribute = null; + if(!node.attrDetails){ + node.attrDetails = []; + } + if(!node.attrDetails[attrValue]){ + node.attrDetails[attrValue] = {}; + node.attrDetails[attrValue].isSelected = true; + node.attrDetails[attrValue].filterValue = []; + node.attrDetails[attrValue].filterType = []; + node.attrDetails[attrValue].dslPath = []; + node.attrDetails[attrValue].dslPathTree = []; + } + + // check if the check box is checked or unchecked + if (e.target.checked) { + // add the value of the checkbox to nodes array + node.attrDetails[attrValue].isSelected = true; + node.attrDetails[attrValue].filterType[0]='EQ'; + } else { + // or remove the value from the unchecked checkbox from the array + node.attrDetails[attrValue].isSelected = false; + //node.attrDetails[attrValue].filterType = ['']; + //node.attrDetails[attrValue].filterValue = ['']; + } + nodeDetails[nodeKey] = node; + // update the state with the new array of traverse to nodes + this.setState({ nodeDetails: nodeDetails }); + } + onFilterValueChange(e, nodeKey, attrKey, indx){ + let nodeDetails = this.state.nodeDetails; + let node = nodeDetails[nodeKey]; + if(!node.attrDetails){ + node.attrDetails = []; + } + if(!node.attrDetails[attrKey]){ + node.attrDetails[attrKey] = {}; + node.attrDetails[attrKey].isSelected = true; + node.attrDetails[attrKey].filterValue = []; + node.attrDetails[attrKey].filterType = []; + node.attrDetails[attrValue].dslPath = []; + node.attrDetails[attrValue].dslPathTree = []; + } + // add the value of the checkbox to nodes array + //node.attrDetails[attrKey].filterValue.push(e.target.value); + let filterValArr=node.attrDetails[attrKey].filterValue; + filterValArr[indx]=e.target.value; + node.attrDetails[attrKey].filterValue=filterValArr; + nodeDetails[nodeKey] = node; + // update the state with the new array of traverse to nodes + this.setState({ nodeDetails: nodeDetails }); + } + submitNodeModal = () =>{ + if(this.state.selectedNode){ + var d = this.state.selectedNode; + for(var node in this.state.nodeDetails){ + if(this.state.nodeDetails[node].isSelected){ + var newNodeObj = { + type: 'node', + name: this.state.nodeDetails[node].nodeType, + details: {} + }; + //Creates new Node + Object.assign(newNodeObj.details, this.state.nodeDetails[node]); + var newNode = d3.hierarchy(newNodeObj); + newNode.depth = d.depth + 1; + newNode.height = d.height - 1; + newNode.parent = d; + newNode.id = node; + if(!d.children){ + d.children = []; + } + if(newNodeObj.details){ + var selectedAttributeCount = 0; + for (var key in newNodeObj.details.attrDetails){ + if (newNodeObj.details.attrDetails[key].isSelected){ + selectedAttributeCount++; + } + if(selectedAttributeCount === Object.keys(newNodeObj.details.attrDetails).length){ + newNodeObj.details.includeInOutput = true; + } + } + } + d.children.push(newNode); + this.setState({ nodeDetails: [] }); + } + } + this.update(this, d); + this.setState({ + showNodeModal: false, + enableModalFeedback: false, + traverseToNodes: [], + selectedNode: null + }); + }else{ + var nodeType = ""; + var attrDetails = null; + var dslPath =[]; + var dslPathTree=[]; + for (var key in this.state.nodeDetails) { + if(this.state.nodeDetails[key].isSelected){ + nodeType = this.state.nodeDetails[key].nodeType; + attrDetails = this.state.nodeDetails[key].attrDetails; + dslPath =this.state.nodeDetails[key].dslPath; + dslPathTree=this.state.nodeDetails[key].dslPathTree; + } + } + this.build(nodeType, null, attrDetails,null,dslPath,dslPathTree); + this.setState({ nodeDetails: [], showNodeModal: false, enableModalFeedback:false, traverseToNodes: [], selectedNode: null }); + } + } + submitEditNodeModal = () =>{ + this.update(this, this.state.selectedNode); + this.setState({showEditNodeModal: false,showPathFilterDslBuilder:false}); + } + populateEdgeRules = (nodeType) => { + let nodeDetails=GeneralCommonFunctions.populateEdgeRules(nodeType,this.state.edgeRules); + this.setState({ + nodeDetails: nodeDetails + }); + } + + buildOXMAttributesAndReturn = (nodeType) =>{ + var oxmArray = []; + var result = JSON.parse(OXM); + var arrayOfTypes = result['xml-bindings']['java-types'][0]['java-type']; + for (var i = 0; i < arrayOfTypes.length; i++) { + var propertiesDsl = []; + for (var j = 0; j < arrayOfTypes[i]['java-attributes'][0]['xml-element'].length; j++) { + let property = arrayOfTypes[i]['java-attributes'][0]['xml-element'][j]['$']['name']; + let type = arrayOfTypes[i]['java-attributes'][0]['xml-element'][j]['$']['type']; + if (type === 'java.lang.String' || type === 'java.lang.Boolean') { + propertiesDsl[property] = {}; + propertiesDsl[property].isSelected = false; + propertiesDsl[property].attributeName = property; + propertiesDsl[property].filterValue = ['']; + propertiesDsl[property].filterType = ['']; + propertiesDsl[property].dslPath = []; + propertiesDsl[property].dslPathTree = []; + } + } + let sortedPropertiesDsl = propertiesDsl.sort(function (filter1, filter2) { + if (filter1.attributeName < filter2.attributeName) { + return -1; + } else if (filter1.attributeName > filter2.attributeName) { + return 1; + } else { + return 0; + } + }); + oxmArray[GeneralCommonFunctions.camelToDash(arrayOfTypes[i]['xml-root-element'][0]['$']['name'])] = sortedPropertiesDsl; + } + this.setState({oxmMapping: oxmArray}); + return oxmArray[nodeType]; + } + + runDSL = () => { + console.log("running DSL"); + let paramToPassThrough = ''; + if(this.state.aggregateObjects){ + paramToPassThrough = '/customDsl/built-aggregate/' + btoa('<pre>' + this.state.dslQuery + '</pre>'); + }else{ + paramToPassThrough = '/customDsl/built/' + btoa('<pre>' + this.state.dslQuery + '</pre>'); + } + this.props.history.push(paramToPassThrough); + } + submitEditAndRunDSL = () =>{ + this.setState({ dslQuery: this.state.editModel }, () => this.runDSL()); + } + showEditDSLModal = () => { + console.log("enabling DSL edit modal"); + this.setState({ editModel: this.state.dslQuery, showEditModal: true }); + } + closeEditDSLModal = () => { + console.log("closing DSL edit modal"); + this.setState({ showEditModal: false }); + } + bindEdits = (e) => { + this.setState({ editModel: e.target.value }); + } + populateDSL = (tree, isInit) =>{ + var DSL = ''; + var treeArray = ''; + var treeArrayLength = 0; + if(isInit){ + treeArray = tree; + treeArrayLength = 1; + }else{ + treeArray = tree.children; + treeArrayLength = tree.children.length; + } + for(var k = 0; treeArray && k < treeArrayLength; k++){ + if(k === 0 && treeArrayLength > 1){ + DSL += '['; + } + var node = ''; + if(isInit){ + node = tree; + }else{ + node = treeArray[k]; + } + if(node.data){ + console.log('Node data while rendering DSl path>>',JSON.stringify(node.data)); + DSL += node.data.name; + let propState=false; + if(node.data.details){ + var tempAttributeString = ''; + var selectedAttributeCount = 0; + for (var key in node.data.details.attrDetails){ + if (node.data.details.attrDetails[key].isSelected){ + selectedAttributeCount++; + let aliasWithProp=node.data.details.attrDetails[key].attributeName; + if(node.data.details.attrDetails[key].alias){ + aliasWithProp= aliasWithProp+'\' as \''+node.data.details.attrDetails[key].alias; + } + if(selectedAttributeCount === 1){ + tempAttributeString += '{\'' + aliasWithProp +'\''; + propState=true; + }else{ + tempAttributeString += ',\'' + aliasWithProp + '\''; + } + } + } + if(selectedAttributeCount === Object.keys(node.data.details.attrDetails).length){ + DSL+= '*'; + } + if((selectedAttributeCount < Object.keys(node.data.details.attrDetails).length) && propState){ + DSL += tempAttributeString + '}'; + } + for (var key in node.data.details.attrDetails){ + if(node.data.details.attrDetails[key].filterValue && node.data.details.attrDetails[key].filterValue[0] !==''){ + DSL += '(\'' + node.data.details.attrDetails[key].attributeName + '\','; + let dslValues=''; + for(var indx=0; indx<node.data.details.attrDetails[key].filterValue.length; indx++){ + dslValues=(indx>0) ? dslValues+',':dslValues; + if(this.state.enableRealTime && node.data.details.attrDetails[key].filterType && node.data.details.attrDetails[key].filterType[indx]){ + dslValues += node.data.details.attrDetails[key].filterType[indx]+'(\''+ node.data.details.attrDetails[key].filterValue[indx] + '\')'; + }else{ + dslValues +='\''+node.data.details.attrDetails[key].filterValue[indx] + '\''; + } + if(node.data.details.attrDetails[key].filterValue.length-1 === indx){ + dslValues +=')'; + } + } + DSL += dslValues; + } + } + if(node.data.details.dslPath && node.data.details.dslPath.length>0){ + for(var n in node.data.details.dslPath){ + DSL += node.data.details.dslPath[n]; + } + } + } + } + if(node.children){ + DSL+= '>' + this.populateDSL(node); + } + if(k !== treeArrayLength - 1){ + DSL += ','; + } + if(k === treeArrayLength - 1 && treeArrayLength > 1){ + DSL += ']'; + } + } + return DSL; + } + update = (base, source, isInit) => { + + // Assigns the x and y position for the nodes + var treeData = base.state.treemap(base.state.root); + + var DSL = base.populateDSL(treeData, true); + console.log(JSON.stringify("DSL :" + DSL)); + + this.setState({ dslQuery: DSL }); + + // Compute the new tree layout. + var nodes = treeData.descendants(), + links = treeData.descendants().slice(1); + + var list1 = d3.selectAll(".fa") + .filter(".fa-plus") + .style("display", "block"); + + // Normalize for fixed-depth. + nodes.forEach(function(d){ d.y = d.depth * 100}); + // ****************** Nodes section *************************** + + // Update the nodes... + var node = base.state.g.selectAll('g.node') + .data(nodes, function(d) {return d.id }); + + // Enter any new modes at the parent's previous position. + var nodeEnter = node.enter().append('g') + .attr('class', 'node') + .attr("transform", function(d) { + return "translate(" + source.y0 + "," + source.x0 + ")"; + }) + // .on('click', click) + .on('dblclick', doubleClick); + + // Add Circle for the nodes + nodeEnter.append('circle') + .attr('class', 'node') + .attr('r', 1e-6) + .style("fill", "lightsteelblue"); + nodeEnter.append("svg:foreignObject") + .attr("width", 20) + .attr("height", 25) + .attr("y", -14) + .attr("x", -10) + .append("xhtml:span") + .attr("class", function (d) { + let icon = ''; + if(!INVLIST.IS_ONAP){ + icon = 'icon-datanetwork-serverL'; + }else{ + icon = 'browse-fa fa fa-server'; + } + if(d.data.details && d.data.details.parentContainer){ + var iconKey = ((d.data.details.parentContainer).replace(/-/g, '')).toUpperCase(); + if(INVLIST.INVENTORYLIST[iconKey] && INVLIST.INVENTORYLIST[iconKey].icon){ + return INVLIST.INVENTORYLIST[iconKey].icon; + }else{ + return icon; + } + }else{ + return icon; + } + }) + .style("font-size", function (d) { + if (!INVLIST.IS_ONAP){ + return "20px"; + } else { + return "16px"; + } + }) + .attr("id", function (d) {return "nodeIcon" + d.id}) + .style("color", '#387dff') + .style("display", "block") + .style("padding-top",function(d){ + if (!INVLIST.IS_ONAP){ + return "0px"; + } else { + return "8px"; + } + }); + + nodeEnter.append("svg:foreignObject") + .attr("width", 6) + .attr("height", 6) + .attr("y", 10) + .attr("x", -10) + .on('click', function (d) { + if(d.data.details.isRootNode){ + d = null; + base.resetBuilder(); + }else{ + for(var i = 0; d.parent.children && i < d.parent.children.length; i++){ + if (d.parent.children.length > 1 && d.data.name === d.parent.children[i].data.name){ + d.parent.children.splice(i, 1); + }else if (d.parent.children.length === 1 && d.data.name === d.parent.children[i].data.name){ + d.parent.children = null; + } + } + base.update(base, d); + } + }) + .append("xhtml:span") + .attr("class", "fa fa-minus") + .style("padding-top", "1px") + .style("font-size", function (d){ return "5px";}) + .attr("id", function (d) {return "nodeDelete" + d.data.id}) + .style("color", '#387dff') + .style("display", function (d) {return "block";}); + nodeEnter.append("svg:foreignObject") + .attr("width", 6) + .attr("height", 6) + .attr("y", 10) + .attr("x", 5) + .on('click', function (d) { base.setState({enableModalFeedback: true}, function () {setTimeout(() => {add(d)},1);})}) + .append("xhtml:span") + .attr("class", "fa fa-plus") + .style("padding-top", "1px") + .style("font-size", function (d){ return "5px";}) + .attr("id", function (d) {return "nodeAdd" + d.data.id}) + .style("color", '#387dff'); + nodeEnter.append("svg:foreignObject") + .attr("width", 6) + .attr("height", 6) + .attr("y", -17) + .attr("x", -10) + .on('click', function (d) { edit(d)}) + .append("xhtml:span") + .attr("class", "fa fa-pencil-square") + .style("padding-top", "1px") + .style("font-size", function (d){ return "5px";}) + .attr("id", function (d) {return "nodeEdit" + d.data.id}) + .style("color", '#387dff'); + // Add labels for the nodes + nodeEnter.append("svg:foreignObject") + .attr("width", 60) + .attr("height", 40) + .attr("y", -10) + .attr("x", -75) + .append("xhtml:span") + .append('text') + .attr("dy", ".35em") + .attr("x", function(d) { + return d.children ? -13 : 13; + }) + .text(function(d) { return d.data.name; }) + .style("float","right") + .style("color", '#000000'); + + // UPDATE + var nodeUpdate = nodeEnter.merge(node); + var postNodeDrawnCallBack = function (d){ + if(!isInit && base.state.autoZoomEnabled || d.data.details.isRootNode){ + base.state.zoomFit(); + } + } + // Transition to the proper position for the node + nodeUpdate.transition() + .duration(base.state.duration) + .attr("transform", function(d) { + return "translate(" + d.y + "," + d.x + ")" + }).on("end", postNodeDrawnCallBack); + + // Update the node attributes and style + nodeUpdate.select('circle.node') + .attr('r', 11) + .style("fill", "lightsteelblue") + .attr('cursor', 'pointer'); + + + // Remove any exiting nodes + var nodeExit = node.exit().transition() + .duration(base.state.duration) + .attr("transform", function(d) { + return "translate(" + source.y + "," + source.x + ")"; + }) + .remove(); + + // On exit reduce the node circles size to 0 + nodeExit.select('circle') + .attr('r', 1e-6); + + // On exit reduce the opacity of text labels + nodeExit.select('text') + .style('fill-opacity', 1e-6); + + // ****************** links section *************************** + + // Update the links... + var link = base.state.g.selectAll('path.link') + .data(links, function(d) { return d.id; }); + + // Enter any new links at the parent's previous position. + var linkEnter = link.enter().insert('path', "g") + .attr("class", "link") + .attr('d', function(d){ + var o = {x: source.x0, y: source.y0} + return diagonal(o, o) + }); + + // UPDATE + var linkUpdate = linkEnter.merge(link); + + // Transition back to the parent element position + linkUpdate.transition() + .duration(base.state.duration) + .attr('d', function(d){ return diagonal(d, d.parent) }); + + // Remove any exiting links + var linkExit = link.exit().transition() + .duration(base.state.duration) + .attr('d', function(d) { + var o = {x: source.x, y: source.y} + return diagonal(o, o) + }) + .remove(); + + // Store the old positions for transition. + nodes.forEach(function(d){ + d.x0 = d.x; + d.y0 = d.y; + }); + + // Creates a curved (diagonal) path from parent to the child nodes + function diagonal(s, d) { + var path = 'M ' + s.y + ' ' + s.x + ' C ' + ((s.y + d.y) / 2) + ' ' + s.x + ' ' + (s.y + d.y) / 2 + ' ' + d.x + ' ' + d.y + ' ' + d.x; + return path + } + base.state.svg.on("dblclick.zoom", null); + // Toggle children on click. + function add(d){ + base.populateEdgeRules(d.data.name,base.state.edgeRules); + if(!d.children){ + d.children = []; + d.data.children = []; + } + base.setState({ + selectedNode: d, + showNodeModal: true, + enableModalFeedback: false + }); + + } + function edit(d){ + console.log("object editing: " + d); + var nodeDetails = base.state.nodeDetails; + //set up node details to have the node to edit + if(d.data.details.isRootNode && base.props.match.params.type){ + var attributes = GeneralCommonFunctions.getFilteringOptions(d.data.details.nodeType); + if(Object.keys(attributes).length > 0){ + nodeDetails[0] = {}; + nodeDetails[0].isRootNode = true; + nodeDetails[0].nodeType = base.props.match.params.type; + nodeDetails[0].isSelected = true; + nodeDetails[0].attrDetails = attributes; + if(base.state.initialRootEdit){ + for (var key in nodeDetails[0].attrDetails) { + nodeDetails[0].attrDetails[key].isSelected = true; + } + } + nodeDetails[0].parentContainer = GeneralCommonFunctions.populateContainer(base.props.match.params.type); + for (var key in d.data.details.attrDetails) { + nodeDetails[0].attrDetails[key] = d.data.details.attrDetails[key]; + if(base.state.initialRootEdit){ + nodeDetails[0].attrDetails[key].filterType = []; + nodeDetails[0].attrDetails[key].filterType.push('EQ'); + } + } + } + d.data.details = nodeDetails[0]; + base.setState({ + initialRootEdit: false + }); + }else{ + nodeDetails[0] = d.data.details; + } + base.setState({ + selectedNode: d, + showEditNodeModal: true, + showPathFilterDslBuilder: false + }); + } + function doubleClick(d) { + edit(d); + } + } + selectAll = (nodeKey) =>{ + var nodeDetails = this.state.nodeDetails; + for (var key in nodeDetails[nodeKey].attrDetails) { + nodeDetails[nodeKey].attrDetails[key].isSelected = true; + } + this.setState({nodeDetails: nodeDetails}); + } + deselectAll = (nodeKey) =>{ + var nodeDetails = this.state.nodeDetails; + for (var key in nodeDetails[nodeKey].attrDetails) { + nodeDetails[nodeKey].attrDetails[key].isSelected = false; + } + this.setState({nodeDetails: nodeDetails}); + } + build = (type, propID, attrDetails, preBuiltTree,dslPath,dslPathTree) =>{ + var selected = null; + var treeData; + if(!preBuiltTree && type && (propID || attrDetails)){ + let nodeType = type; + treeData = { + "name": nodeType, + "id": nodeType, + "children": [], + "details":{}, + "dslPath":[], + "dslPathTree":[] + } + treeData.details.includeInOutput = true; + treeData.details.isSelected = true; + treeData.details.isRootNode = true; + treeData.details.nodeType = nodeType; + if(attrDetails){ + treeData.details.attrDetails = attrDetails; + } else{ + treeData.details.attrDetails = {}; + } + if(dslPath && dslPath.length>0 && dslPathTree && dslPathTree.length>0){ + treeData.details.dslPath=dslPath; + treeData.details.dslPathTree=dslPathTree; + } + if(propID){ + let propIds = (propID) ? propID.split(';') : ''; + let propertyValue = ''; + for(var i in propIds){ + let propValue = propIds[i].split(':'); + console.log(propValue[0] + '....' + propValue[1]); + treeData.details.attrDetails[propValue[0]] = {}; + treeData.details.attrDetails[propValue[0]].filterValue=[]; + treeData.details.attrDetails[propValue[0]].filterValue.push(atob(propValue[1]).replace('<pre>','').replace('</pre>','')); + treeData.details.attrDetails[propValue[0]].attributeName = propValue[0]; + treeData.details.attrDetails[propValue[0]].isSelected = true; + } + } + }else if (preBuiltTree){ + treeData = preBuiltTree; + if(treeData.details && treeData.details.dslPathTree && treeData.details.dslPathTree.length>0){ + for(var x=0;x<treeData.details.dslPathTree.length;x++){ + treeData.details.dslPath.push(GeneralCommonFunctions.populatePathDSL(treeData.details.dslPathTree[x],true,true,this.state.enableRealTime)); + } + } + if(treeData.children && treeData.children.length>0){ + for(var x=0;x<treeData.children.length;x++){ + treeData.children[x]=this.updateDslPathValueOnExtract(treeData.children[x]); + } + } + } + + // append the svg object to the body of the page + // appends a 'group' element to 'svg' + // moves the 'group' element to the top left margin + var svg = d3.select("#DSLBuilder"); + // Set the dimensions and margins of the diagram + + var margin = {top: 20, right: 120, bottom: 20, left: 120}, + width = +svg.attr("width") - margin.right - margin.left, + height = +svg.attr("height") - margin.top - margin.bottom; + + var g = svg.append("g") + .attr("transform", "translate(" + + margin.left + "," + margin.top + ")"); + + var duration = 750, + root; + + // declares a tree layout and assigns the size + var treemap = d3.tree().size([height - 200, width]); + + // Assigns parent, children, height, depth + root = d3.hierarchy(treeData, function(d) { return d.children; }); + root.x0 = height / 2; + root.y0 = 0; + + //Zoom functions + function zoom_actions(){ + g.attr("transform", d3.event.transform) + } + //add zoom capabilities + var zoom_handler = d3.zoom() + .on("zoom", zoom_actions); + + zoom_handler(svg); + + function zoomFit() { + var bounds = g.node().getBBox(); + var parent = g.node().parentElement; + if(bounds && parent){ + var fullWidth = parent.clientWidth || parent.parentNode.clientWidth, + fullHeight = parent.clientHeight || parent.parentNode.clientHeight; + var width = bounds.width, + height = bounds.height; + var midX = bounds.x + width / 2, + midY = bounds.y + height / 2; + if (width == 0 || height == 0) return; // nothing to fit + var scale = Math.min((0.95 / Math.max(width / fullWidth, height / fullHeight)), 4); + var translate = [fullWidth / 2 - scale * midX, fullHeight / 2 - scale * midY]; + + var transform = d3.zoomIdentity + .translate(300, translate[1]) + .scale(scale); + svg.transition().duration(350) + .call(zoom_handler.transform, transform); + } + + } + + //Set Default zoom + svg.call(zoom_handler) + .call(zoom_handler.transform, d3.zoomIdentity.translate(80, -1000).scale(4)); + this.setState({ + init: false, + svg: svg, + g: g, + treemap: treemap, + root: root, + duration: duration, + zoomFit: zoomFit + }, ()=>{this.update(this, root, true);}) + + // Collapse the node and all it's children + function collapse(d) { + if(d.children) { + d.children.forEach(collapse) + d.children = null + } + } + } + + updateDslPathValueOnExtract=(treeDataChildren)=>{ + if(treeDataChildren.details && treeDataChildren.details.dslPathTree && treeDataChildren.details.dslPathTree.length>0){ + for(var x=0;x<treeDataChildren.details.dslPathTree.length;x++){ + let dsl=GeneralCommonFunctions.populatePathDSL(treeDataChildren.details.dslPathTree[x],true,true,this.state.enableRealTime); + treeDataChildren.details.dslPath.push(dsl); + } + } + if(treeDataChildren && treeDataChildren.children && treeDataChildren.children.length>0){ + for(var x=0;x<treeDataChildren.children.length;x++){ + treeDataChildren.children[x]=this.updateDslPathValueOnExtract(treeDataChildren.children[x]); + } + } + return treeDataChildren; + } + onTargetMenuOfFilterTypes=(listname,id)=>{ + console.log(listname+'onTargetMenuOfFilterTypes',id); + let keysOfArray=id.split('#'); + let nodekey=keysOfArray[0]; + let attrKey=keysOfArray[1]; + let indx=parseInt(keysOfArray[2]); + let nodeDetails = this.state.nodeDetails; + let node = nodeDetails[nodekey]; + if(!node.attrDetails){ + node.attrDetails = []; + } + if(!node.attrDetails[attrKey]){ + node.attrDetails[attrKey] = {}; + node.attrDetails[attrKey].isSelected = true; + node.attrDetails[attrKey].filterValue = []; + node.attrDetails[attrKey].filterType = []; + }else{ + let filterTypes=node.attrDetails[attrKey].filterType; + filterTypes[indx]=listname; + node.attrDetails[attrKey].filterType=filterTypes; + } + nodeDetails[nodekey] = node; + // update the state with the new array of traverse to nodes + this.setState({ nodeDetails: nodeDetails }); + }; + filterTags = (key,property,state) =>{ + let filterTags =''; + let filters=''; + state=true;//always enable, in future if wants to disable remove this line + if(APERTURE_SERVICE && this.state.enableRealTime){ + let nodeDetails = this.state.nodeDetails; + let node = nodeDetails[key]; + filterTags= Object.keys(Object.keys(node.attrDetails[property].filterType)).map((indx) =>{ + let selectedFilter=(node.attrDetails[property].filterType[indx]!=='')?node.attrDetails[property].filterType[indx]:this.state.filterTypeDisplay; + return <div style={{margin:'0px 0px 0px 5px'}}> + <label> + <FilterTypes param={this.state} + selectedFilter={selectedFilter} + id={key+'#'+property+'#'+indx} + onMenuSelect={this.onTargetMenuOfFilterTypes} + state={!state}/> + </label> + </div> + }); + filters= <Col md={4} className='removeLeftPadding'>{filterTags}</Col>; + } + return filters; + }; + addOrTemplate=(nodeKey,attrKey,indx)=>{ + let nodeDetails = this.state.nodeDetails; + let node = nodeDetails[nodeKey]; + node.attrDetails[attrKey].filterValue.push(''); + node.attrDetails[attrKey].filterType.push('EQ'); + nodeDetails[nodeKey] = node; + // update the state with the new array of traverse to nodes + this.setState({ nodeDetails: nodeDetails }); + }; + deleteOrTemplate=(nodeKey,attrKey,index)=>{ + let nodeDetails = this.state.nodeDetails; + let node = nodeDetails[nodeKey]; + let filterValuesArray=node.attrDetails[attrKey].filterValue; + let filterTypeArray=node.attrDetails[attrKey].filterType; + filterValuesArray.splice(index,1); + filterTypeArray.splice(index,1); + node.attrDetails[attrKey].filterValue=filterValuesArray; + node.attrDetails[attrKey].filterType=filterTypeArray; + nodeDetails[nodeKey] = node; + this.setState({ nodeDetails: nodeDetails }); + } + toggleRealTimeAnalysisCallback=(checked)=>{ + console.log('toggleRealTimeAnalysisCallback>>>>',checked); + sessionStorage.setItem(ENVIRONMENT + 'ENABLE_ANALYSIS', !checked); + this.baseState.enableRealTime=!checked; + this.baseState.init= true; + this.setState({...this.baseState},()=>{document.getElementById("DSLBuilder").innerHTML='';}); + } + renderPathFilterBuilder=(key,dslPath,dslPathTree)=>{ + console.log('renderPathFilterBuilder>>>>',key); + let attrDetails=this.state.nodeDetails[key].attrDetails; + let nodeType=this.state.nodeDetails[key].nodeType; + this.setState({showPathFilterDslBuilder: true,pathFilterNodeType: key,pathFilterNodeName:nodeType,pathFIlterAttrDetails: attrDetails,dslPathBuilder: dslPath,dslPathTree:dslPathTree,isEditEnable:false}); + } + /* Load Functions */ + getAndPopulateTreeFromDSL = (dslQuery) =>{ + var treeObject = []; + var payload = {dsl: dslQuery}; + settings['ISAPERTURE'] = true; + commonApi(settings, 'dsl/convert-query-to-tree', 'PUT', payload, 'ConvertQueryToTree') + .then(res => { + console.log('res:' + res.data, 'load'); + if(res.status === 200 || res.status === 404){ + if(res.data.status && (res.data.status !== 200 && res.data.status !== 201 && res.data.status !== 404)){ + this.triggerError(res.data, 'treeLoad'); + }else{ + treeObject = res.data; + this.setState({ + enableTreeLoadBusyFeedback:false, + treeLoadErrMsg: null + }); + console.log("TREE OBJECT: " + JSON.stringify(treeObject)); + //clear the svg + if(this.state.svg){ + this.state.svg.selectAll("*").remove(); + } + //set the init state + this.setState({init: true, dslQuery: '', initialRootEdit: false, nodeDetails: [], selectedNode: null }); + var initNode = this.extractNodeDetails(treeObject.children[0], true); + if(!this.state.treeLoadErrMsg || this.state.treeLoadErrMsg === ''){ + console.log(JSON.stringify(initNode)); + this.build(null, null, null, initNode); + setTimeout(() => { this.state.zoomFit() }, 600); + //scroll to the hidden static modal since svg offsetTop doesnt work for DSLBuilder id + GeneralCommonFunctions.scrollTo('customDslBuilderModel'); + }else{ + this.triggerError(null, 'invalidQuery'); + } + } + }else{ + this.triggerError(res.data, 'treeLoad'); + } + }, error=>{ + if(error.response.status === 404){ + this.setState({enableTreeLoadBusyFeedback:false}); + }else{ + this.triggerError(error.response.data, 'treeLoad'); + } + }).catch(error => { + this.triggerError(error, 'treeLoad'); + }) + + }; + resetBuilder = () => { + if(this.state.svg){ + this.state.svg.selectAll("*").remove(); + } + this.setState({ + init: true, + dslQuery: '', + queryName:'', + queryDescription:'', + initialRootEdit: false, + nodeDetails: [], + selectedNode: null, + treeLoadErrMsg: '', + enableTreeLoadBusyFeedback: false, + aggregateObjects: false + }); + } + triggerError = (error, type) => { + console.error('[CustomDslBuilder.jsx] error : ', JSON.stringify(error)); + let errMsg = ''; + if(error && error.status && error.message){ + errMsg += "Error Occurred: " + error.status + ' - ' +error.message; + }else{ + errMsg += "Error Occurred: " + JSON.stringify(error); + } + console.log(errMsg); + if(type === 'treeLoad' || type === 'invalidQuery'){ + this.resetBuilder(); + var errorMessage = errMsg; + if(type === 'invalidQuery'){ + errorMessage = 'The loaded query uses DSL syntax not supported by the DSL Builder,' + + ' please only load queries compatible with the builder. For more' + + ' information on this error, please contact an administrator.'; + } + this.setState({treeLoadErrMsg: errorMessage}); + GeneralCommonFunctions.scrollTo('treeLoadErrorMessage'); + }else{ + console.log('[CustomDslBuilder.jsx] :: triggerError invoked with invalid type : ' + type); + } + } + validLoadableDSL = (dslQuery) => { + var valid = false; + dslQuery = dslQuery.replace(/\s/g, ''); + valid = dslQuery.indexOf(']>') === -1 && !(new RegExp("LIMIT[0-9]+$").test(dslQuery)); + return valid; + } + loadCallback = (name, description, category, dslQuery, isAggregate, type, queryId, id, templateDetails, makeCall) =>{ + var decodedDslQuery = atob(dslQuery).replace('<pre>','').replace('</pre>',''); + if(this.validLoadableDSL(decodedDslQuery)){ + if(name !== '' && description !== ''){ + this.setState({ + queryName:name, + queryDescription:description, + category:category, + isPublicChecked: type === 'public', + queryId: queryId, + treeLoadErrMsg: null, + aggregateObjects: isAggregate === "true" + }); + console.log("DSL Query Loaded: "+ decodedDslQuery); + console.log("DSL Query Name: "+ name); + console.log("DSL Query Description: "+ description); + console.log("DSL Query ID: "+ queryId); + console.log("DSL Query Category: "+ category); + console.log("DSL Query isAggregate: "+ isAggregate); + console.log("DSL Query type: "+ type); + var treeObject = this.getAndPopulateTreeFromDSL(decodedDslQuery); + } + }else{ + this.triggerError(null, "invalidQuery"); + } + } + extractNodeDetails = (node, isRoot) =>{ + let nodeType = node['node-type']; + let nodeData = { + "name": nodeType, + "id": nodeType, + "children": [], + "details":{} + } + nodeData.details.includeInOutput = node.store; + nodeData.details.isSelected = true; + nodeData.details.isRootNode = isRoot; + nodeData.details.nodeType = nodeType; + var attributes = GeneralCommonFunctions.getFilteringOptions(nodeType); + nodeData.details.attrDetails = attributes; + nodeData.details.parentContainer = GeneralCommonFunctions.populateContainer(nodeType); + if(node.store && !node['requested-props']){ + for(var key in nodeData.details.attrDetails){ + nodeData.details.attrDetails[key].isSelected = true; + } + }else if (node.store && node['requested-props']){ + for(var key in node['requested-props']){ + nodeData.details.attrDetails[key].isSelected = true; + nodeData.details.attrDetails[key].alias=node['requested-props'][key]; + } + } + var isValid = true; + for (var x in node['node-filter']){ + if(isValid){ + for (var y in node['node-filter'][x]) { + if(isValid){ + var attrKey = node['node-filter'][x][y]['key']; + var filter = node['node-filter'][x][y]['filter']; + //If aperture is not turned on and query loaded uses anything besides EQ throw error + if(!APERTURE_SERVICE && filter !== 'EQ'){ + this.triggerError(null, "invalidQuery"); + isValid = false; + } + if(!nodeData.details.attrDetails[attrKey]){ + nodeData.details.attrDetails[attrKey] = {}; + } + if(nodeData.details.attrDetails[attrKey].filterType.length > 0 && nodeData.details.attrDetails[attrKey].filterType[0] === ''){ + nodeData.details.attrDetails[attrKey].filterType = []; + } + if(nodeData.details.attrDetails[attrKey].filterValue.length > 0 && nodeData.details.attrDetails[attrKey].filterValue[0] === ''){ + nodeData.details.attrDetails[attrKey].filterValue = []; + } + //if a filter had no values associated to it throw a not supported error + if(node['node-filter'][x][y]['value'][0]){ + for (var i in node['node-filter'][x][y]['value']){ + nodeData.details.attrDetails[attrKey].filterType.push(filter); + nodeData.details.attrDetails[attrKey].filterValue.push(node['node-filter'][x][y]['value'][i]); + } + if(!nodeData.details.attrDetails[attrKey].attributeName){ + nodeData.details.attrDetails[attrKey].attributeName = attrKey; + } + }else{ + this.triggerError(null, "invalidQuery"); + isValid = false; + } + } + } + } + } + var initWhereNode = null; + if(node['where-filter'].length > 0){ + for(var index in node['where-filter']){ + initWhereNode = this.extractNodeDetails(node['where-filter'][index].children[0], true); + } + } + if(initWhereNode){ + nodeData.details.dslPath=[]; + nodeData.details.dslPathTree=[]; + nodeData.details.dslPathTree.push(initWhereNode); + } + if(node.children.length > 0){ + for(var i = 0; i < node.children.length; i++){ + nodeData.children[i] = this.extractNodeDetails(node.children[i], false); + } + } + return nodeData; + } + + setQueriesState = (savedQueries) =>{ + this.setState({ + loadedQueries: savedQueries + }); + }; + /* End Load Functions */ + render(){ + var toggelRealtimeAnalysis = ''; + if(APERTURE_SERVICE){ + toggelRealtimeAnalysis = <div className='toggleSwitch'><BootstrapSwitchButton + checked={!this.state.enableRealTime} + onlabel='Real Time' + onstyle='danger' + offlabel='Analysis' + offstyle='success' + style='w-100 mx-3' + onChange={(checked) => { + this.toggleRealTimeAnalysisCallback(checked); + }} + /></div> + } + return( + <div> + {toggelRealtimeAnalysis} + <div className="addPadding"> + <div className='row container-fluid my-4'> + <div className='col-lg-9'> + <header className='jumbotron'> + <h1 className='display-2'>Visual Query Builder for <strong>B</strong>uild <strong>Y</strong>our <strong>O</strong>wn <strong>Q</strong>uery</h1> + <p className='lead'> + Visually build your own query, you can click the + icon to add objects to your query, + - icon to remove objects from your query, or the pencil icon/double click to edit attributes. + Single click and drag in the view to pan, use scrollwheel or pinch to zoom. <br/> + </p> + </header> + </div> + </div> + <div className={'addPaddingTop alert alert-danger ' +(this.state.treeLoadErrMsg && this.state.treeLoadErrMsg !== '' ? 'show' : 'hidden')} id="treeLoadErrorMessage" role="alert"> + An error occurred in loading the query. Please see details {this.state.treeLoadErrMsg} + </div> + <CustomDSLSaveLoad loadCallback={this.loadCallback} setQueriesState={this.setQueriesState} ref={this.saveLoadComponent} isDataSteward={this.state.isDataSteward} isDSLBuilder={true}/> + <div className={'row ' + (this.state.init ? 'show' : 'hidden')}> + <button className='btn btn-primary' type='button' onClick={this.initialize.bind(this)}>Start Building (+)</button> + </div> + <div className={'row ' + (!this.state.init ? 'show' : 'hidden')}> + <button className='btn btn-primary' type='button' onClick={this.runDSL}>Run Query</button> + <button className='btn btn-outline-secondary' type='button' onClick={this.showEditDSLModal}>Manual Edit & Run</button> + <div className={'checkbox ' + (GlobalExtConstants.INVLIST.IS_ONAP ? 'hidden' : '' )}> + <label> + <input type="checkbox" checked={this.state.aggregateObjects} onChange={this.onAggregateCheckbox.bind(this)} /> + Aggregate Objects + </label> + <label> + <input type="checkbox" checked={this.state.autoZoomEnabled} onChange={this.onAutoZoomCheckbox.bind(this)} /> + Auto Zoom Enabled + </label> + </div> + </div> + + <div className='static-modal' id='customDslBuilderModel'> + <Modal show={this.state.showNodeModal} onHide={this.closeNodeModal}> + <Modal.Header> + <Modal.Title>Modify Query</Modal.Title> + </Modal.Header> + <Modal.Body> + <form> + {Object.keys(this.state.nodeDetails).sort().map((key, node) => ( + <div className="dsl-panel"> + <Panel> + <Panel.Heading> + <Panel.Title> + <div className={'checkbox ' + (!this.state.init ? 'show' : 'hidden')}> + <label> + <input type="checkbox" checked={this.state.nodeDetails[key].isSelected} value={key} onChange={this.onNodeCheckbox.bind(this)} /> + {this.state.nodeDetails[key].nodeType} + </label> + <Panel.Toggle> + <div className="pull-right">Options</div> + </Panel.Toggle> + </div> + <div className={(this.state.init ? 'show' : 'hidden')}> + <label> + <input type="radio" value={key} checked={this.state.nodeDetails[key].isSelected} onChange={this.onNodeRadio.bind(this)} /> + {" " + this.state.nodeDetails[key].nodeType} + </label> + <Panel.Toggle> + <div className="pull-right">Options</div> + </Panel.Toggle> + </div> + </Panel.Title> + </Panel.Heading> + <Panel.Collapse> + <Panel.Body className='cardwrap'> + <div> + <div style={{float:'right'}}> + <button type='button' className='btn btn-primary pull-right' onClick={()=>this.renderPathFilterBuilder(key)}>Build Path Filter</button> + </div> + </div> + {this.state.nodeDetails[key].dslPath && this.state.nodeDetails[key].dslPath.length>0 && + <Grid fluid={true} className='addPaddingTop'> + <Row className='show-grid addPaddingTop'> + <Col md={10}> + <strong>DSL PATH Filter</strong> + </Col> + <Col md={2} className='removeLeftPadding'> + <strong>Action</strong> + </Col> + </Row> + </Grid>} + <Grid fluid={true}> + {this.state.nodeDetails[key].dslPath && Object.keys(this.state.nodeDetails[key].dslPath).map((indx) => { + return( + <Row className='show-grid'> + <Col md={9}> + <div style={{float:'left',width:'100%',margin:'10px 0px'}}> + {this.state.nodeDetails[key].dslPath[indx]} + </div> + </Col> + <Col md={3}> + <button + className='btn btn-primary' + style={{padding:'2px',margin:'0px 0px 7px 3px'}} + type='button' + onClick={e => {this.editPathNodeModal(key,this.state.nodeDetails[key].dslPath[indx],this.state.nodeDetails[key].dslPathTree[indx],indx)}}>Edit</button> + <button + className='btn btn-primary' + style={{padding:'2px',margin:'0px 0px 7px 3px'}} + type='button' + onClick={e => {this.deletePathNodeModal(key,this.state.nodeDetails[key].dslPath[indx],this.state.nodeDetails[key].dslPathTree[indx],indx)}}>Delete</button> + </Col> + </Row> + ) + })} + </Grid> + <div style={{float:'left'}} className={(GlobalExtConstants.INVLIST.IS_ONAP ? 'hidden' : '' )}> + <button type='button' className='btn btn-outline-primary pull-right' onClick={()=>this.deselectAll(key)}>Deselect All</button> + <button type='button' className='btn btn-primary pull-right' onClick={()=>this.selectAll(key)}>Select All</button> + </div> + <Grid fluid={true} className='addPaddingTop'> + <Row className='show-grid addPaddingTop'> + <Col md={(this.state.enableRealTime)?4:6} className={(GlobalExtConstants.INVLIST.IS_ONAP ? 'hidden' : '' )}> + <strong>Include in Output</strong> + </Col> + {APERTURE_SERVICE && this.state.enableRealTime && <Col md={4} className='removeLeftPadding'> + <strong>Filter Types</strong> + </Col>} + <Col md={(this.state.enableRealTime)?4:6} className='removeLeftPadding'> + <strong>Filter By (Optional)</strong> + </Col> + </Row> + {Object.keys(this.state.nodeDetails[key].attrDetails).sort().map((attrKey, attr) => { + return( + <Row className='show-grid'> + <Col md={(this.state.enableRealTime)?4:6} className={(GlobalExtConstants.INVLIST.IS_ONAP ? 'hidden' : '' )}> + <div className="checkbox"> + <label> + <input type="checkbox" checked={this.state.nodeDetails[key].attrDetails + && this.state.nodeDetails[key].attrDetails[attrKey] + && this.state.nodeDetails[key].attrDetails[attrKey].isSelected } + value={key + "|" + attrKey} onChange={this.onAttributeCheckbox.bind(this)} /> + {attrKey} + </label> + </div> + </Col> + {this.filterTags(key,attrKey,this.state.nodeDetails[key].attrDetails[attrKey].isSelected)} + <Col md={(this.state.enableRealTime)?4:6} className='removeLeftPadding'> + {Object.keys(this.state.nodeDetails[key].attrDetails[attrKey].filterValue).map((indx) =>{ + return( + <div> + {this.state.nodeDetails[key].attrDetails[attrKey].filterValue[indx] ==='' && <input type="text" + placeholder={"Enter " + attrKey } + className='inputFilter' + onBlur={(e)=>{this.onFilterValueChange(e, key, attrKey,indx);}} + /> + } + {this.state.nodeDetails[key].attrDetails[attrKey].filterValue[indx] !=='' && <input type="text" + onChange={(e)=>{this.onFilterValueChange(e, key, attrKey,indx);}} + placeholder={"Enter " + attrKey } + className='inputFilter' + value={this.state.nodeDetails[key].attrDetails[attrKey].filterValue[indx]} + /> + } + {indx == 0 && <button + className={(this.state.nodeDetails[key].attrDetails[attrKey].filterValue[indx] !=='')?'btn btn-primary':'btn btn-secondary'} + style={{padding:'2px',margin:'0px 0px 7px 3px'}} + disabled={this.state.nodeDetails[key].attrDetails[attrKey].filterValue[indx]===''} + type='button' + onClick={e => {this.addOrTemplate(key,attrKey,indx)}}>+</button>} + {indx > 0 && <button + style={{padding:'2px',margin:'0px 0px 7px 3px'}} + id={'delete-'+indx} + className='btn btn-danger' + type='button' + onClick={e => {this.deleteOrTemplate(key,attrKey,indx)}}>x</button>} + + </div> + ) + })} + + </Col> + </Row> + ); + } + )} + </Grid> + </Panel.Body> + </Panel.Collapse> + </Panel> + </div> + ))} + </form> + <div className={this.state.showPathFilterDslBuilder ? 'show' : 'hidden'}> + <Modal show={this.state.showPathFilterDslBuilder} onHide={!this.state.showPathFilterDslBuilder} style={{width:'100%'}}> + <Modal.Header> + <Modal.Title>Build DSL Path</Modal.Title> + </Modal.Header> + <Modal.Body style={{overflow:'scroll'}}> + <PathFilterDslBuilder nodeType={this.state.pathFilterNodeType} + nodeName={this.state.pathFilterNodeName} + attrDetails={this.state.pathFIlterAttrDetails} + closePathNodeModal={this.closePathNodeModal} + submitPathNodeModal={this.submitPathNodeModal} + showPathFilterDslBuilder={this.state.showPathFilterDslBuilder} + dslPath={this.state.dslPathBuilder} + dslPathTree={this.state.dslPathTree} + isEditEnable={this.state.isEditEnable} + pathFilterIndex={this.state.pathFilterIndex}/> + </Modal.Body> + </Modal> + </div> + </Modal.Body> + <Modal.Footer> + <Button onClick={this.closeNodeModal}>Close</Button> + <Button onClick={this.submitNodeModal}>Submit</Button> + </Modal.Footer> + </Modal> + </div> + <div className='static-modal' id='editNodeModel'> + <Modal show={this.state.showEditNodeModal} onHide={this.closeEditNodeModal}> + <Modal.Header> + <Modal.Title>Modify Node</Modal.Title> + </Modal.Header> + <Modal.Body> + <form> + <div className="dsl-panel"> + <Panel> + <Panel.Heading> + <Panel.Title> + <div> + <label>{this.state.selectedNode + && this.state.selectedNode.data + && this.state.selectedNode.data.details ? + this.state.selectedNode.data.details.nodeType + : "" + } + </label> + </div> + </Panel.Title> + </Panel.Heading> + <Panel.Body className='cardwrap'> + <Grid fluid={true} className='addPaddingTop'> + <Row className='show-grid addPaddingTop'> + <div style={{float:'right'}}> + <button type='button' className='btn btn-primary pull-right' onClick={()=>this.renderPathFilterBuilder(0)}>Build Path Filter</button> + </div> + </Row> + {this.state.selectedNode + && this.state.selectedNode.data + && this.state.selectedNode.data.details + && this.state.nodeDetails[0] + && this.state.nodeDetails[0].dslPath && this.state.nodeDetails[0].dslPath.length>0 && + <Row className='show-grid addPaddingTop'> + <Col md={10}> + <strong>DSL PATH Filter</strong> + </Col> + <Col md={2} className='removeLeftPadding'> + <strong>Action</strong> + </Col> + </Row>} + </Grid> + {this.state.selectedNode + && this.state.selectedNode.data + && this.state.selectedNode.data.details + && this.state.nodeDetails[0] + && this.state.nodeDetails[0].dslPath && Object.keys(this.state.nodeDetails[0].dslPath).map((indx) => { + return( + <Row className='show-grid'> + <Col md={9}> + <div style={{float:'left',width:'100%',margin:'10px 0px'}}> + {this.state.nodeDetails[0].dslPath[indx]} + </div> + </Col> + <Col md={3}> + <button + className='btn btn-primary' + style={{padding:'2px',margin:'0px 0px 7px 3px'}} + type='button' + onClick={e => {this.editPathNodeModal(0,this.state.nodeDetails[0].dslPath[indx],this.state.nodeDetails[0].dslPathTree[indx],indx)}}>Edit</button> + <button + className='btn btn-primary' + style={{padding:'2px',margin:'0px 0px 7px 3px'}} + type='button' + onClick={e => {this.deletePathNodeModal(0,this.state.nodeDetails[0].dslPath[indx],this.state.nodeDetails[0].dslPathTree[indx],indx)}}>Delete</button> + </Col> + </Row> + ) + })} + <div style={{float:'left'}} className={(GlobalExtConstants.INVLIST.IS_ONAP ? 'hidden' : '' )}> + <button type='button' className='btn btn-outline-primary pull-right' onClick={()=>this.deselectAll(0)}>Deselect All</button> + <button type='button' className='btn btn-primary pull-right' onClick={()=>this.selectAll(0)}>Select All</button> + </div> + <Grid fluid={true} className='addPaddingTop'> + <Row className='show-grid addPaddingTop'> + <Col md={(this.state.enableRealTime)?4:6} className={(GlobalExtConstants.INVLIST.IS_ONAP ? 'hidden' : '' )}> + <strong>Include in Output</strong> + </Col> + {this.state.enableRealTime && <Col md={4} className='removeLeftPadding'> + <strong>Filter Types</strong> + </Col>} + <Col md={(this.state.enableRealTime)?4:6} className='removeLeftPadding'> + <strong>Filter By (Optional)</strong> + </Col> + </Row> + {this.state.selectedNode + && this.state.selectedNode.data + && this.state.selectedNode.data.details + && this.state.nodeDetails[0] + && Object.keys(this.state.nodeDetails[0].attrDetails).sort().map((attrKey, attr) => { + return( + <Row className='show-grid'> + <Col md={(this.state.enableRealTime)?4:6} className={(GlobalExtConstants.INVLIST.IS_ONAP ? 'hidden' : '' )}> + <div className="checkbox"> + <label> + <input type="checkbox" checked={this.state.nodeDetails[0].attrDetails + && this.state.nodeDetails[0].attrDetails[attrKey] + && this.state.nodeDetails[0].attrDetails[attrKey].isSelected } + value={0 + "|" + attrKey} onChange={this.onAttributeCheckbox.bind(this)} /> + {attrKey} + </label> + </div> + </Col> + {this.filterTags(0,attrKey, this.state.nodeDetails[0].attrDetails[attrKey].isSelected)} + <Col md={(this.state.enableRealTime)?4:6} className='removeLeftPadding'> + {Object.keys(this.state.nodeDetails[0].attrDetails[attrKey].filterValue).map((indx) =>{ + return( + <div> + + {this.state.nodeDetails[0].attrDetails[attrKey].filterValue[indx] ==='' && <input type="text" + placeholder={"Enter " + attrKey } + className='inputFilter' + onBlur={(e)=>{this.onFilterValueChange(e, 0, attrKey, indx);}} + /> + } + {this.state.nodeDetails[0].attrDetails[attrKey].filterValue[indx] !=='' && <input type="text" + onChange={(e)=>{this.onFilterValueChange(e, 0, attrKey,indx);}} + placeholder={"Enter " + attrKey } + className='inputFilter' + value={this.state.nodeDetails[0].attrDetails[attrKey].filterValue[indx]} + /> + } + {indx == 0 && <button + className={(this.state.nodeDetails[0].attrDetails[attrKey].filterValue[indx]!=='')?'btn btn-primary':'btn btn-secondary'} + style={{padding:'2px',margin:'0px 0px 7px 3px'}} + disabled={this.state.nodeDetails[0].attrDetails[attrKey].filterValue[indx]===''} + type='button' + onClick={e => {this.addOrTemplate(0 ,attrKey,indx)}}>+</button>} + {indx > 0 && <button + style={{padding:'2px',margin:'0px 0px 7px 3px'}} + id={'delete-'+indx} + className='btn btn-danger' + type='button' + onClick={e => {this.deleteOrTemplate(0 ,attrKey,indx)}}>x</button>} + + </div> + ) + })} + + </Col> + </Row> + ); + } + )} + </Grid> + </Panel.Body> + </Panel> + </div> + </form> + <div className={(this.state.showPathFilterDslBuilder && this.state.showEditNodeModal) ? 'show' : 'hidden'}> + <Modal show={this.state.showPathFilterDslBuilder} onHide={!this.state.showPathFilterDslBuilder} style={{width:'100%'}}> + <Modal.Header> + <Modal.Title>Build DSL Path</Modal.Title> + </Modal.Header> + <Modal.Body style={{overflow:'scroll'}}> + <PathFilterDslBuilder nodeType={this.state.pathFilterNodeType} + nodeName={this.state.pathFilterNodeName} + attrDetails={this.state.pathFIlterAttrDetails} + closePathNodeModal={this.closePathNodeModal} + submitPathNodeModal={this.submitPathNodeModal} + showPathFilterDslBuilder={this.state.showPathFilterDslBuilder} + dslPath={this.state.dslPathBuilder} + dslPathTree={this.state.dslPathTree} + isEditEnable={this.state.isEditEnable} + pathFilterIndex={this.state.pathFilterIndex}/> + </Modal.Body> + </Modal> + </div> + </Modal.Body> + <Modal.Footer> + <Button onClick={this.closeEditNodeModal}>Close</Button> + <Button onClick={this.submitEditNodeModal}>Submit</Button> + </Modal.Footer> + </Modal> + </div> + <div className='static-modal'> + <Modal show={this.state.showEditModal} onHide={this.closeEditDSLModal}> + <Modal.Header> + <Modal.Title>Edit DSL Query</Modal.Title> + </Modal.Header> + <Modal.Body> + <form> + <FormGroup controlId="dslQuery"> + <ControlLabel>DSL Query</ControlLabel> + <FormControl onChange={this.bindEdits.bind(this)} value={this.state.editModel} componentClass="textarea" placeholder="Enter DSL Query" /> + </FormGroup> + </form> + </Modal.Body> + <Modal.Footer> + <Button onClick={this.closeEditDSLModal}>Close</Button> + <Button onClick={this.submitEditAndRunDSL}>Submit</Button> + </Modal.Footer> + </Modal> + </div> + <div> + <div className={'card-header ' + (this.state.queryName && this.state.queryName !== '' ? 'show' : 'hidden')}> + <div> + <h3>{this.state.queryName}</h3> + </div> + </div> + <div className={'card-header ' + (this.state.queryDescription && this.state.queryDescription !== '' ? 'show' : 'hidden')}> + <div> + <h4>{this.state.queryDescription}</h4> + </div> + </div> + <div className={'card-header ' + (this.state.dslQuery && this.state.dslQuery !== '' ? 'show' : 'hidden')}> + <div> + <h4><strong>DSL Query: </strong><span className='pre-wrap-text'>{this.state.dslQuery}</span></h4> + </div> + </div> + </div> + {this.state.enableModalFeedback && <Spinner loading={true}><span height="100%" width="100%"></span></Spinner>} + <svg id='DSLBuilder' width='1800' height='800'></svg> + </div> + </div> + ); + } +} + +export default CustomDslBuilder; diff --git a/src/app/byoq/PathFilterDslBuilder.jsx b/src/app/byoq/PathFilterDslBuilder.jsx new file mode 100644 index 0000000..2c6e7bb --- /dev/null +++ b/src/app/byoq/PathFilterDslBuilder.jsx @@ -0,0 +1,1105 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React, {Component} from 'react'; +import Modal from 'react-bootstrap/lib/Modal'; +import Grid from 'react-bootstrap/lib/Grid'; +import FormGroup from 'react-bootstrap/lib/FormGroup'; +import FormControl from 'react-bootstrap/lib/FormControl'; +import ControlLabel from 'react-bootstrap/lib/ControlLabel'; +import Button from 'react-bootstrap/lib/Button'; +import {GlobalExtConstants} from 'utils/GlobalExtConstants.js'; +import Spinner from 'utils/SpinnerContainer.jsx'; +import Row from 'react-bootstrap/lib/Row'; +import Col from 'react-bootstrap/lib/Col'; +import Panel from 'react-bootstrap/lib/Panel'; +import Tooltip from 'react-bootstrap/lib/Tooltip'; +import FilterTypes from 'generic-components/filter/components/FilterTypes.jsx'; +import BootstrapSwitchButton from 'bootstrap-switch-button-react'; +import {GeneralCommonFunctions} from 'utils/GeneralCommonFunctions.js'; +import * as d3 from "d3"; +import 'd3-selection-multi'; + + +let EDGERULES = GlobalExtConstants.EDGERULES; +let OXM = GlobalExtConstants.OXM; +let INVLIST = GlobalExtConstants.INVLIST; +let ENVIRONMENT = GlobalExtConstants.ENVIRONMENT; +let APERTURE_SERVICE = JSON.parse(sessionStorage.getItem(ENVIRONMENT + 'APERTURE_SERVICE')); + +let nodeTypes = []; +let properties = null; +let traverseRulesDsl = []; + +const settings = { + 'NODESERVER': INVLIST.NODESERVER, + 'PROXY': INVLIST.PROXY, + 'PREFIX': INVLIST.PREFIX, + 'VERSION': INVLIST.VERSION, + 'USESTUBS': INVLIST.useStubs +}; +class PathFilterDslBuilder extends Component { + constructor(props) { + console.log('PathFilter props>>>>',props); + super(props); + APERTURE_SERVICE=JSON.parse(sessionStorage.getItem(ENVIRONMENT + 'APERTURE_SERVICE')); + this.state = {edgeRules : null, + showNodeModal: false, + treemap: null, + root: null, + svg: null, + duration: null, + g: null, + selectedNode: null, + traverseToNodes:[], + nodeDetails: [], + dslQuery: '', + dslQueryTree:'', + editModel:'', + showEditModal: false, + zoomFit: null, + autoZoomEnabled: true, + aggregateObjects: false, + init: true, + filterTypeDisplay: 'Filter Type', + selectedfilterType:[], + oxmMapping:null, + closePathNodeModal:true, + submitPathNodeModal:false, + parentNodeType:'', + parentAttrDetails:'', + showPathFilterDslBuilder:false, + dslPath:'', + dslPathTree:null, + isInitialize:true, + treeData:'', + showEditNodeModal:false, + enableRealTime: JSON.parse(sessionStorage.getItem(ENVIRONMENT + 'ENABLE_ANALYSIS')) + } + } + + componentDidMount () { + console.log('Path Filter componentDidMount',JSON.stringify(this.props)); + //this.buildSQLStatementsFromSchema(); + this.processEdgeRules(EDGERULES); + } + componentDidUpdate (nextProps) { + console.log('Path Filter componentDidUpdate>>>>>>>',nextProps); + if(this.state.isInitialize){ + this.props=nextProps; + console.log('this.props>>>>>>>>>>>>>',this.props); + this.setState({submitPathNodeModal:this.props.submitPathNodeModal, + closePathNodeModal:this.props.closePathNodeModal, + parentNodeType:this.props.nodeType, + parentAttrDetails:this.props.attrDetails, + showPathFilterDslBuilder:this.props.showPathFilterDslBuilder, + dslPath:this.props.dslPath, + dslPathTree:this.props.dslPathTree, + isInitialize: false},()=>{ + if(this.props.dslPathTree){ + this.build(this.props.nodeType,null,this.props.attrDetails,this.props.dslPathTree); + }else{ + //this.initialize(this.props.nodeName); + this.setState({showNodeModal: true,isInitialize:false},()=>{this.populateEdgeRules(this.props.nodeName,this.state.edgeRules)}); + } + }); + } + console.log('this.state under Update>>>>>',this.state); + } + componentWillReceiveProps(nextProps) { + console.log('path Filter componentWillReceiveProps>>>>'); + } + initialize = () => { + var nodeDetails = []; + var node = null; + console.log('initializing'); + var id = GeneralCommonFunctions.generateID(); + var nodeTypes = GeneralCommonFunctions.getNodeTypes(); + for (var i = 0; i < nodeTypes.length; i++) { + node = nodeTypes[i] + id; + if(this.props.nodeName === nodeTypes[i]){ + var attributes = GeneralCommonFunctions.getFilteringOptions(nodeTypes[i]); + if(!nodeDetails[node] && Object.keys(attributes).length > 0){ + nodeDetails[node] = {}; + nodeDetails[node].nodeType = nodeTypes[i]; + nodeDetails[node].isSelected = false; + nodeDetails[node].attrDetails = attributes; + nodeDetails[node].parentContainer = GeneralCommonFunctions.populateContainer(nodeTypes[i]); + } + } + } + let nodesSorted = nodeDetails.sort(function (filter1, filter2) { + if (filter1.nodeType < filter2.nodeType) { + return -1; + } else if (filter1.nodeType > filter2.nodeType) { + return 1; + } else { + return 0; + } + }); + console.log('Node Types List' + JSON.stringify(nodesSorted)); + nodeDetails = nodesSorted; + this.setState({ + nodeDetails: nodeDetails, + showNodeModal: true, + isInitialize:false + }); + } + initialLoadWhileClose= ()=>{ + this.setState({showNodeModal: true,isInitialize:false},()=>{this.populateEdgeRules(this.props.nodeName,this.state.edgeRules)}); + } + processEdgeRules = (data) => { + this.setState({ + edgeRules: data.rules + }); + } + closeNodeModal = () =>{ + this.setState({ + showNodeModal: false, + traverseToNodes: [], + selectedNode: null + }); + } + onNodeCheckbox(e) { + var nodeDetails = this.state.nodeDetails; + if (e.target.checked) { + nodeDetails[e.target.value].isSelected = true; + this.selectAll(e.target.value); + }else { + nodeDetails[e.target.value].isSelected = false; + this.deselectAll(e.target.value); + } + // update the state with the new array of traverse to nodes + this.setState({ nodeDetails: nodeDetails }); + } + onNodeRadio(e) { + var nodeDetails = this.state.nodeDetails; + if (e.target.checked) { + nodeDetails[e.target.value].isSelected = true; + this.selectAll(e.target.value); + } + for (var key in nodeDetails) { + if(key != e.target.value && nodeDetails[key].isSelected ){ + nodeDetails[key].isSelected = false; + this.deselectAll(key); + } + } + // update the state with the new array of traverse to nodes + this.setState({ nodeDetails: nodeDetails }); + } + onAutoZoomCheckbox(e) { + var cbValue = false; + if (e.target.checked) { + cbValue = true; + }else { + cbValue = false; + } + this.setState({ autoZoomEnabled: cbValue }); + } + + onAttributeCheckbox(e){//delete + let splitVal = e.target.value.split("|"); + let nodeKey = splitVal[0]; + let attrValue = splitVal[1]; + let nodeDetails = this.state.nodeDetails; + let node = nodeDetails[nodeKey]; + let attribute = null; + if(!node.attrDetails){ + node.attrDetails = []; + } + if(!node.attrDetails[attrValue]){ + node.attrDetails[attrValue] = {}; + node.attrDetails[attrValue].isSelected = true; + node.attrDetails[attrValue].filterValue = []; + node.attrDetails[attrValue].filterType = []; + } + + // check if the check box is checked or unchecked + if (e.target.checked) { + // add the value of the checkbox to nodes array + node.attrDetails[attrValue].isSelected = true; + node.attrDetails[attrValue].filterType[0]='EQ'; + } else { + // or remove the value from the unchecked checkbox from the array + node.attrDetails[attrValue].isSelected = false; + node.attrDetails[attrValue].filterType = ['']; + node.attrDetails[attrValue].filterValue = ['']; + } + nodeDetails[nodeKey] = node; + // update the state with the new array of traverse to nodes + this.setState({ nodeDetails: nodeDetails }); + } + onFilterValueChange(e, nodeKey, attrKey, indx){ + let nodeDetails = this.state.nodeDetails; + let node = nodeDetails[nodeKey]; + if(!node.attrDetails){ + node.attrDetails = []; + } + if(!node.attrDetails[attrKey]){ + node.attrDetails[attrKey] = {}; + node.attrDetails[attrKey].isSelected = true; + node.attrDetails[attrKey].filterValue = []; + node.attrDetails[attrKey].filterType = []; + } + // add the value of the checkbox to nodes array + //node.attrDetails[attrKey].filterValue.push(e.target.value); + let filterValArr=node.attrDetails[attrKey].filterValue; + filterValArr[indx]=e.target.value; + node.attrDetails[attrKey].filterValue=filterValArr; + nodeDetails[nodeKey] = node; + // update the state with the new array of traverse to nodes + this.setState({ nodeDetails: nodeDetails }); + } + submitPathNodeModal= () =>{ + console.log('PathFinder submitPathNodeModal>>>>>',this.props); + this.props.submitPathNodeModal(this.state.dslQuery,this.props.nodeType,this.state.dslQueryTree,this.props.isEditEnable,this.props.pathFilterIndex); + } + submitNodeModal = () =>{ + if(this.state.selectedNode){ + var treeData=this.state.dslQueryTree; + var updatedTreeData=''; + var d = this.state.selectedNode; + for(var node in this.state.nodeDetails){ + if(this.state.nodeDetails[node].isSelected){ + var newNodeObj = { + type: 'node', + name: this.state.nodeDetails[node].nodeType, + id: node, + details: {} + }; + //Creates new Node + Object.assign(newNodeObj.details, this.state.nodeDetails[node]); + var newNode = d3.hierarchy(newNodeObj); + newNode.depth = d.depth + 1; + newNode.height = d.height - 1; + newNode.parent = d; + newNode.id = node; + if(!d.children){ + d.children = []; + } + if(newNodeObj.details){ + var selectedAttributeCount = 0; + for (var key in newNodeObj.details.attrDetails){ + if (newNodeObj.details.attrDetails[key].isSelected){ + selectedAttributeCount++; + } + if(selectedAttributeCount === Object.keys(newNodeObj.details.attrDetails).length){ + newNodeObj.details.includeInOutput = true; + } + } + } + console.log('submit node newNodeObj>>>>>',newNodeObj); + treeData=(updatedTreeData==='')?treeData:updatedTreeData; + updatedTreeData=this.handlingTreeDataWhileAddRemove(treeData,newNodeObj,d.data.id,d.data.name); + d.children.push(newNode); + this.setState({ nodeDetails: [] }); + } + } + this.setState({ + showNodeModal: false, + traverseToNodes: [], + selectedNode: null, + dslQueryTree:updatedTreeData + }, ()=>{this.update(this, d)}); + }else{ + var nodeType = ""; + var attrDetails = null; + for (var key in this.state.nodeDetails) { + if(this.state.nodeDetails[key].isSelected){ + nodeType = this.state.nodeDetails[key].nodeType; + attrDetails = this.state.nodeDetails[key].attrDetails; + } + } + this.build(nodeType, null, attrDetails); + this.setState({ nodeDetails: [], showNodeModal: false, traverseToNodes: [], selectedNode: null }); + } + } + handlingTreeDataWhileAddRemove = (treeData,addObject,id,name)=>{ + if(addObject===''){ + if(treeData.children && treeData.children.length>0){ + for(var y=0;y<treeData.children.length;y++){ + if(treeData.children[y].id=== id && treeData.children[y].name===name){ + treeData.children.splice(y,1); + }else{ + treeData.children[y]=this.handlingTreeDataWhileAddRemove(treeData.children[y],'',id,name); + } + } + } + }else{ + if(treeData.id === id && treeData.name===name){ + if(!treeData.children){ + treeData.children=[]; + } + treeData.children.push(addObject); + }else if(treeData.children && treeData.children.length>0){ + for(var y=0;y<treeData.children.length;y++){ + if(treeData.children[y].id=== id && treeData.children[y].name===name){ + if(!treeData.children[y].children){ + treeData.children[y].children=[]; + } + treeData.children[y].children.push(addObject); + }else{ + treeData.children[y]=this.handlingTreeDataWhileAddRemove(treeData.children[y],addObject,id,name); + } + } + } + } + return treeData; + } + + populateEdgeRules = (nodeType) => { + let nodeDetails=GeneralCommonFunctions.populateEdgeRules(nodeType,this.state.edgeRules); + this.setState({ + nodeDetails: nodeDetails + }); + } + + + closeEditDSLModal = () => { + console.log("closing DSL edit modal"); + this.setState({ showEditModal: false }); + } + submitEditNodeModal = () =>{ + this.update(this, this.state.selectedNode); + this.setState({showEditNodeModal: false}); + } + closeEditNodeModal = () =>{ + this.setState({ + showEditNodeModal: false, + selectedNode: null + }); + } + bindEdits = (e) => { + this.setState({ editModel: e.target.value }); + } + + update = (base, source, isInit) => { + + // Assigns the x and y position for the nodes + var treeData = base.state.treemap(base.state.root); + + var DSL = GeneralCommonFunctions.populatePathDSL(treeData,true,false,this.state.enableRealTime); + console.log(JSON.stringify("DSL :" + DSL)); + + this.setState({ dslQuery: DSL }); + + // Compute the new tree layout. + var nodes = treeData.descendants(), + links = treeData.descendants().slice(1); + + var list1 = d3.selectAll(".fa") + .filter(".fa-plus") + .style("display","block"); + + // Normalize for fixed-depth. + nodes.forEach(function(d){ d.y = d.depth * 100}); + + // ****************** Nodes section *************************** + + // Update the nodes... + var node = base.state.g.selectAll('g.node') + .data(nodes, function(d) {return d.id }); + + // Enter any new modes at the parent's previous position. + var nodeEnter = node.enter().append('g') + .attr('class', 'node') + .attr("transform", function(d) { + return "translate(" + source.y0 + "," + source.x0 + ")"; + }) + // .on('click', click) + .on('dblclick', doubleClick); + + // Add Circle for the nodes + nodeEnter.append('circle') + .attr('class', 'node') + .attr('r', 1e-6) + .style("fill", function(d) { + return d.data.details && d.data.details.includeInOutput ? "lightsteelblue" : "#fff"; + }); + nodeEnter.append("svg:foreignObject") + .attr("width", 20) + .attr("height", 25) + .attr("y", -14) + .attr("x", -10) + .append("xhtml:span") + .attr("class", function (d) { + let icon = ''; + if(!INVLIST.IS_ONAP){ + icon = 'icon-datanetwork-serverL'; + }else{ + icon = 'browse-fa fa fa-server'; + } + if(d.data.details && d.data.details.parentContainer){ + var iconKey = ((d.data.details.parentContainer).replace(/-/g, '')).toUpperCase(); + if(INVLIST.INVENTORYLIST[iconKey] && INVLIST.INVENTORYLIST[iconKey].icon){ + return INVLIST.INVENTORYLIST[iconKey].icon; + }else{ + return icon; + } + }else{ + return icon; + } + }) + .style("font-size", function (d) { + if (!INVLIST.IS_ONAP){ + return "20px"; + } else { + return "16px"; + } + }) + .attr("id", function (d) {return "nodeIcon" + d.id}) + .style("color", '#387dff') + .style("display", "block") + .style("padding-top",function(d){ + if (!INVLIST.IS_ONAP){ + return "0px"; + } else { + return "8px"; + } + }); + + nodeEnter.append("svg:foreignObject") + .attr("width", 6) + .attr("height", 6) + .attr("y", 10) + .attr("x", -10) + .on('click', function (d) { + if(d.data.details.isRootNode){ + d = null; + base.state.svg.selectAll("*").remove(); + base.setState({init: true, dslQuery: '',dslQueryTree:''}); + }else{ + let dslQueryTree=base.state.dslQueryTree; + for(var i = 0; d.parent.children && i < d.parent.children.length; i++){ + if (d.parent.children.length > 1 && d.data.name === d.parent.children[i].data.name){ + d.parent.children.splice(i, 1); + dslQueryTree=base.handlingTreeDataWhileAddRemove(dslQueryTree,'',d.data.id,d.data.name); + base.setState({dslQueryTree:dslQueryTree}); + }else if (d.parent.children.length === 1 && d.data.name === d.parent.children[i].data.name){ + d.parent.children = null; + } + } + base.update(base, d); + } + }) + .append("xhtml:span") + .attr("class", "fa fa-minus") + .style("padding-top", "1px") + .style("font-size", function (d){ return "5px";}) + .attr("id", function (d) {return "nodeDelete" + d.id}) + .style("color", '#387dff') + .style("display", function (d) {return "block";}); + nodeEnter.append("svg:foreignObject") + .attr("width", 6) + .attr("height", 6) + .attr("y", 10) + .attr("x", 5) + .on('click', function (d) { add(d)}) + .append("xhtml:span") + .attr("class", "fa fa-plus") + .style("font-size", function (d){ return "5px";}) + .style("padding-top", "1px") + .attr("id", function (d) {return "nodeAdd" + d.id}) + .style("color", '#387dff'); + nodeEnter.append("svg:foreignObject") + .attr("width", 6) + .attr("height", 6) + .attr("y", -17) + .attr("x", -10) + .on('click', function (d) { edit(d)}) + .append("xhtml:span") + .attr("class", "fa fa-pencil-square") + .style("padding-top", "1px") + .style("font-size", function (d){ return "5px";}) + .attr("id", function (d) {return "nodeEdit" + d.id}) + .style("color", '#387dff'); + // Add labels for the nodes + nodeEnter.append('text') + .attr("dy", ".35em") + .attr("x", function(d) { + return d.children ? -13 : 13; + }) + .attr("text-anchor", function(d) { + return d.children ? "end" : "start"; + }) + .text(function(d) { return d.data.name; }); + + // UPDATE + var nodeUpdate = nodeEnter.merge(node); + var postNodeDrawnCallBack = function (d){ + if(!isInit && base.state.autoZoomEnabled || d.data.details.isRootNode){ + base.state.zoomFit(); + } + } + // Transition to the proper position for the node + nodeUpdate.transition() + .duration(base.state.duration) + .attr("transform", function(d) { + return "translate(" + d.y + "," + d.x + ")" + }).on("end", postNodeDrawnCallBack); + + // Update the node attributes and style + nodeUpdate.select('circle.node') + .attr('r', 11) + .style("fill", function(d) { + return d.data.details && d.data.details.includeInOutput ? "lightsteelblue" : "#fff"; + }) + .attr('cursor', 'pointer'); + + + // Remove any exiting nodes + var nodeExit = node.exit().transition() + .duration(base.state.duration) + .attr("transform", function(d) { + return "translate(" + source.y + "," + source.x + ")"; + }) + .remove(); + + // On exit reduce the node circles size to 0 + nodeExit.select('circle') + .attr('r', 1e-6); + + // On exit reduce the opacity of text labels + nodeExit.select('text') + .style('fill-opacity', 1e-6); + + // ****************** links section *************************** + + // Update the links... + var link = base.state.g.selectAll('path.link') + .data(links, function(d) { return d.id; }); + + // Enter any new links at the parent's previous position. + var linkEnter = link.enter().insert('path', "g") + .attr("class", "link") + .attr('d', function(d){ + var o = {x: source.x0, y: source.y0} + return diagonal(o, o) + }); + + // UPDATE + var linkUpdate = linkEnter.merge(link); + + // Transition back to the parent element position + linkUpdate.transition() + .duration(base.state.duration) + .attr('d', function(d){ return diagonal(d, d.parent) }); + + // Remove any exiting links + var linkExit = link.exit().transition() + .duration(base.state.duration) + .attr('d', function(d) { + var o = {x: source.x, y: source.y} + return diagonal(o, o) + }) + .remove(); + + // Store the old positions for transition. + nodes.forEach(function(d){ + d.x0 = d.x; + d.y0 = d.y; + }); + + // Creates a curved (diagonal) path from parent to the child nodes + function diagonal(s, d) { + var path = 'M ' + s.y + ' ' + s.x + ' C ' + ((s.y + d.y) / 2) + ' ' + s.x + ' ' + (s.y + d.y) / 2 + ' ' + d.x + ' ' + d.y + ' ' + d.x; + return path + } + base.state.svg.on("dblclick.zoom", null); + // Toggle children on click. + function add(d){ + base.populateEdgeRules(d.data.name,base.state.edgeRules); + if(!d.children){ + d.children = []; + d.data.children = []; + } + base.setState({ + selectedNode: d, + showNodeModal: true + }); + + } + function edit(d){ + console.log("object editing: " + d); + var nodeDetails = base.state.nodeDetails; + //set up node details to have the node to edit + nodeDetails[0] = d.data.details; + base.setState({ + selectedNode: d, + showEditNodeModal: true + }); + } + function doubleClick(d) { + edit(d); + } + } + selectAll = (nodeKey) =>{//delete + var nodeDetails = this.state.nodeDetails; + for (var key in nodeDetails[nodeKey].attrDetails) { + nodeDetails[nodeKey].attrDetails[key].isSelected = true; + } + this.setState({nodeDetails: nodeDetails}); + } + deselectAll = (nodeKey) =>{//delete + var nodeDetails = this.state.nodeDetails; + for (var key in nodeDetails[nodeKey].attrDetails) { + nodeDetails[nodeKey].attrDetails[key].isSelected = false; + } + this.setState({nodeDetails: nodeDetails}); + } + build = (type, propID, attrDetails,preBuiltTree) =>{ + console.log('build>>>>>>>>',type); + var selected = null; + var treeData = + { + "name": "complex", + "id": "complex", + "children": [] + }; + if(!preBuiltTree && type && (propID || attrDetails)){ + let nodeType = type; + treeData = { + "name": nodeType, + "id": nodeType, + "children": [], + "details":{} + } + treeData.details.includeInOutput = true; + treeData.details.isSelected = true; + treeData.details.isRootNode = true; + treeData.details.nodeType = nodeType; + if(attrDetails){ + treeData.details.attrDetails = attrDetails; + } else{ + treeData.details.attrDetails = {}; + } + if(propID){ + let propIds = (propID) ? propID.split(';') : ''; + let propertyValue = ''; + for(var i in propIds){ + let propValue = propIds[i].split(':'); + console.log(propValue[0] + '....' + propValue[1]); + treeData.details.attrDetails[propValue[0]] = {}; + treeData.details.attrDetails[propValue[0]].filterValue=[]; + treeData.details.attrDetails[propValue[0]].filterValue.push(atob(propValue[1]).replace('<pre>','').replace('</pre>','')); + treeData.details.attrDetails[propValue[0]].attributeName = propValue[0]; + treeData.details.attrDetails[propValue[0]].isSelected = true; + } + } + }else if (preBuiltTree){ + treeData = preBuiltTree; + } + + // append the svg object to the body of the page + // appends a 'group' element to 'svg' + // moves the 'group' element to the top left margin + var svg = d3.select("#PathDSLBuilder"); + // Set the dimensions and margins of the diagram + var margin = {top: 20, right: 120, bottom: 20, left: 120}, + width = +svg.attr("width") - margin.right - margin.left, + height = +svg.attr("height") - margin.top - margin.bottom; + + var g = svg.append("g") + .attr("transform", "translate(" + + margin.left + "," + margin.top + ")"); + + var duration = 750, + root; + + // declares a tree layout and assigns the size + var treemap = d3.tree().size([height - 200, width]); + // Assigns parent, children, height, depth + root = d3.hierarchy(treeData, function(d) { return d.children; }); + root.x0 = height / 2; + root.y0 = 0; + + //Zoom functions + function zoom_actions(){ + g.attr("transform", d3.event.transform) + } + //add zoom capabilities + var zoom_handler = d3.zoom() + .on("zoom", zoom_actions); + + zoom_handler(svg); + + function zoomFit() { + var bounds = g.node().getBBox(); + var parent = g.node().parentElement; + var fullWidth = parent.clientWidth || parent.parentNode.clientWidth, + fullHeight = parent.clientHeight || parent.parentNode.clientHeight; + var width = bounds.width, + height = bounds.height; + var midX = bounds.x + width / 2, + midY = bounds.y + height / 2; + if (width == 0 || height == 0) return; // nothing to fit + var scale = Math.min((0.95 / Math.max(width / fullWidth, height / fullHeight)), 2); + var translate = [fullWidth / 2 - scale * midX, fullHeight / 2 - scale * midY]; + + var transform = d3.zoomIdentity + .translate(80, translate[1]) + .scale(scale); + svg.transition().duration(350) + .call(zoom_handler.transform, transform); + + } + + //Set Default zoom + svg.call(zoom_handler) + .call(zoom_handler.transform, d3.zoomIdentity.translate(80, -500).scale(2)); + this.setState({ + init: false, + svg: svg, + g: g, + treemap: treemap, + root: root, + duration: duration, + zoomFit: zoomFit, + dslQueryTree: treeData + }, ()=>{this.update(this, root, true);}) + + // Collapse the node and all it's children + function collapse(d) { + if(d.children) { + d.children.forEach(collapse) + d.children = null + } + } + + + } + onTargetMenuOfFilterTypes=(listname,id)=>{ + console.log(listname+'onTargetMenuOfFilterTypes',id); + let keysOfArray=id.split('#'); + let nodekey=keysOfArray[0]; + let attrKey=keysOfArray[1]; + let indx=parseInt(keysOfArray[2]); + let nodeDetails = this.state.nodeDetails; + let node = nodeDetails[nodekey]; + if(!node.attrDetails){ + node.attrDetails = []; + } + if(!node.attrDetails[attrKey]){ + node.attrDetails[attrKey] = {}; + node.attrDetails[attrKey].isSelected = true; + node.attrDetails[attrKey].filterValue = []; + node.attrDetails[attrKey].filterType = []; + }else{ + let filterTypes=node.attrDetails[attrKey].filterType; + filterTypes[indx]=listname; + node.attrDetails[attrKey].filterType=filterTypes; + } + nodeDetails[nodekey] = node; + // update the state with the new array of traverse to nodes + this.setState({ nodeDetails: nodeDetails }); + }; + filterTags = (key,property,state) =>{ + let filterTags =''; + let filters=''; + state=true;//always enable, in future if wants to disable remove this line + if(APERTURE_SERVICE && this.state.enableRealTime){ + let nodeDetails = this.state.nodeDetails; + let node = nodeDetails[key]; + filterTags= Object.keys(Object.keys(node.attrDetails[property].filterType)).map((indx) =>{ + let selectedFilter=(node.attrDetails[property].filterType[indx]!=='')?node.attrDetails[property].filterType[indx]:this.state.filterTypeDisplay; + return <div style={{margin:'0px 0px 0px 5px'}}> + <label> + <FilterTypes param={this.state} + selectedFilter={selectedFilter} + id={key+'#'+property+'#'+indx} + onMenuSelect={this.onTargetMenuOfFilterTypes} + state={!state}/> + </label> + </div> + }); + filters= <Col md={4} className='removeLeftPadding'>{filterTags}</Col>; + } + return filters; + }; + addOrTemplate=(nodeKey,attrKey,indx)=>{ + let nodeDetails = this.state.nodeDetails; + let node = nodeDetails[nodeKey]; + node.attrDetails[attrKey].filterValue.push(''); + node.attrDetails[attrKey].filterType.push('EQ'); + nodeDetails[nodeKey] = node; + // update the state with the new array of traverse to nodes + this.setState({ nodeDetails: nodeDetails }); + }; + deleteOrTemplate=(nodeKey,attrKey,index)=>{ + let nodeDetails = this.state.nodeDetails; + let node = nodeDetails[nodeKey]; + let filterValuesArray=node.attrDetails[attrKey].filterValue; + let filterTypeArray=node.attrDetails[attrKey].filterType; + filterValuesArray.splice(index,1); + filterTypeArray.splice(index,1); + node.attrDetails[attrKey].filterValue=filterValuesArray; + node.attrDetails[attrKey].filterType=filterTypeArray; + nodeDetails[nodeKey] = node; + this.setState({ nodeDetails: nodeDetails }); + } + render(){ + return( + <div id='pathFilterDSLModel'> + <div className="addPadding"> + <div className={'row ' + (!this.state.init ? 'show' : 'hidden')}> + <div className="checkbox" style={{float:'left',width:'70%'}}> + <label> + <input type="checkbox" checked={this.state.autoZoomEnabled} onChange={this.onAutoZoomCheckbox.bind(this)}/> + Auto Zoom Enabled + </label> + </div> + <div style={{float:'right'}}> + <Button onClick={this.props.closePathNodeModal}>Close</Button> + <Button onClick={this.submitPathNodeModal} disabled={(this.state.dslQuery === '')}>Submit</Button> + </div> + </div> + <div className={'row ' + (!this.state.init ? 'show' : 'hidden')}> + <div style={{fontWeight:'bold'}}> + <span>DSL PATH Query :</span> {this.state.dslQuery} + </div> + </div> + <div className={'row ' + ((this.state.dslQuery != '') ? 'hidden' : 'show')}> + <div style={{float:'left'}}> + <button className='btn btn-primary' type='button' onClick={this.initialLoadWhileClose}>Start Building (+)</button> + </div> + <div style={{float:'right'}}> + <Button onClick={this.props.closePathNodeModal}>Close</Button> + <Button onClick={this.submitPathNodeModal} disabled={(this.state.dslQuery === '')}>Submit</Button> + </div> + </div> + </div> + <svg id='PathDSLBuilder' width='1800' height='800'></svg> + <div className='static-modal' id='customDslPathBuilderModel'> + <Modal show={this.state.showNodeModal} onHide={this.closeNodeModal}> + <Modal.Header> + <Modal.Title>Modify Dsl Path Query</Modal.Title> + </Modal.Header> + <Modal.Body> + <form> + {Object.keys(this.state.nodeDetails).sort().map((key, node) => ( + <div className="dsl-panel"> + <Panel> + <Panel.Heading> + <Panel.Title> + <div className={'checkbox ' + (!this.state.init ? 'show' : 'hidden')}> + <label> + <input type="checkbox" checked={this.state.nodeDetails[key].isSelected} value={key} onChange={this.onNodeCheckbox.bind(this)} /> + {this.state.nodeDetails[key].nodeType} + </label> + <Panel.Toggle> + <div className="pull-right">Options</div> + </Panel.Toggle> + </div> + <div className={'form-check ' + (this.state.init ? 'show' : 'hidden')}> + <label className="form-check-label"> + <input className="form-check-input" type="radio" value={key} checked={this.state.nodeDetails[key].isSelected} onChange={this.onNodeRadio.bind(this)} /> + {" " + this.state.nodeDetails[key].nodeType} + </label> + <Panel.Toggle> + <div className="pull-right">Options</div> + </Panel.Toggle> + </div> + </Panel.Title> + </Panel.Heading> + <Panel.Collapse> + <Panel.Body className='cardwrap'> + <Grid fluid={true} className='addPaddingTop'> + <Row className='show-grid addPaddingTop'> + <Col md={(this.state.enableRealTime)?4:6}> + <strong>PROPERTIES</strong> + </Col> + {this.state.enableRealTime && <Col md={4} className='removeLeftPadding'> + <strong>Filter Types</strong> + </Col>} + <Col md={(this.state.enableRealTime)?4:6} className='removeLeftPadding'> + <strong>Filter By (Optional)</strong> + </Col> + </Row> + {Object.keys(this.state.nodeDetails[key].attrDetails).sort().map((attrKey, attr) => { + return( + <Row className='show-grid'> + <Col md={(this.state.enableRealTime)?4:6}> + <div className="checkbox"> + <label> + {attrKey} + </label> + </div> + </Col> + {this.filterTags(key,attrKey,this.state.nodeDetails[key].attrDetails[attrKey].isSelected)} + <Col md={(this.state.enableRealTime)?4:6} className='removeLeftPadding'> + {Object.keys(this.state.nodeDetails[key].attrDetails[attrKey].filterValue).map((indx) =>{ + return( + <div> + {this.state.nodeDetails[key].attrDetails[attrKey].filterValue[indx] ==='' && <input type="text" + placeholder={"Enter " + attrKey } + className='inputFilter' + onBlur={(e)=>{this.onFilterValueChange(e, key, attrKey,indx);}} + /> + } + {this.state.nodeDetails[key].attrDetails[attrKey].filterValue[indx] !=='' && <input type="text" + onChange={(e)=>{this.onFilterValueChange(e, key, attrKey,indx);}} + placeholder={"Enter " + attrKey } + className='inputFilter' + value={this.state.nodeDetails[key].attrDetails[attrKey].filterValue[indx]} + /> + } + {indx == 0 && <button + className={(this.state.nodeDetails[key].attrDetails[attrKey].filterValue[indx] !=='')?'btn btn-primary':'btn btn-secondary'} + style={{padding:'2px',margin:'0px 0px 7px 3px'}} + disabled={this.state.nodeDetails[key].attrDetails[attrKey].filterValue[indx]===''} + type='button' + onClick={e => {this.addOrTemplate(key,attrKey,indx)}}>+</button>} + {indx > 0 && <button + style={{padding:'2px',margin:'0px 0px 7px 3px'}} + id={'delete-'+indx} + className='btn btn-danger' + type='button' + onClick={e => {this.deleteOrTemplate(key,attrKey,indx)}}>x</button>} + + </div> + ) + })} + </Col> + </Row> + ); + } + )} + </Grid> + </Panel.Body> + </Panel.Collapse> + </Panel> + </div> + ))} + </form> + </Modal.Body> + <Modal.Footer> + <Button onClick={this.closeNodeModal}>Close</Button> + <Button onClick={this.submitNodeModal}>Submit</Button> + </Modal.Footer> + </Modal> + </div> + <div className='static-modal' id='editNodeModel'> + <Modal show={this.state.showEditNodeModal} onHide={this.closeEditNodeModal}> + <Modal.Header> + <Modal.Title>Modify Node</Modal.Title> + </Modal.Header> + <Modal.Body> + <form> + <div className="dsl-panel"> + <Panel> + <Panel.Heading> + <Panel.Title> + <div> + <label>{this.state.selectedNode + && this.state.selectedNode.data + && this.state.selectedNode.data.details ? + this.state.selectedNode.data.details.nodeType + : "" + } + </label> + </div> + </Panel.Title> + </Panel.Heading> + <Panel.Body className='cardwrap'> + <Grid fluid={true} className='addPaddingTop'> + <Row className='show-grid addPaddingTop'> + <Col md={(this.state.enableRealTime)?4:6}> + <strong>Include in Output</strong> + </Col> + {this.state.enableRealTime && <Col md={4} className='removeLeftPadding'> + <strong>Filter Types</strong> + </Col>} + <Col md={(this.state.enableRealTime)?4:6} className='removeLeftPadding'> + <strong>Filter By (Optional)</strong> + </Col> + </Row> + {this.state.selectedNode + && this.state.selectedNode.data + && this.state.selectedNode.data.details + && this.state.nodeDetails[0] + && Object.keys(this.state.nodeDetails[0].attrDetails).sort().map((attrKey, attr) => { + return( + <Row className='show-grid'> + <Col md={(this.state.enableRealTime)?4:6}> + <div className="checkbox"> + <label> + {attrKey} + </label> + </div> + </Col> + {this.filterTags(0,attrKey, this.state.nodeDetails[0].attrDetails[attrKey].isSelected)} + <Col md={(this.state.enableRealTime)?4:6} className='removeLeftPadding'> + {Object.keys(this.state.nodeDetails[0].attrDetails[attrKey].filterValue).map((indx) =>{ + return( + <div> + + {this.state.nodeDetails[0].attrDetails[attrKey].filterValue[indx] ==='' && <input type="text" + placeholder={"Enter " + attrKey } + className='inputFilter' + onBlur={(e)=>{this.onFilterValueChange(e, 0, attrKey, indx);}} + /> + } + {this.state.nodeDetails[0].attrDetails[attrKey].filterValue[indx] !=='' && <input type="text" + onChange={(e)=>{this.onFilterValueChange(e, 0, attrKey,indx);}} + placeholder={"Enter " + attrKey } + className='inputFilter' + value={this.state.nodeDetails[0].attrDetails[attrKey].filterValue[indx]} + /> + } + {indx == 0 && <button + className={(this.state.nodeDetails[0].attrDetails[attrKey].filterValue[indx]!=='')?'btn btn-primary':'btn btn-secondary'} + style={{padding:'2px',margin:'0px 0px 7px 3px'}} + disabled={this.state.nodeDetails[0].attrDetails[attrKey].filterValue[indx]===''} + type='button' + onClick={e => {this.addOrTemplate(0 ,attrKey,indx)}}>+</button>} + {indx > 0 && <button + style={{padding:'2px',margin:'0px 0px 7px 3px'}} + id={'delete-'+indx} + className='btn btn-danger' + type='button' + onClick={e => {this.deleteOrTemplate(0 ,attrKey,indx)}}>x</button>} + + </div> + ) + })} + + </Col> + </Row> + ); + } + )} + </Grid> + </Panel.Body> + </Panel> + </div> + </form> + </Modal.Body> + <Modal.Footer> + <Button onClick={this.closeEditNodeModal}>Close</Button> + <Button onClick={this.submitEditNodeModal}>Submit</Button> + </Modal.Footer> + </Modal> + </div> + </div> + ); + } +} + +export default PathFilterDslBuilder; diff --git a/src/app/customQuery/CustomQuery.jsx b/src/app/customQuery/CustomQuery.jsx new file mode 100644 index 0000000..9ff9248 --- /dev/null +++ b/src/app/customQuery/CustomQuery.jsx @@ -0,0 +1,946 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React, { Component } from 'react'; + +import Select from 'react-select'; +import Button from 'react-bootstrap/lib/Button'; +import Row from 'react-bootstrap/lib/Row'; +import Col from 'react-bootstrap/lib/Col'; +import Grid from 'react-bootstrap/lib/Grid'; +import PanelGroup from 'react-bootstrap/lib/PanelGroup'; +import Panel from 'react-bootstrap/lib/Panel'; +import Label from 'react-bootstrap/lib/Label'; +import Collapse from 'react-bootstrap/lib/Collapse'; +import moment from "moment"; +import DatePicker from 'react-datepicker'; +import Modal from 'react-bootstrap/lib/Modal'; +import {ExportExcel} from 'utils/ExportExcel.js'; +import commonApi from 'utils/CommonAPIService.js'; +import {GlobalExtConstants} from 'utils/GlobalExtConstants.js'; +import Spinner from 'utils/SpinnerContainer.jsx'; +import ModelGallery from 'app/model/modelSearch/components/ModelGallery.jsx'; +import ModelCard from 'app/model/modelSearch/components/ModelCard.jsx'; +import OutputToggle from 'generic-components/OutputToggle.jsx'; +import Pagination from 'react-js-pagination'; +import OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger'; +import Tooltip from 'react-bootstrap/lib/Tooltip'; +import {Visualization} from 'generic-components/OutputVisualization.jsx'; +import DownloadRangeModel from 'generic-components/DownloadRangeModel.jsx'; + + + +let PAGINATION_CONSTANT = GlobalExtConstants.PAGINATION_CONSTANT; +let INVLIST = GlobalExtConstants.INVLIST; +let CUSTOMQUERYLIST = GlobalExtConstants.CUSTOMQUERYLIST; +let generateExcels = ExportExcel.generateExcels; +let DOWNLOAD_ALL = GlobalExtConstants.DOWNLOAD_ALL; +let DOWNLOAD_TOOLTIP = GlobalExtConstants.DOWNLOAD_TOOLTIP; + + +let dropdownList = null; +let header = null; + +const inputClasses = ['form-control']; + +class CustomQuery extends Component { + nodeResults = ''; + typeOfCall = true; + downloadTooltip = DOWNLOAD_TOOLTIP; + downloadAllTooltip = 'Downloads First ' + DOWNLOAD_ALL + ' Results'; + downloadRangeTooltip= 'Download Results By Custom Range Selection'; + historyStackString = ''; + state = { + queryPlaceHolder: 'Please Select a Query', + placeholder: 'Please Select a Query', + reqPropPlaceholder: 'Please Enter Required Query or Property', + optionalPropPlaceholder: 'Please Enter Optional Query or Property', + displayReqProps: 'hidden', + startNode: '', + reqProps: '', + optionalProps: '', + disableInputs: true, + query: '', + showText: false, + description: '', + additionalInfo: '', + displayDescription: 'hidden', + customQueryOptions: null, + formIsValid: false, + nodes: [], + displayNodes: 'hidden', + multipleNodes: '', + isLoading: false, + isInitialLoad: true, + activePage: 1, + totalResults: 0, + showPagination: false, + showResults: false, + errorResults:false, + errorMessage: '', + noResults: false, + displayOptionalProps: 'hidden', + showHistoryModal:false, + startDate: moment(), + currentPayload: null, + viewName: localStorage.getItem(GlobalExtConstants.ENVIRONMENT + '_' + sessionStorage.getItem(GlobalExtConstants.ENVIRONMENT + 'userId') + '_viewPreference') || 'CardLayout', + res: null, + visualAddition: false, + nodeDisplay: '', + showNodeModal: false, + focusedNode: {}, + historyType: 'cq', + focusedNodeUri: 0, + focusedNodeType: '', + historyParams: '', + showModelOptions: false, + enableCalendar: true, + resetColumnFilters: true, + isPageNumberChange: false, + totalPages: 0, + pageRange: 1, + showDownloadResultsModal: false, + errorDownloadResults:false, + downloadErrorMsg: '', + enableModelBusyFeedback:false, + downloadCount:DOWNLOAD_ALL, + defaultViewName: localStorage.getItem(GlobalExtConstants.ENVIRONMENT + '_' + sessionStorage.getItem(GlobalExtConstants.ENVIRONMENT + 'userId') + '_viewPreference') || 'CardLayout' + } + + componentWillMount () { + console.log('componentWillMount'); + sessionStorage.setItem(GlobalExtConstants.ENVIRONMENT + 'ENABLE_ANALYSIS', false); + if(!this.props.location.historyStackString){ + this.props.location.historyStackString = this.props.location.pathname + ',,Origin||'; + }else{ + this.historyStackString = this.props.location.historyStackString; + } + let queryList = Object.values(CUSTOMQUERYLIST.CUSTOMQUERYLIST); + dropdownList = queryList.sort(function (filter1, filter2) { + if (filter1.value < filter2.value) { + return -1; + } else if (filter1.value > filter2.value) { + return 1; + } else { + return 0; + } + }); + }; + onInputChangeHandler (){ + console.log('onInputChangeHandler of select-Clear'); + this.setState({ + placeholder: 'Please Select A Query', + queryPlaceHolder: 'Please Select A Query', query: '', + reqPropPlaceholder: 'Please Enter Required Query or Property', + optionalPropPlaceholder: 'Please Enter Optional Query or Property', + startNode: '', + reqProps: '', + optionalProps: '', + disableInputs: true, + displayDescription: 'hidden', + nodes: [], + displayNodes: 'hidden', + multipleNodes: '', + isLoading: false, + displayOptionalProps: 'hidden', + formIsValid: false, + showPagination: false, + showResults: false, + errorResults: false, + errorMessage: '', + noResults: false, + isInitialLoad: true + }); + } + + updateSelectedHandler = (selectedOption) => { + + const value = selectedOption === null ? 'Please Select A Query' : selectedOption.value + if(selectedOption){ + console.log('updateSelectedHandler.reqPropPlaceholder: ' + selectedOption.reqPropPlaceholder); + console.log('updateSelectedHandler.value: ' + selectedOption.value); + this.setState({ placeholder: selectedOption.placeholder }); + this.setState({ displayReqProps: selectedOption.reqPropPlaceholder ? 'show' : 'hidden' }); + this.setState({ displayOptionalProps: selectedOption.optionalPropPlaceholder ? 'show' : 'hidden'}); + this.setState({ reqPropPlaceholder: selectedOption.reqPropPlaceholder }); + this.setState({ optionalPropPlaceholder: selectedOption.optionalPropPlaceholder}); + this.setState({ disableInputs: false }); + this.setState({ query: value }); + this.setState({ description: selectedOption.description.summary }); + this.setState({ additionalInfo: selectedOption.description.additionalInfo }); + this.setState({ displayDescription: 'show' }); + this.setState({ startNode: ''}); + this.setState({ reqProps: ''}); + this.setState({ optionalProps: ''}); + this.setState({ queryPlaceHolder: value}); + }else{ + /*this.setState({ queryPlaceHolder: value, query: '', + reqPropPlaceholder: this.state.reqPropPlaceholder,optionalPropPlaceholder: this.state.optionalPropPlaceholder, + startNode: '',reqProps: '', optionalProps: ''});*/ + this.onInputChangeHandler(); + } + } + checkValidity() { + let isValid = true; + isValid = this.state.startNode.trim().length > 1 && isValid; + if (this.state.reqPropPlaceholder) { + console.log('Checking if reqProps is on state...'); + isValid = this.state.reqProps.length > 1 && isValid; + } + return isValid; + } + + inputChangeHandler = (event) => { + const target = event.target; + const value = target.value; + const name = target.name; + console.log('inputChangeHandler.value: ' + value); + console.log('inputChangeHandler.name: ' + name); + let formIsValid = null; + this.setState( + { [name]: value }, + function () { + console.log('startNode:' + this.state.startNode); + console.log('reqProps:' + this.state.reqProps); + formIsValid = this.checkValidity(); + console.log('formIsValid:' + formIsValid); + this.setState({ formIsValid: formIsValid }); + }); + } + + onAdditem = (event) => { + //window.alert('onAddItem clicked'); + event.preventDefault(); + this.nodeResults = ''; + this.typeOfCall = true; + this.formQueryString(); + }; + formPayload = () => { + var startNode = this.state.startNode; + startNode.trim(); + console.log('startNode.trim().length: ' + startNode.trim().length); + var queryName = this.state.query; + var reqProps = this.state.reqProps; + var optionalProps = this.state.optionalProps; + console.log('start Node: ' + startNode); + console.log('query name: ' + queryName); + console.log('req props: ' + reqProps); + console.log('Optional props: ' + optionalProps); + let payload = null; + + if(queryName === 'node-fromURI'){ + payload = { + start: startNode + }; + } else if ( reqProps === '' && optionalProps === '' ){ + payload = { + start: startNode, + query: 'query/' + queryName + }; + } else if(reqProps !== ''){ + reqProps = '?' + reqProps; + payload = { + start: startNode, + query: 'query/' + queryName + reqProps + }; + } + if(optionalProps !== ''){ + if(reqProps === ''){ + optionalProps = '?' + optionalProps; + }else{ + optionalProps = reqProps + optionalProps; + } + payload = { + start: startNode, + query: 'query/' + queryName + optionalProps + }; + } + return payload + } + formQueryString = () =>{ + let payload = this.formPayload(); + + console.log('payload>>>>>' + payload.toString()); + const settings = { + 'NODESERVER': INVLIST.NODESERVER, + 'PROXY': INVLIST.PROXY, + 'PREFIX': INVLIST.PREFIX, + 'VERSION': INVLIST.VERSION, + 'USESTUBS': INVLIST.useStubs + + }; + let queryStr = ''; + if(this.typeOfCall){ + queryStr = 'query?format=simple&resultIndex=' + + this.state.activePage + '&resultSize=' + PAGINATION_CONSTANT.RESULTS_PER_PAGE; + this.setState({isLoading: true,nodes: [], currentPayload:payload}); + }else{ + let pagerange=this.state.pageRange.toString(); + pagerange=pagerange.split('-'); + if(pagerange.length > 1){ + queryStr = 'query?format=simple&resultIndex=' + parseInt(pagerange[0]) + '&resultSize=' + PAGINATION_CONSTANT.RESULTS_PER_PAGE + '&resultRangeEnd=' + parseInt(pagerange[1]); + }else{ + queryStr = 'query?format=simple&resultIndex=1&resultSize=' + parseInt(pagerange); + } + this.setState({enableModelBusyFeedback: true, currentPayload:payload}); + } + this.getNodes(settings, queryStr, 'PUT', payload); + } + + + getNodes(settings, path, httpMethodType, payload) { + commonApi(settings, path, httpMethodType, payload, 'CQDefault') + .then(res => { + console.log(Object.keys(res.data)); + this.processData(res); + if(this.state.nodes.length > 0 && this.state.visualAddition){ + Visualization.chart('currentState' , [], [], this.state.res.data, this); + } + console.log('res:' + res); + }, error => { + console.log(JSON.stringify(error)); + if(this.typeOfCall){ + this.triggerError(error); + }else{ + let errMsg = this.renderErrorMsg(error); + this.setState({ isLoading: false,errorDownloadResults:true,downloadErrorMsg:errMsg,enableModelBusyFeedback:false}); + } + }).catch(error => + { + console.log(JSON.stringify(error)); + if(this.typeOfCall){ + this.triggerError(error); + }else{ + let errMsg = this.renderErrorMsg(error); + this.setState({ isLoading: false,errorDownloadResults:true,downloadErrorMsg:errMsg,enableModelBusyFeedback:false}); + } + }); + + this.isEnabled = []; + } + + triggerError = (error) =>{ + // this.processData(''); + this.setState({isLoading: false, + totalResults: 0, + showPagination: false, + showResults: false, + isInitialLoad: false, + errorResults:true, + noResults: true + }); + this.downloadAllTooltip = 'Downloads First ' + DOWNLOAD_ALL + ' Results'; + let errMsg = this.renderErrorMsg(error); + this.setState({errorMessage:errMsg}); + } + renderErrorMsg = (error) =>{ + let errMsg=''; + if (error.response) { + // The request was made and the server responded with a status code + // that falls out of the range of 2xx + console.log(error.response.data); + console.log(error.response.status); + console.log(error.response.headers); + if(error.response.status){ + errMsg += " Code: " + error.response.status; + } + if(error.response.data){ + errMsg += " - " + JSON.stringify(error.response.data); + } + } else if (error.request) { + // The request was made but no response was received + // `error.request` is an instance of XMLHttpRequest in the browser and an instance of + // http.ClientRequest in node.js + console.log(error.request); + errMsg += " - Request was made but no response received"; + } else { + // Something happened in setting up the request that triggered an Error + console.log('Error', error.message); + errMsg += " - Unknown error occurred " + error.message; + } + console.log(error.config); + return errMsg; + } + + processData(resp) { + //data = CustomQueryResponse; + console.log( 'in Custom Query component file DATA: ' + JSON.stringify(resp.data)); + if(this.typeOfCall){ + if(resp.data && resp.data.results) { + this.setState( + { res: resp, + nodes: resp.data.results}, + function () { + console.log('how many nodes? ', this.state.nodes.length); + this.setState({ multipleNodes: this.state.nodes.length > 1 ? 'col-lg-3 col-xl-3' : '' }); + }); + } + let totalResults = 0; + let downloadCount = DOWNLOAD_ALL; + if(resp.headers){ + totalResults = parseInt(resp.headers['total-results']); + if(totalResults > DOWNLOAD_ALL){ + this.downloadAllTooltip = DOWNLOAD_ALL + ' results out of '+ totalResults +' Results will be downloaded, please filter results further to obtain full report'; + }else{ + this.downloadAllTooltip = (totalResults === 1) ?'Downloads ' + totalResults + ' Results' : 'Downloads all ' + totalResults + ' Results' ; + downloadCount= totalResults; + } + this.setState({isLoading: false, + totalResults: totalResults, + totalPages: parseInt(resp.headers['total-pages']), + showResults: resp.headers['total-results'] > 0 ? true : false, + showPagination: resp.headers['total-results'] > 0 ? true : false, + isInitialLoad: false, + noResults: resp.headers['total-results'] && resp.headers['total-results'] > 0 ? false : true, + errorResults: !resp.headers['total-results'], + downloadCount: downloadCount + }); + } + + this.setState({ displayNodes: 'show', viewName: this.state.defaultViewName }); + }else{ + if(resp.data && resp.data.results) { + this.nodeResults = resp.data.results; + let totalResults = 0; + let totalPages = 0; + if(resp.headers){ + totalResults = parseInt(resp.headers['total-results']); + totalPages = parseInt(resp.headers['total-pages']); + } + this.setState({isLoading: false,totalPages:totalPages,errorDownloadResults:false,downloadErrorMsg:''},() => {this.getAllExcels()}); + }else{ + this.nodeResults = ''; + this.setState({isLoading: false,errorDownloadResults:true,downloadErrorMsg:error+'',enableModelBusyFeedback:false}); + } + } + } + + nodeOnClick(event, uri, id, nodeType) { + event.preventDefault(); + let delimiter = '\/'; + let start = 3; + let tokens = uri.split(delimiter).slice(start); + let result = tokens.join(delimiter); + sessionStorage.setItem(GlobalExtConstants.ENVIRONMENT + 'URI', result); + console.log(['/model/' + nodeType + '/' + id + '/' + '1']); + }; + openDownloadRange = () =>{ + this.setState({ + showDownloadResultsModal: true, + errorDownloadResults: false, + downloadErrorMsg:''}); + } + closeDownloadResults = () =>{ + this.setState({ + showDownloadResultsModal: false, + enableModelBusyFeedback: false + }); + } + getAllExcels = (pageRange,rangeState) =>{ + + console.log('getAllExcels>>>>>>>>>>>*',pageRange); + if(pageRange){ + this.typeOfCall=false; + let rangeModelState=(rangeState)? rangeState: false; + this.setState( + { pageRange: pageRange,enableModelBusyFeedback:true,showDownloadResultsModal:rangeModelState}, + function () { this.formQueryString(); }.bind(this) + ); + }else{ + this.setState( + {errorDownloadResults: false, showDownloadResultsModal: false, downloadErrorMsg:'', isLoading: false, enableModelBusyFeedback:false}, + function () { generateExcels(this.nodeResults);this.nodeResults='';this.typeOfCall = true;}.bind(this) + ); + } + } + getExcels = () =>{ + this.typeOfCall = true; + generateExcels(this.state.nodes); + } + + handlePageChange = (pageNumber) => { + console.log('[CustomQuery.jsx] HandelPageChange active page is', pageNumber); + this.typeOfCall = true; + this.setState( + { activePage: pageNumber, isLoading: true, nodes: [], resetColumnFilters: false, isPageNumberChange: true }, + function () { this.formQueryString(); }.bind(this) + ); + }; + openHistory = (nodeDisplay, nodeUri, nodeType) => { // open modal from Card + console.log('history >> showModal',nodeDisplay); + + if(nodeType){ + this.setState({ + nodeDisplay: nodeDisplay, + showHistoryModal: true, + showModelOptions:true, + enableCalendar:true, + historyType:(this.state.historyType === 'cq') ? 'nodeState' : this.state.historyType, + focusedNodeUri: nodeUri, + focusedNodeType: nodeType, + }); + }else{ + let payload = this.formPayload(); + this.setState({ + showHistoryModal:true, + showModelOptions:false, + focusedNodeUri: JSON.stringify(payload), + focusedNodeType: nodeType, + enableCalendar:true, + historyType :'cq' + }); + } + } + closeHistory = () => { + this.setState({ + showHistoryModal: false, + enableCalendar:true, + historyType :'nodeState' + }); + } + + setViewName(event) { + console.log(event.currentTarget.value); + this.setState({ + viewName: event.currentTarget.value + }); + } + + setDefaultViewName(event) { + let ENVIRONMENT = GlobalExtConstants.ENVIRONMENT; + let layout = event.target.value; + + if(sessionStorage.getItem(ENVIRONMENT + 'userId')) { + if (event.target.checked) { + localStorage.setItem(ENVIRONMENT + '_' + sessionStorage.getItem(ENVIRONMENT + 'userId') + '_viewPreference', layout); + } else { + localStorage.removeItem(ENVIRONMENT + '_' + sessionStorage.getItem(ENVIRONMENT + 'userId') + '_viewPreference'); + } + } + + this.setState({ + defaultViewName: event.target.value + }); + } + + submitHistory = () => { + console.log("submitting history"); + let paramToPassThrough = ''; + if(this.state.focusedNodeType){ + paramToPassThrough = '/history/' + this.state.historyType +'/' + this.state.focusedNodeType + '/' + btoa(this.state.focusedNodeUri); + }else{ + paramToPassThrough = '/historyQuery/' + this.state.historyType + '/' + btoa(this.state.focusedNodeUri); + } + let epochStartTime = (this.state.startDate).unix(); + this.props.history.push(paramToPassThrough + '/' + epochStartTime * 1000); + } + + handleDateChange = (newDate) =>{ + this.setState({ startDate: moment(+newDate) }); + console.log('[CustomQuery.jsx] handleDateChange date is ', this.state.startDate); + console.log('[CustomQuery.jsx] handleDateChange date is in millis ', +this.state.startDate); + } + setHistoryType(event) { + console.log(event.target.value); + let enableCalendar = false; + if(event.target.value === 'nodeLifeCycle'){ + enableCalendar = false; + }else{ + enableCalendar = true; + } + this.setState({ + historyType: event.target.value, + enableCalendar: enableCalendar + }); + console.log(this.state.enableCalendar); + } + openNodeModal(nodeDisplay, nodeUri, nodeType){ // open modal + console.log('customquery >> showModal'); + nodeDisplay = "Node Details of " + nodeUri; + let node = null; + let found = false; + for(var j = 0; j < this.state.nodes.length && !found; j++){ + if(this.state.nodes[j].url === nodeUri){ + node = this.state.nodes[j]; + found = true; + } + } + if(nodeDisplay && found){ + this.setState({ + nodeDisplay: nodeDisplay, + focusedNode: node, + showNodeModal:true + }); + }else{ + this.setState({ + showNodeModal:true + }); + } + } + + closeNodeModal = () => { + this.setState({ + showNodeModal: false + }); + } + componentDidUpdate(prevProps, prevState, snapshot) { + if(this.state.nodes.length > 0 && !this.state.visualAddition){ + Visualization.chart('currentState', [], [], this.state.res.data, this); + this.setState({ + showPagination: this.state.nodes.length > 0 ? true : false, + visualAddition: true + }); + } + } + prepareDownloadRangeModel = () =>{ + let downloadRangeModel = (this.state.showDownloadResultsModal)?<DownloadRangeModel + showDownloadResultsModal={this.state.showDownloadResultsModal} + totalPages={this.state.totalPages} + totalResults={this.state.totalResults} + triggerDownload={this.getAllExcels} + errorDownloadResults={this.state.errorDownloadResults} + downloadErrorMsg={this.state.downloadErrorMsg} + triggerClose={this.closeDownloadResults} + enableModelBusyFeedback={this.state.enableModelBusyFeedback} + /> : ''; + return downloadRangeModel; + } + render() { + let simple = 'Enter Start Node Location => network/generic-vnfs/generic-vnf/a642ad94-9a84-4418-9358-c1ee860315e2'; + let advanced = 'Enter Start Node Location => /cloud-infrastructure/cloud-regions/cloud-region/cloudowner1/cloudregion1'; + let downloadRangeModel = this.prepareDownloadRangeModel(); + if (this.state.displayValidationError) { + inputClasses.push('invalid'); + } + let styling = inputClasses.join(' '); + console.log('styling:' + styling); + let nodes = ''; + let classes = `${this.state.displayNodes} container-fluid`; + const modelGalleryElement = <ModelGallery + nodes={this.state.nodes} + viewName={this.state.viewName} + historyStackString={this.props.location.historyStackString} + openHistoryModal={this.openHistory} + isPageNumberChange={this.state.isPageNumberChange} + resetColumnInd={this.state.resetColumnFilters} + enableRealTime={false}/>; + if (this.state.nodes.length > 0) { + console.log('nodes exist'); + nodes = + <div> + <hr /> + {modelGalleryElement} + </div >; + } + + return ( + <div> + <header className='addPadding jumbotron my-4'> + <h1 className='display-2'>Welcome to Custom Queries!</h1> + <p className='lead'> + On this page you can choose from the many different + predefined custom queries has to offer. Simply + choose the query name and provide the location of the + start node.<br /> + If prompted please also enter the values in required + properties field as some queries require these values + to execute.<br /> + Check the Help Section on the right for examples. + </p> + </header> + <div className='static-modal'> + <Modal show={this.state.showHistoryModal} onHide={this.closeHistory}> + <Modal.Header> + <Modal.Title>Retrieve {(this.state.focusedNodeType) ? this.state.focusedNodeType: 'Custom Query '} History</Modal.Title> + </Modal.Header> + <Modal.Body> + <form className={this.state.showModelOptions ? 'show' : 'hidden'}> + <div className="radio"> + <label> + <input type="radio" value="nodeState" + checked={this.state.historyType === 'nodeState'} + onChange={(e) => this.setHistoryType(e)} /> + View state at + </label> + </div> + <div className="radio"> + <label> + <input type="radio" value="nodeLifeCycleSince" + checked={this.state.historyType === 'nodeLifeCycleSince'} + onChange={(e) => this.setHistoryType(e)} /> + View updates since + </label> + </div> + <div className="radio"> + <label> + <input type="radio" value="nodeLifeCycle" + checked={this.state.historyType === 'nodeLifeCycle'} + onChange={(e) => this.setHistoryType(e)} /> + View all updates + </label> + </div> + </form> + <div className={this.state.enableCalendar ? 'show' : 'hidden'}> + <DatePicker + inline + selected={this.state.startDate} + onChange={(newDate) => this.handleDateChange(newDate)} + showTimeSelect + timeFormat="HH:mm" + timeIntervals={15} + dateFormat="MMMM D, YYYY h:mm a" + timeCaption="time" + /> + </div> + </Modal.Body> + <Modal.Footer> + <Button onClick={this.closeHistory}>Close</Button> + <Button onClick={this.submitHistory}>Submit</Button> + </Modal.Footer> + </Modal> + </div> + <div className='static-modal'> + <Modal show={this.state.showNodeModal} onHide={this.closeNodeModal} dialogClassName="modal-override"> + <Modal.Header> + <Modal.Title>Retrieve {this.state.nodeDisplay}</Modal.Title> + </Modal.Header> + <Modal.Body> + <Grid fluid={true}> + <Row className='show-grid'> + <Col lg={12} md={12} sm={12} xs={12}> + <ModelCard + key={this.state.focusedNode.id} + nodeId={this.state.focusedNode.id} + nodeType={this.state.focusedNode['node-type']} + nodeProps={this.state.focusedNode.properties} + nodeRelatives={this.state.focusedNode['related-to']} + nodeUrl={this.state.focusedNode.url} + historyStackString={this.props.location.historyStackString} + openHistoryModal={this.openHistory} + enableRealTime={false}/> + </Col> + </Row> + </Grid> + </Modal.Body> + <Modal.Footer> + <Button onClick={this.closeNodeModal}>Close</Button> + </Modal.Footer> + </Modal> + </div> + <div className='addPadding'> + <div className='row addPaddingTop'> + <Col md={8}> + <form style={{ margin: 0 }} onSubmit={this.onAdditem} id='customQueryForm' name='customQueryForm'> + <div className='form-group'> + <label>Query:</label><br /> + <div id='customQueryText'> + <Select + className='dropdown-item' + autosize={true} + placeholder={this.state.queryPlaceHolder} + value={this.state.query} + onChange={this.updateSelectedHandler} + options={dropdownList} /> + </div> + </div> + <div className={this.state.displayDescription} id='customQueryDescription'> + <Label bsStyle='info'>Description</Label> + <p><br />{this.state.description}</p> + <a onClick={() => this.setState({ showText: !this.state.showText })} + className={this.state.additionalInfo==='' ? 'hidden' : 'show'}>See more</a><br /> + <Collapse in={this.state.showText}> + <div> + <span> + {this.state.additionalInfo.split('\n').map(info => { + return <div>{info}</div>; + })} + </span> + </div> + </Collapse> + </div> + <div className='form-group addPaddingTop' id='startNodeText'> + <label htmlFor='StartNode'>Enter Start Node Location (full uri path): </label> + <input type='text' + id='startNode' + className={styling} + name='startNode' + placeholder={this.state.placeholder} + onChange={this.inputChangeHandler} + disabled={this.state.disableInputs} + value={this.state.startNode} /> + </div> + <div className={this.state.displayReqProps} id='reqPropsText'> + <label htmlFor={'reqProps'}>Required Properties</label> + <input type='text' + id='reqProps' + className={styling} + name='reqProps' + placeholder={this.state.reqPropPlaceholder} + onChange={this.inputChangeHandler} + disabled={this.state.disableInputs} + value={this.state.reqProps}/> + </div> + <div className={this.state.displayOptionalProps}> + <label htmlFor={'optionalProps'}>Optional Properties</label> + <input type='text' + id='optionalProps' + className={styling} + name='optionalProps' + placeholder={this.state.optionalPropPlaceholder} + onChange={this.inputChangeHandler} + disabled={this.state.disableInputs} + value={this.state.optionalProps} /> + </div> + <div className='row addPaddingTop'> + <Col sm={12}> + <button className='btn btn-primary btn-md' disabled={!this.state.formIsValid}>Submit</button> + { INVLIST.isHistoryEnabled && (<button className='btn btn-outline-secondary' type='button' onClick={this.openHistory} disabled={!this.state.formIsValid}>History</button>)} + </Col> + </div> + </form> + </Col> + <Col md={4}> + <PanelGroup accordion id='rb-accordion'> + <Panel eventKey='1'> + <Panel.Heading> + <Panel.Title toggle>+ Simple Query</Panel.Title> + </Panel.Heading> + <Panel.Body collapsible className='cardwrap'> + <p> + Please specify a Query from the Dropdown Menu.<br /> + <br /> + Please enter exact location of the Starting Node Path + <br /> <br /> + Submit + <br /> <br /> + Examples: <br /> + Query => complex-fromVnf<br /> + Enter Starting Node => /network/pnfs/pnf/pnf-name1<br /> <br /> + {simple}<br /><br /> + *Simple Query requires no other values to be passed other than the start node path + </p> + </Panel.Body> + </Panel> + <Panel eventKey='2'> + <Panel.Heading> + <Panel.Title toggle>+ Advanced Queries with Properties</Panel.Title> + </Panel.Heading> + <Panel.Body collapsible> + <p className='cardwrap'> + Please specify a Query from the Dropdown Menu.<br /> + <br /> + Please enter exact location of the Starting Node Path<br /> <br /> + Please enter required query parameter - if applicable<br /> <br /> + Please enter optional query parameter - if applicable<br /> <br /> + Example: <br /> + Query => vlantag-fromVlanidouter<br /> <br /> + {advanced}<br /> <br /> + Required Properties: vlanIdOuter=203<br /> <br /> + Optional Properties: vlanIdInner=103 + </p> + </Panel.Body> + </Panel> + </PanelGroup> + </Col> + </div> + </div> + + <div className='addPaddingTop'> + <div className='container-fluid model-container custom-query-result'> + <Spinner loading={this.state.isLoading}> + <Row className={this.state.isInitialLoad ? 'hidden' : 'show'}> + <Col md={12}> + <h2> + <span className='badge badge-dark'>{this.state.query}</span> Results + </h2> + <br/> + <h5>Total Results: <strong>{this.state.totalResults}</strong></h5> + </Col> + </Row> + { this.state.showResults && <div className='addPaddingTop'> + <OutputToggle scope={this} visualDisabled={this.state.totalResults > PAGINATION_CONSTANT}/> + </div> } + <Row className={this.state.showResults ? 'show' : 'hidden'}> + <Col md={8} className={this.state.showPagination ? 'show' : 'hidden'}> + <Pagination + activePage={this.state.activePage} + itemsCountPerPage={PAGINATION_CONSTANT.RESULTS_PER_PAGE} + totalItemsCount={this.state.totalResults} + pageRangeDisplayed={PAGINATION_CONSTANT.PAGE_RANGE_DISPLAY} + onChange={this.handlePageChange} /> + </Col> + <Col md={2} className='text-right'> + <OverlayTrigger placement='top' overlay={<Tooltip id='tooltip-top'>{this.downloadAllTooltip}</Tooltip>}> + <span className="d-inline-block" style={{display: 'inline-block'}}> + <Button bsSize='small' onClick={()=>{this.getAllExcels(this.state.downloadCount)}}> + Download XLSX <i className='icon-documents-downloadablefile'></i> + </Button> + </span> + </OverlayTrigger> + </Col> + <Col md={2} className='text-right'> + <OverlayTrigger placement='top' overlay={<Tooltip id='tooltip-top'>{this.downloadRangeTooltip}</Tooltip>}> + <span className="d-inline-block" style={{display: 'inline-block'}}> + <Button bsSize='small' onClick={this.openDownloadRange}> + Download XLSX (Range) <i className='icon-documents-downloadablefile'></i> + </Button> + </span> + </OverlayTrigger> + </Col> + </Row> + <div className={'addPaddingTop alert alert-danger ' +(this.state.errorResults ? 'show' : 'hidden')} role="alert"> + An error occurred, please try again later. If this issue persists, please contact the system administrator. {this.state.errorMessage} + </div> + <Row className={'addPaddingTop ' + (this.state.noResults ? 'show' : 'hidden')}> + <Col md={12}> + <h2>No Results Found</h2> + </Col> + </Row> + <Row className={this.state.isInitialLoad ? 'hidden' : 'show'}> + <div className={this.state.isLoading ? 'hidden' : 'show'}> + <div className='col align-self-center'> + <div className={classes}> + {nodes} + </div> + </div> + </div> + </Row> + <Row className={this.state.showPagination ? 'show' : 'hidden'}> + <Col md={12}> + <Pagination + activePage={this.state.activePage} + itemsCountPerPage={PAGINATION_CONSTANT.RESULTS_PER_PAGE} + totalItemsCount={this.state.totalResults} + pageRangeDisplayed={PAGINATION_CONSTANT.PAGE_RANGE_DISPLAY} + onChange={this.handlePageChange} /> + </Col> + </Row> + </Spinner> + <Spinner loading={this.state.enableModelBusyFeedback}> + {downloadRangeModel} + </Spinner> + </div> + </div> + </div> + ); + } +} + +export default CustomQuery; diff --git a/src/app/customQuery/CustomQueryData.js b/src/app/customQuery/CustomQueryData.js new file mode 100644 index 0000000..3267c1a --- /dev/null +++ b/src/app/customQuery/CustomQueryData.js @@ -0,0 +1,182 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +export const dropDownList = [ + { + placeholder: 'Vnf Required as Start Node', + label:'complex-fromVnf', + value:'complex-fromVnf', + description: { + summary: 'The "complex-fromVnf" query allows a client to provide A&AI a vnf name or ID to retrieve the ' + + 'generic-vnf, pserver, complex, licenses, and entitlements.', + additionalInfo: + 'Input: vnf name or vnf ID\n' + + 'Output: generic-vnf, pserver, complex, licenses, entitlements\n' + + 'Users: SDN-GC, Conductor\n' + + 'Releases: 1707' + } + }, + { + placeholder: 'Vnf Required as Start Node', + label:'topology-summary', + value:'topology-summary', + description: { + summary: 'The "topology-summary" query allows a client to provide A&AI one or more VNFs and retrieve various data ' + + 'related to that VNF. This includes data about the VNF itself (the generic-vnf), the related vnfc, the related ' + + 'vserver (along with the tenant, cloud-region, image and flavor) and the related pserver (along with the complex).', + additionalInfo: + 'Input: generic-vnf, The original intent was to pass all generic-vnfs with a specified service-id. ' + + '(adding owning-entity, project, platform and line-of-business in 1810 as first step to depreciating service-id)\n' + + 'Output: the generic-vnf, related platform, line-of-business (1810), related owning-entity, project (from related ' + + 'service-instance) (1810), related vnfc, related vserver, tenant, cloud-region, image, flavor, related pserver, ' + + 'complex\n' + + 'Users: AOTS, GEOLINK, DCAE-Sandbox, POLO\n' + + 'Releases: 1702, 1810' + } + }, + { + placeholder: 'Pserver Required as Start Node', + label:'service-fromPserverandSubsName', + value:'service-fromPserverandSubsName', + reqPropPlaceholder:'subscriberName=Enter some value here', + description: { + summary: 'The "service-fromPServerandSubsName" query allows a client to provide A&AI a hostname and subscriber ' + + 'name, then return service instance and service subscription information.', + additionalInfo: + 'Input: hostname and subscriber-name\n' + + 'Output: service-instance and service-subscription\n' + + 'Users: MSO\n' + + 'Releases: 1710' + } + }, + { + placeholder: 'Vnf Required as Start Node', + label:'cloudRegion-fromNfType', + value:'cloudRegion-fromNfType', + description: { + summary: 'The "cloudRegion-fromNfType" query allows a client to provide A&AI with an nf-type and returns the ' + + 'cloud-regions running those vnfs.', + additionalInfo: + 'Input: nf-type\n' + + 'Output: cloud-region\n' + + 'Users: vIPR\n' + + 'Releases: 1710' + } + }, + { + placeholder: 'Need Pserver as Start Node', + label:'colocated-devices', + value:'colocated-devices', + description: { + summary: 'The "colocated-devices" query allows a client to provide A&AI a physical server and retrieves all other ' + + 'physical devices in the same location along with details on their physical interfaces and links.', + additionalInfo: + 'Input: pserver\n' + + 'Output: pservers, pnfs, p-interfaces, physical-links\n' + + 'Users: SDN-GCP\n' + + 'Releases: 1707' + } + }, + { + placeholder: 'Need Cloud Region as Start Node', + label: 'locationNetTypeNetRole-fromCloudRegion', + value: 'locationNetTypeNetRole-fromCloudRegion', + description: { + summary: 'The "locationNetTypeNetRole-fromCloudRegion" query allows a client to provide A&AI with a ' + + 'cloud-region-id and returns the cloud-region, complex, and l3-networks.', + additionalInfo: + 'Input: cloud-region-id\n' + + 'Output: cloud-region, complex, l3-network\n' + + 'Users: vIPR\n' + + 'Releases: 1710' + } + }, + { + placeholder: 'Need Cloud Region as Start Node', + label:'sites-byCloudRegionId', + value:'sites-byCloudRegionId', + description: { + summary: 'The "sites-byCloudRegionId " query allows a client to provide A&AI with a cloud-region-id and an ' + + 'optional cloud-region-version and returns the appropriate complexes.', + additionalInfo: + 'Input: cloud-region-id, optional cloud-region-version\n' + + 'Output: complex object(s)\n' + + 'Users: POLICY\n' + + 'Releases: 1707' + } + }, + { + placeholder: 'Need Cloud Region as Start Node', + label:'cloudRegion-fromCountry', + value:'cloudRegion-fromCountry', + description: { + summary: 'The "cloudRegion-fromCountry" query allows a client to provide A&AI with a country and retrieve all ' + + 'appropriate cloud-regions.', + additionalInfo: + 'Input: country\n' + + 'Output: cloud-region\n' + + 'Users: vIPR\n' + + 'Releases: 1710' + } + }, + { + placeholder: 'Need vf-module as Start Node', + label:'so-request-vfModule', + value:'so-request-vfModule', + description: { + summary: 'The "so-request-vfModule" query allows a client to provide A&AI a vf-module then return all the ' + + 'reference objects needed to send MSO an orchestration request.', + additionalInfo: + 'Input: vf-module\n' + + 'Output: vf-module, generic-vnf, service-instance, volume-group, cloud-region\n' + + 'Users: VID\n' + + 'Releases: E1802' + } + }, + { + placeholder: 'Need Vnf as Start Node', + label:'linked-devices', + value:'linked-devices', + description: { + summary: 'The "linked-devices" query allows a client to provide A&AI a generic-vnf, vserver, or newvce and ' + + 'retrieve all connected generic-vnfs, vservers, and newvces.', + additionalInfo: + 'Input: generic-vnf, vserver, or newvces\n' + + 'Output: all connected generic-vnfs, vservers, and newvces\n' + + 'Users: POLO\n' + + 'Releases: E1802' + } + }, + { + placeholder: 'Need ucpe-instance as Start Node', + label:'ucpe-instance', + value:'ucpe-instance', + description: { + summary: 'The "ucpe-instance" query allows a client to provide A&AI a physical server or physical network device, ' + + 'using the hostname, and retrieve the device and the complex it is located in. This includes the pserver or pnf ' + + 'itself and the complex.', + additionalInfo: + 'Input: pserver or pnf, Using pserver hostname or pnf pnf-name to identify the starting node is preferred.\n' + + 'Output: the pserver or pnf, related complex\n' + + 'Users: SNIRO\n' + + 'Releases: 1702' + } + } +]; diff --git a/src/app/customQuery/components/CustomQueryCard.jsx b/src/app/customQuery/components/CustomQueryCard.jsx new file mode 100644 index 0000000..ffe9748 --- /dev/null +++ b/src/app/customQuery/components/CustomQueryCard.jsx @@ -0,0 +1,44 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +const customQueryCard = (props) => { + + console.log('[Custom Query Card] props : ', props); + const properties = Object.keys(props.nodeProps).map( (prop, idx) => { + return ( + <p key={idx}><strong> {prop} : </strong> { props.nodeProps[prop]} </p> + ); + }); + + return ( + <Col lg={3} md={3} sm={4}> + <div className='card model-card'> + <div className='card-header'> + Node {props.nodeId} + </div> + <div className='card-content model-card-content'> + {properties} + </div> + </div> + </Col> + ); +}; + +export default customQueryCard; diff --git a/src/app/main.app.jsx b/src/app/main.app.jsx index 451ef37..50cc88f 100644 --- a/src/app/main.app.jsx +++ b/src/app/main.app.jsx @@ -20,6 +20,7 @@ */ import 'resources/scss/bootstrap.scss'; import 'resources/css/font-awesome.min.css'; +import 'resources/css/bootstrap-slider.css'; import 'resources/css/react-datepicker.min.css'; import 'resources/scss/customViews.scss'; diff --git a/src/app/model/CustomQueryMultiNode.json b/src/app/model/CustomQueryMultiNode.json new file mode 100644 index 0000000..598192c --- /dev/null +++ b/src/app/model/CustomQueryMultiNode.json @@ -0,0 +1,83 @@ +{ + "results":[ + { + "id":"2519120", + "node-type":"generic-vnf", + "url":"/aai/v12/network/generic-vnfs/generic-vnf/d5b749b2-3b0f-46c4-bf0a-fb55e76866fb", + "properties":{ + "vnf-id":"d5b749b2-3b0f-46c4-bf0a-fb55e76866fb", + "vnf-name":"USSTFMBMIIL0101UVHN01", + "vnf-type":"HN", + "prov-status":"prov", + "is-closed-loop-disabled":false, + "resource-version":"1492705097080" + }, + "related-to":[ + { + "id":"28274856", + "relationship-label":"org.onap.relationships.inventory.ComposedOf", + "node-type":"service-instance", + "url":"/aai/v12/business/customers/customer/StateFarmSAARTID/service-subscriptions/service-subscription/vHNFaaS/service-instances/service-instance/3f433278-94d6-4203-8bf2-8bd01b82a848" + }, + { + "id":"13705400", + "relationship-label":"org.onap.relationships.inventory.BelongsTo", + "node-type":"l-interface", + "url":"/aai/v12/network/generic-vnfs/generic-vnf/d5b749b2-3b0f-46c4-bf0a-fb55e76866fb/l-interfaces/l-interface/ge4" + }, + { + "id":"26591400", + "relationship-label":"org.onap.relationships.inventory.BelongsTo", + "node-type":"l-interface", + "url":"/aai/v12/network/generic-vnfs/generic-vnf/d5b749b2-3b0f-46c4-bf0a-fb55e76866fb/l-interfaces/l-interface/ge5" + }, + { + "id":"5664936", + "relationship-label":"tosca.relationships.HostedOn", + "node-type":"vserver", + "url":"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/USSTFMBMIIL0101UJZZ01%3A%3AuCPE-VMS/vservers/vserver/5fbeb08c-bc6f-4bd1-9129-36852c014f72" + } + ] + }, + { + "id":"23769160", + "node-type":"pserver", + "url":"/aai/v12/cloud-infrastructure/pservers/pserver/USSTFMBMIIL0101UJZZ01", + "properties":{ + "hostname":"USSTFMBMIIL0101UJZZ01", + "ptnii-equip-name":"USSTFMBMIIL0101UJZZ01", + "equip-type":"JUNIPER-UCPE", + "equip-vendor":"JUNIPER", + "equip-model":"ATT-U210", + "serial-number":"JUNIPER-UCPE", + "resource-version":"1492639826832" + }, + "related-to":[ + { + "id":"5664936", + "relationship-label":"tosca.relationships.HostedOn", + "node-type":"vserver", + "url":"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/USSTFMBMIIL0101UJZZ01%3A%3AuCPE-VMS/vservers/vserver/5fbeb08c-bc6f-4bd1-9129-36852c014f72" + }, + { + "id":"22016072", + "relationship-label":"tosca.relationships.HostedOn", + "node-type":"vserver", + "url":"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/USSTFMBMIIL0101UJZZ01%3A%3AuCPE-VMS/vservers/vserver/8ed14c24-f002-4a2c-8216-0303e79488d0" + }, + { + "id":"2093224", + "relationship-label":"tosca.relationships.network.BindsTo", + "node-type":"p-interface", + "url":"/aai/v12/cloud-infrastructure/pservers/pserver/USSTFMBMIIL0101UJZZ01/p-interfaces/p-interface/ge-0%2F0%2F9" + }, + { + "id":"19787800", + "relationship-label":"tosca.relationships.network.BindsTo", + "node-type":"p-interface", + "url":"/aai/v12/cloud-infrastructure/pservers/pserver/USSTFMBMIIL0101UJZZ01/p-interfaces/p-interface/ge-0%2F0%2F8" + } + ] + } + ] +} diff --git a/src/app/model/ModelDisplay.jsx b/src/app/model/ModelDisplay.jsx new file mode 100644 index 0000000..59dc05a --- /dev/null +++ b/src/app/model/ModelDisplay.jsx @@ -0,0 +1,35 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import ModelGallery from 'app/modelSearch/components/ModelGallery.jsx'; +import ModelBreadcrumb from 'app/modelSearch/components/ModelBreadcrumb.jsx'; +//import modelCard from 'app/modelSearch/components/ModelCard.jsx'; +//import modelRelationships from 'app/modelSearch/components/ModelRelationships.jsx'; + + + + +//export const ModelGallery = modelGallery; +//export const ModelCard = modelCard; +//export const ModelRelationships = modelRelationships; + +export default ModelGallery; +//export default modelCard; +//export default modelRelationships; diff --git a/src/app/model/history/History.jsx b/src/app/model/history/History.jsx new file mode 100644 index 0000000..61cb1af --- /dev/null +++ b/src/app/model/history/History.jsx @@ -0,0 +1,716 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React, { Component } from 'react'; +import { connect } from 'react-redux'; + +import commonApi from 'utils/CommonAPIService.js'; +import deepDiffMapper from 'utils/DiffUtil.js'; +import {GlobalExtConstants} from 'utils/GlobalExtConstants.js'; +import Spinner from 'utils/SpinnerContainer.jsx'; + +import HistoryGallery from './components/HistoryGallery.jsx'; +import HistoryCard from './components/HistoryCard.jsx'; +import NodeDiffCard from './components/NodeDiffCard.jsx'; +import AnimationControls from './components/AnimationControls.jsx'; +import moment from "moment"; +import Grid from 'react-bootstrap/lib/Grid'; +import Row from 'react-bootstrap/lib/Row'; +import Col from 'react-bootstrap/lib/Col'; +import Button from 'react-bootstrap/lib/Button'; +import Modal from 'react-bootstrap/lib/Modal'; +import Pagination from 'react-js-pagination'; +import { HistoryConstants } from './HistoryConstants'; +import OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger'; +import Tooltip from 'react-bootstrap/lib/Tooltip'; +import ReactBootstrapSlider from 'react-bootstrap-slider'; + +let INVLIST = GlobalExtConstants.INVLIST; +/** + * This class is used to handle any url interactions for models. + * When a user selects a inventory item in browse or special search, + * this model class should be used to handle the url + params and query + * the proxy server. + */ + +class History extends Component { + + elements = []; + pageTitle = ''; + nodeType = ''; + nodeResults = ''; + payload = {start : atob(this.props.match.params.nodeUriEnc)}; + + constructor(props) { + console.log(props); + super(props); + this.state = { + activePage: 1, + totalResults: 0, + enableBusyFeedback: true, + enableBusyRecentFeedback: true, + enableBusyHistoryStateFeedback: true, + enableBusyDiffFeedback: true, + data: [], + nodes: [], + nodeCurrentState: null, + nodeHistoryState: null, + showHistoryModal: false, + splitScreenCard: false, + entries: [], + filteredEntries: [], + isLifeCycle: false, + isState: false, + currentStateHistoryValue: parseInt(this.props.match.params.epochTime), + stepEpochStateTime: 1000, + maxEpochStartTime: Math.round(new Date().getTime()), + minEpochStartTime: parseInt(this.props.match.params.epochTime) - 259200000, + nodeDiff: null, + showSlider: false, + sliderTickArray: null, + showTicks: INVLIST.showTicks, + selectedHistoryStateFormatted: moment(parseInt(this.props.match.params.epochTime)).format('dddd, MMMM Do, YYYY h:mm:ss A'), + nodeDisplay: (this.props.match.params.nodeType).toUpperCase(),// + ' : ' + (atob(this.props.match.params.nodeUriEnc)).split(this.props.match.params.nodeType + '\/').pop(), + nodeName: (this.props.match.params.nodeType).toUpperCase(), + historyErrMsg: null, + changesErrMsg: null, + lifecycleErrMsg: null, + currentErrMsg: null + }; + console.log('minEpochStateTime: '+this.state.minEpochStateTime); + console.log('maxEpochStartTime: '+this.state.maxEpochStartTime); + console.log('stepEpochStateTime: '+this.state.stepEpochStateTime); + console.log('currentStateHistoryValue: '+this.state.currentStateHistoryValue); + + } + resultsMessage = ''; + componentDidMount = () => { + console.log('[History.jsx] componentDidMount props available are', JSON.stringify(this.props)); + if(INVLIST.isHistoryEnabled){ + this.beforefetchInventoryData(); + } + }; + componentWillUnmount = () => { + console.log('[History.jsx] componentWillUnMount'); + } + getUnixSecondsFromMs = (ms) => { + return ms/1000; + } + beforefetchInventoryData = (param) => { + if (param) { + this.setState( + { enableBusyFeedback: true, activePage: 1, totalResults: 0}, + function () { this.fetchInventoryData(param); }.bind(this) + ); + } else { + this.fetchInventoryData(); + } + }; + initState = () =>{ + this.setState({ + activePage: 1, + totalResults: 0, + enableBusyFeedback: true, + enableBusyRecentFeedback: true, + enableBusyHistoryStateFeedback: true, + enableBusyDiffFeedback: true, + data: [], + nodes: [], + nodeCurrentState: null, + nodeHistoryState: null, + showHistoryModal: false, + splitScreenCard: false, + entries: [], + filteredEntries: [], + isLifeCycle: false, + isState: false, + stepEpochStateTime: 1000, + maxEpochStartTime: Math.round(new Date().getTime()), + minEpochStartTime: parseInt(this.props.match.params.epochTime) - 259200000, + nodeDiff: null, + showSlider: false, + sliderTickArray: null, + showTicks: INVLIST.showTicks, + nodeDisplay: (this.props.match.params.nodeType).toUpperCase(),// + ' : ' + (atob(this.props.match.params.nodeUriEnc)).split(this.props.match.params.nodeType + '\/').pop(), + nodeName: (this.props.match.params.nodeType).toUpperCase(), + historyErrMsg: null, + changesErrMsg: null, + lifecycleErrMsg: null, + currentErrMsg: null + }); + } + getSettings = () => { + const settings = { + 'NODESERVER': INVLIST.NODESERVER, + 'PROXY': INVLIST.PROXY, + 'PREFIX': INVLIST.PREFIX, + 'VERSION': INVLIST.VERSION, + 'USESTUBS': INVLIST.useStubs + }; + return settings; + } + fetchInventoryData = (param) => { + console.log('fetchInventoryData', param); + this.resultsMessage = ''; + let settings = this.getSettings(); + const inventory = INVLIST.INVENTORYLIST; + let url = ''; + console.log('[History.jsx] fetchInventoryData nodeUriEnc= ', atob(this.props.match.params.nodeUriEnc)); + let pageName = "History"; + this.nodeResults = ''; + switch(this.props.match.params.type){ + case('nodeState'): + this.setState({splitScreenCard: true, isState: true, showState: true}); + this.getCurrentStateCall(settings); + this.pageTitle = "State of "+ this.state.nodeDisplay +" at "+ moment(parseInt(this.props.match.params.epochTime)).format('dddd, MMMM Do, YYYY h:mm:ss A'); + break; + case('nodeLifeCycleSince'): + this.setState({splitScreenCard: false, isLifeCycle: true, showLifeCycle: true}); + this.getCurrentStateCall(settings); + this.commonApiServiceCall(settings, null); + this.pageTitle = "Network element state(s) of "+ this.state.nodeDisplay; + break; + case('nodeLifeCycle'): + this.setState({splitScreenCard: false, isLifeCycle: true, showLifeCycle: true}); + this.getCurrentStateCall(settings); + this.commonApiServiceCall(settings, null); + this.pageTitle = "Network element state(s) of "+ this.state.nodeDisplay; + break; + default: + this.pageTitle = "History"; + this.setState({splitScreenCard: false, isLifeCycle: true, showLifeCycle: true}); + this.getCurrentStateCall(settings); + this.commonApiServiceCall(settings, null); + } + console.log('[History.jsx] active page', this.state.activePage); + }; + generateEntries = (properties, relationships, actions) =>{ + let tempEntries = []; + if(properties){ + for (var i = 0; i < properties.length; i++) { + properties[i].displayTimestamp = moment(properties[i].timestamp).format('dddd, MMMM Do, YYYY h:mm:ss A'); + properties[i].timeRank = properties[i].timestamp; + properties[i].type = "attribute"; + properties[i].header = "Attribute: " + properties[i].key; + if(properties[i].value !== null && properties[i].value !== 'null'){ + properties[i].action = "Updated"; + properties[i].body = "Updated to value: " + properties[i].value; + }else{ + properties[i].action = "Deleted"; + properties[i].body = "Removed"; + } + properties[i]['tx-id'] = (properties[i]['tx-id']) ? properties[i]['tx-id'] : 'N/A'; + tempEntries.push(properties[i]); + } + } + if(actions){ + for (var k = 0; k < actions.length; k++) { + actions[k].displayTimestamp = moment(actions[k].timestamp).format('dddd, MMMM Do, YYYY h:mm:ss A'); + actions[k].timeRank = actions[k].timestamp; + actions[k].type = "action"; + actions[k].header = "Action: " + actions[k].action; + if(actions[k].action === 'CREATED'){ + actions[k].action = "Created"; + actions[k].body = "Network Element Created"; + }else if(actions[k].action === 'DELETED'){ + actions[k].action = "Deleted"; + actions[k].body = "Network Element Removed"; + } + actions[k]['tx-id'] = (actions[k]['tx-id']) ? actions[k]['tx-id'] : 'N/A'; + tempEntries.push(actions[k]); + } + } + if(relationships){ + for (var j = 0; j < relationships.length; j++) { + if(relationships[j].timestamp){ + relationships[j].dbStartTime = relationships[j].timestamp; + relationships[j].displayTimestamp = moment(relationships[j].dbStartTime).format('dddd, MMMM Do, YYYY h:mm:ss A'); + relationships[j].timeRank = relationships[j].dbStartTime; + relationships[j].type = "relationship"; + relationships[j].header = "Relationship added"; + relationships[j].body = "The relationship with label " + relationships[j]['relationship-label'] + " was added from this node to the "+ relationships[j]['node-type'] +" at " + relationships[j].url; + relationships[j].action = "Added"; + relationships[j]['tx-id'] = (relationships[j]['tx-id']) ? relationships[j]['tx-id'] : 'N/A'; + let additions = JSON.parse(JSON.stringify(relationships[j])); + tempEntries.push(additions); + } + if(relationships[j]['end-timestamp']){ + relationships[j].dbEndTime = relationships[j]['end-timestamp']; + relationships[j].sot = relationships[j]['end-sot']; + relationships[j].displayTimestamp = moment(relationships[j].dbEndTime).format('dddd, MMMM Do, YYYY h:mm:ss A'); + relationships[j].timeRank = relationships[j].dbEndTime; + relationships[j].header = "Relationship removed"; + relationships[j].body = "The " + relationships[j]['node-type'] +" : " + relationships[j].url + " relationship with label " + relationships[j]['relationship-label'] + " was removed from this node."; + relationships[j].type = "relationship"; + relationships[j].action = "Deleted"; + relationships[j]['tx-id'] = (relationships[j]['tx-id']) ? relationships[j]['tx-id'] : 'N/A'; + let deletions = JSON.parse(JSON.stringify(relationships[j])); + tempEntries.push(deletions); + } + } + } + + let tempEntriesSorted = tempEntries.sort(function(a, b) { + var compareA = a.timeRank; + var compareB = b.timeRank; + if(compareA > compareB) return -1; + if(compareA < compareB) return 1; + return 0; + }); + + this.setState({ + totalResults : tempEntriesSorted.length, + entries : tempEntriesSorted, + filteredEntries: tempEntriesSorted + }); + + } + triggerHistoryStateCall = (nodeUri, epochTime) =>{ + //get url for historical call + let settings = this.getSettings(); + window.scrollTo(0, 400); + this.setState({ + enableBusyHistoryStateFeedback : true, + enableBusyDiffFeedback: true + }); + this.getHistoryStateCall(settings, null, null, epochTime); + } + generateDiffArray = (arr) => { + let tempArray = {}; + tempArray['properties'] = []; + tempArray['related-to'] = []; + + for (var i = 0; i < arr.properties.length; i++ ){ + tempArray['properties'][arr.properties[i].key] = arr.properties[i]; + } + for (var j = 0; j < arr['related-to'].length; j++ ){ + //TODO use id if it is coming + tempArray['related-to'][arr['related-to'][j].url] = arr['related-to'][j]; + } + return tempArray; + } + getCurrentStateCall = (settings,url,param) =>{ + this.setState({currentErrMsg:null}); + commonApi(settings, "query?format=state", 'PUT', this.payload, 'currentNodeState', null, 'history-traversal') + .then(res => { + let node = atob(this.props.match.params.nodeUriEnc).split(res.data.results[0]['node-type'] + '\/').pop(); + res.data.results[0].primaryHeader = 'Current state of ' + this.state.nodeName + ' - ' + node; + res.data.results[0].secondaryHeader = atob(this.props.match.params.nodeUriEnc); + this.setState( + { + nodeCurrentState : res.data.results[0], + enableBusyRecentFeedback: false, + nodeDisplay :node + }); + if(this.props.match.params.type === 'nodeState'){ + this.getHistoryStateCall(settings, null); + } + console.log('After recent node service call ......',this.state); + console.log('[History.jsx] recent node results : ', res.data.results[0]); + }, error=>{ + this.triggerError(error, "current"); + }).catch(error => { + this.triggerError(error, 'current'); + }); + }; + getHistoryStateCall = (settings, url, param, timeStamp) =>{ + let ts = this.state.currentStateHistoryValue; + if(timeStamp){ + ts = parseInt(timeStamp); + } + if(this.state.showTicks){ + this.setState({changesErrMsg:null}); + commonApi(settings, "query?format=changes", 'PUT', this.payload, 'historicalNodeStateChanges', null, 'history-traversal') + .then(res => { + let tickTempArray = []; + for(var j = 0; j < res.data.results.length; j++ ){ + for(var k = 0; k < res.data.results[j].changes.length; k++){ + if(!tickTempArray.includes(res.data.results[j].changes[k])){ + tickTempArray.push(res.data.results[j].changes[k]); + } + } + } + let tickArray = tickTempArray.sort(function(a, b) { + var compareA = a; + var compareB = b; + if(compareA < compareB) return -1; + if(compareA > compareB) return 1; + return 0; + }); + console.log("tick array: " + tickArray); + this.setState({showSlider:true, sliderTickArray: tickArray}); + }, error=>{ + this.triggerError(error, "changes"); + }).catch(error => { + this.triggerError(error, 'changes'); + }); + }else{ + this.setState({showSlider:true}); + } + this.setState({historyErrMsg:null}); + commonApi(settings, "query?format=state&startTs=" + ts + "&endTs=" + ts, 'PUT', this.payload, 'historicalNodeState', null, 'history-traversal') + .then(res => { + let node = atob(this.props.match.params.nodeUriEnc).split(res.data.results[0]['node-type'] + '\/').pop(); + res.data.results[0].primaryHeader = 'Historical state of '+ this.state.nodeName + ' - ' + node + ' as of ' + moment(parseInt(this.props.match.params.epochTime)).format('dddd, MMMM Do, YYYY h:mm:ss A'); + res.data.results[0].secondaryHeader = atob(this.props.match.params.nodeUriEnc); + this.setState( + { + showState: true, + splitScreenCard: true, + nodeHistoryState : res.data.results[0], + enableBusyHistoryStateFeedback: false + }); + console.log('After historical node state service call ......',this.state); + console.log('[History.jsx] historical node state results : ', res.data.results[0]); + if(this.state.nodeHistoryState != null && this.state.nodeCurrentState != null){ + let nodeDiffHistoryArr = this.generateDiffArray(this.state.nodeHistoryState); + let nodeDiffCurrentArr = this.generateDiffArray(this.state.nodeCurrentState); + var result = deepDiffMapper.map(nodeDiffHistoryArr, nodeDiffCurrentArr); + console.log("diff map" + result); + this.setState({ nodeDiff: result, enableBusyDiffFeedback: false }); + }else{ + this.setState({ enableBusyDiffFeedback: false }); + } + }, error=>{ + this.triggerError(error, "historic"); + }).catch(error => { + this.triggerError(error, 'historic'); + }); + + }; + + commonApiServiceCall = (settings,url,param) =>{ + let path = "query?format=lifecycle"; + let stubPath = "nodeLifeCycle"; + if(this.props.match.params.type === "nodeLifeCycleSince"){ + path += "&startTs=" + parseInt(this.props.match.params.epochTime); + stubPath += "Since"; + } + this.setState({lifecycleErrMsg:null}); + commonApi(settings, path, 'PUT', this.payload, stubPath, null, 'history-traversal') + .then(res => { + // Call dispatcher to update state + console.log('once before service call ......',this.state); + let resp = res.data.results[0]; + this.resultsMessage = ''; + let totalResults = 0; + if(resp && resp.properties.length + resp['related-to'].length > 0){ + if(this.props.match.params.type === "nodeState"){ + totalResults = 1; + }else{ + //wait to generate entries to set this + totalResults = 0; + } + } + this.setState( + { + totalResults : totalResults, + enableBusyFeedback:false, + }); + if(resp){ + this.generateEntries(resp.properties, resp['related-to'], resp['node-actions']); + } + console.log('After service call ......',this.state); + console.log('[History.jsx] results : ', resp); + }, error=>{ + this.triggerError(error, 'lifecycle'); + }).catch(error => { + this.triggerError(error, 'lifecycle'); + }); + }; + triggerError = (error, type) => { + console.error('[History.jsx] error : ', JSON.stringify(error)); + let errMsg = ''; + if (error.response) { + // The request was made and the server responded with a status code + // that falls out of the range of 2xx + console.log(error.response.data); + console.log(error.response.status); + console.log(error.response.headers); + if(error.response.status){ + errMsg += " Code: " + error.response.status; + } + if(error.response.data){ + errMsg += " - " + JSON.stringify(error.response.data); + } + } else if (error.request) { + // The request was made but no response was received + // `error.request` is an instance of XMLHttpRequest in the browser and an instance of + // http.ClientRequest in node.js + console.log(error.request); + errMsg += " - Request was made but no response received"; + } else { + // Something happened in setting up the request that triggered an Error + console.log('Error', error.message); + errMsg += " - Unknown error occurred " + error.message; + } + //Suppress 404's because that is just no results + if(error.response && error.response.status === 404){ + errMsg = ''; + } + if(type === 'lifecycle'){ + this.setState({ + lifecycleErrMsg: errMsg, + enableBusyFeedback: false, + totalResults: 0 + }); + }else if (type === 'changes'){ + this.setState({ + showSlider:true, + changesErrMsg: errMsg + }); + }else if (type === 'historic'){ + console.log('[History.jsx] historical node state error : ', error); + this.setState( + { + showState: true, + splitScreenCard: true, + nodeHistoryState : null, + enableBusyHistoryStateFeedback:false, + enableBusyDiffFeedback:false, + historyErrMsg: errMsg + }); + }else if (type === 'current'){ + this.setState( + { + nodeCurrentState : null, + currentErrMsg: errMsg, + enableBusyRecentFeedback:false + }); + }else{ + console.log('[History.jsx] triggerError method called without a type.' ); + } + } + + componentWillReceiveProps(nextProps) { + console.log('[History.jsx] componentWillReceiveProps'); + console.log('[History.jsx] next nodeUri:', atob(nextProps.match.params.nodeUriEnc)); + console.log('[History.jsx] this nodeUri:', atob(this.props.match.params.nodeUriEnc)); + + if (nextProps.match.params.nodeUriEnc + && nextProps.match.params.type + && nextProps.match.params.epochTime + && ((nextProps.match.params.nodeUriEnc !== this.props.match.params.nodeUriEnc) || + (nextProps.match.params.type !== this.props.match.params.type) || + (nextProps.match.params.epochTime !== this.props.match.params.epochTime)) + ) { + this.initState(); + this.props = nextProps; + this.beforefetchInventoryData(); + } + }; + + handlePageChange = (pageNumber) => { + console.log('[History.jsx] HandelPageChange active page is', pageNumber); + this.setState( + { activePage: pageNumber, enableBusyFeedback: true }, + function () { this.beforefetchInventoryData(); }.bind(this) + ); + }; + + // HELPER FUNCTIONS + isContaining = (nameKey, listArray) => { + let found = false; + listArray.map((lists) => { + if (lists.id === nameKey) { + found = true; + } + }); + return found; + }; + + stateHistoryFormat = (event) =>{ + this.setState({ currentStateHistoryValue: event.target.value, selectedHistoryStateFormatted: moment(event.target.value).format('dddd, MMMM Do, YYYY h:mm:ss A')}); + }; + changeHistoryState = () =>{ + console.log('minEpochStateTime: ' + this.state.minEpochStateTime); + console.log('maxEpochStartTime: ' + this.state.maxEpochStartTime); + console.log('stepEpochStateTime: ' + this.state.stepEpochStateTime); + console.log('currentStateHistoryValue: ' + this.state.currentStateHistoryValue); + console.log("Calling the route again with a new timestamp"); + this.props.history.push('/history/' + this.props.match.params.type + '/' + this.props.match.params.nodeType + '/' + this.props.match.params.nodeUriEnc + '/' + this.state.currentStateHistoryValue); + } + filterList = (event) =>{ + var updatedList = this.state.entries; + updatedList = updatedList.filter((entry) =>{ + return JSON.stringify(entry).toLowerCase().search( + event.target.value.toLowerCase()) !== -1; + }); + this.setState({filteredEntries: updatedList, totalResults: updatedList.length}); + } + + setHistoricStateValues = (currValue) =>{ + this.setState({currentStateHistoryValue: currValue, selectedHistoryStateFormatted: moment(currValue).format('dddd, MMMM Do, YYYY h:mm:ss A')}); + } + + navigateHistory = (time) =>{ + this.props.history.push('/history/' + this.props.match.params.type + '/' + this.props.match.params.nodeType + '/' + this.props.match.params.nodeUriEnc + '/' + time); + } + + setStateValue = (key, value) =>{ + this.setState((state) => { key : value }); + } + getStateValue = (stateVar) => { + return this.state[stateVar]; + } + + render() { + console.log('[History Props] render: ', JSON.stringify(this.props) + 'elements : ', this.elements); + console.log('[History nodeUri] render: ', atob(this.props.match.params.nodeUriEnc)); + if(INVLIST.isHistoryEnabled){ + return ( + <div> + <header className='addPadding jumbotron my-4'> + <h1 className='display-2'>Network Element History</h1> + <p className='lead'> + On this page you have the ability to view a network element in its current and historic state. + The attributes are clickable to view extended information about who and when they were last updated. + {this.props.match.params.type === "nodeLifeCycle" || this.props.match.params.type === "nodeLifeCycleSince" + ? 'The table at the bottom of the page shows a list of all updates made on the network element (it is filterable).\n' + + 'Click an update in that table to rebuild the historic state at the time of the update.\n' + + 'A difference will be displayed between the current state and the historic state in the center.' : ''} + </p> + </header> + <Grid fluid={true} className='addPadding'> + <Row> + <Col className='col-lg-12'> + <div className='card d3-model-card'> + <div className='card-header model-card-header'> + <h2>{this.pageTitle}</h2> + </div> + <Row className={this.state.changesErrMsg ? 'show' : 'hidden'} > + <div className='addPaddingTop alert alert-danger' role="alert"> + An error occurred while trying to get the state changes, please try again later. If this issue persists, please contact the system administrator. {this.state.changesErrMsg} + </div> + </Row> + { (this.state.isState && this.state.showSlider && this.state.showTicks) && ( + <div className='card-header'> + <Row className='show-grid'> + <Col md={3}> + <ReactBootstrapSlider + value={this.state.currentStateHistoryValue} + change={this.stateHistoryFormat} + slideStop={this.stateHistoryFormat} + step={ 1 } + ticks={ this.state.sliderTickArray } + ticks_snap_bounds={ 10000 } + orientation="horizontal" /> + <p>{this.state.selectedHistoryStateFormatted}</p> + <button type='button' className='btn btn-outline-primary' onClick={this.changeHistoryState}>Refresh</button> + </Col> + <AnimationControls playControlsDisabled={true} get={this.getStateValue} set={this.setStateValue} tickArray={this.state.sliderTickArray} currentValue={this.state.currentStateHistoryValue} setValueState={this.setHistoricStateValues} setNavigate={this.navigateHistory} /> + </Row> + </div>)} + { (this.state.isState && this.state.showSlider && !this.state.showTicks) && ( + <div className='card-header'> + <Row className='show-grid'> + <Col md={12}> + <ReactBootstrapSlider + value={this.state.currentStateHistoryValue} + change={this.stateHistoryFormat} + slideStop={this.stateHistoryFormat} + step={this.state.stepEpochStateTime} + max={this.state.maxEpochStartTime} + min={this.state.minEpochStartTime} + orientation="horizontal" /> + <p>{this.state.selectedHistoryStateFormatted}</p> + <button type='button' className='btn btn-outline-primary' onClick={this.changeHistoryState}>Refresh</button> + </Col> + </Row> + </div>)} + <div className='card-content model-card-content'> + <div> + <Row className='show-grid'> + <Col md={12}> + <Spinner loading={this.state.enableBusyHistoryStateFeedback && this.state.showState}> + {this.state.showState && !this.historyErrMsg && (<HistoryCard split={this.state.splitScreenCard} node={this.state.nodeHistoryState}/>)} + <Row className={this.state.historyErrMsg ? 'show' : 'hidden'} > + <div className='addPaddingTop alert alert-danger' role="alert"> + An error occurred while trying to get the historic state, please try again later. If this issue persists, please contact the system administrator. {this.state.historyErrMsg} + </div> + </Row> + </Spinner> + <Spinner loading={this.state.showState && this.state.enableBusyDiffFeedback}> + {this.state.showState && (<NodeDiffCard diff={this.state.nodeDiff}/>)} + </Spinner> + <Spinner loading={this.state.enableBusyRecentFeedback}> + { !this.currentErrMsg && (<HistoryCard split={this.state.splitScreenCard} node={this.state.nodeCurrentState}/>)} + <Row className={this.state.currentErrMsg ? 'show' : 'hidden'} > + <div className='addPaddingTop alert alert-danger' role="alert"> + An error occurred while trying to get the current state, please try again later. If this issue persists, please contact the system administrator. {this.state.currentErrMsg} + </div> + </Row> + </Spinner> + <hr /> + <span className='resultMessage'>{this.resultsMessage}</span> + </Col> + </Row> + </div> + </div> + <div className='card-footer'> + <strong>Tip:</strong> <em>Click any attribute to view more details</em> + </div> + </div> + </Col> + </Row> + <Row> + <div className={'addPaddingTop alert alert-danger ' + (this.state.lifecycleErrMsg ? 'show' : 'hidden')} role="alert"> + An error occurred while trying to get the list of updates on the current node, please try again later. If this issue persists, please contact the system administrator. {this.state.lifecycleErrMsg} + </div> + {this.state.showLifeCycle && !this.state.lifecycleErrMsg && ( + <Col className='col-lg-12'> + <div className='card d3-model-card'> + <div className='card-header model-card-header'> + <h2 className={this.props.match.params.type === "nodeLifeCycle" ? 'show' : 'hidden'}>All Updates on {this.state.nodeDisplay}</h2> + <h2 className={this.props.match.params.type === "nodeLifeCycleSince" ? 'show' : 'hidden'}>All Updates on {this.state.nodeDisplay} Since {this.state.selectedHistoryStateFormatted}</h2> + </div> + <div className='card-header'> + <p><strong>Tip:</strong> <em>Click any update to view the state of the node at that point in time</em></p> + <div> + <h5>Total Results: <strong>{this.state.totalResults}</strong></h5> + </div> + <div> + <form> + <fieldset className="form-group"> + <input type="text" className="form-control form-control-lg" placeholder="Search" onChange={this.filterList}/> + </fieldset> + </form> + </div> + </div> + <div className='card-content model-card-content'> + <Spinner loading={this.state.enableBusyFeedback}> + <div> + <HistoryGallery nodeId={atob(this.props.match.params.nodeUriEnc)} entries={this.state.filteredEntries} triggerState={this.triggerHistoryStateCall}/> + </div> + </Spinner> + </div> + </div> + </Col> )} + </Row> + </Grid> + </div> + ); + }else{ + return(<p>History Not Enabled for this instance, please check config.</p>) + } + } +} + +export default History; diff --git a/src/app/model/history/HistoryActions.js b/src/app/model/history/HistoryActions.js new file mode 100644 index 0000000..4060806 --- /dev/null +++ b/src/app/model/history/HistoryActions.js @@ -0,0 +1,19 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ diff --git a/src/app/model/history/HistoryConstants.js b/src/app/model/history/HistoryConstants.js new file mode 100644 index 0000000..2d4108e --- /dev/null +++ b/src/app/model/history/HistoryConstants.js @@ -0,0 +1,25 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +export const HistoryConstants = { + UPDATE_INVENTORY_DATA : 'UPDATE_INVENTORY_DATA', + RESULTS_PER_PAGE : 50 , + PAGE_RANGE_DISPLAY : 10 +}; diff --git a/src/app/model/history/HistoryQuery.jsx b/src/app/model/history/HistoryQuery.jsx new file mode 100644 index 0000000..f001f97 --- /dev/null +++ b/src/app/model/history/HistoryQuery.jsx @@ -0,0 +1,814 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React, { Component } from 'react'; +import { connect } from 'react-redux'; + +import commonApi from 'utils/CommonAPIService.js'; +import deepDiffMapper from 'utils/DiffUtil.js'; +import {GlobalExtConstants} from 'utils/GlobalExtConstants.js'; + +import moment from "moment"; +import Grid from 'react-bootstrap/lib/Grid'; +import Row from 'react-bootstrap/lib/Row'; +import Col from 'react-bootstrap/lib/Col'; +import Button from 'react-bootstrap/lib/Button'; +import Modal from 'react-bootstrap/lib/Modal'; +import * as d3 from "d3"; +import 'd3-selection-multi'; +import ReactBootstrapSlider from 'react-bootstrap-slider'; +import HistoryCard from './components/HistoryCard.jsx'; +import NodeDiffCard from './components/NodeDiffCard.jsx'; +import AnimationControls from './components/AnimationControls.jsx'; +import TopologyDiffCard from './components/TopologyDiffCard.jsx'; +import OutputVisualization, {Visualization} from 'generic-components/OutputVisualization.jsx'; + + + +let INVLIST = GlobalExtConstants.INVLIST; + +/** + * This class is to show visualizations of queries and show a historical state + */ + +class HistoryQuery extends Component { + + svgWidth = window.outerWidth * 0.8; + elements = []; + pageTitle = ''; + nodeType = ''; + nodeResults = ''; + + constructor(props) { + console.log(props); + super(props); + this.state = { + totalResults: 0, + enableBusyRecentFeedback: true, + enableBusyHistoryStateFeedback: true, + enableBusyDiffFeedback: true, + data: [], + nodes: [], + payload: ((this.props.match.params.type == 'cq') ? atob(this.props.match.params.payloadEnc) : { "dsl" : atob(this.props.match.params.payloadEnc)}), + topologyCurrentState: null, + topologyHistoryState: null, + currentStateHistoryValue: parseInt(this.props.match.params.epochTime), + stepEpochStateTime: 1000, + maxEpochStartTime: Math.round(new Date().getTime()), + minEpochStartTime: parseInt(this.props.match.params.epochTime) - 259200000, + nodeDiff: null, + selectedHistoryStateFormatted: moment(parseInt(this.props.match.params.epochTime)).format('dddd, MMMM Do, YYYY h:mm:ss A'), + queryDisplay: ((this.props.match.params.type == 'cq') ? JSON.parse(atob(this.props.match.params.payloadEnc)).query : atob(this.props.match.params.payloadEnc)), + currentGraphNodes: [], + currentGraphLinks: [], + historicGraphNodes: [], + historicGraphLinks: [], + selectedNodeHistoryState: null, + selectedNodeCurrentState: null, + showNodeModal: false, + showTopologyDiffModal: false, + nodeDisplay: '', + totalDiff: null, + showSlider: false, + sliderTickArray: null, + showTicks: INVLIST.showTicks, + rawMappedCurrentState: null, + rawMappedHistoricState: null, + isPlaying: false, + isPaused: false, + isStopped: false, + intervalId: null, + diffOverlayOn: false, + currentErrMsg: null, + historicErrMsg: null + + }; + console.log('minEpochStateTime: '+this.state.minEpochStateTime); + console.log('maxEpochStartTime: '+this.state.maxEpochStartTime); + console.log('stepEpochStateTime: '+this.state.stepEpochStateTime); + console.log('currentStateHistoryValue: '+this.state.currentStateHistoryValue); + } + resultsMessage = ''; + componentDidMount = () => { + console.log('[HistoryQuery.jsx] componentDidMount props available are', JSON.stringify(this.props)); + if(INVLIST.isHistoryEnabled){ + this.getCurrentStateCall(this.getSettings()); + } + }; + + componentWillUnmount = () => { + console.log('[History.jsx] componentWillUnMount'); + } + beforefetchInventoryData = (param) => { + if (param) { + this.setState({}); + } else { + this.fetchInventoryData(); + } + }; + initState = () =>{ + this.setState({ + totalResults: 0, + enableBusyRecentFeedback: true, + enableBusyHistoryStateFeedback: true, + enableBusyDiffFeedback: true, + data: [], + nodes: [], + payload : ((this.props.match.params.type == 'cq') ? atob(this.props.match.params.payloadEnc) : { "dsl" : atob(this.props.match.params.payloadEnc)}), + topologyHistoryState: null, + topologyCurrentState: null, + stepEpochStateTime: 1000, + maxEpochStartTime: Math.round(new Date().getTime()), + minEpochStartTime: parseInt(this.props.match.params.epochTime) - 259200000, + nodeDiff: null, + queryDisplay: ((this.props.match.params.type == 'cq') ? JSON.parse(atob(this.props.match.params.payloadEnc)).query : atob(this.props.match.params.payloadEnc)), + currentGraphNodes: [], + currentGraphLinks: [], + historicGraphNodes: [], + historicGraphLinks: [], + selectedNodeHistoryState: null, + selectedNodeCurrentState: null, + showNodeModal: false, + showTopologyDiffModal: false, + nodeDisplay: '', + totalDiff: null, + showSlider: false, + sliderTickArray: null, + rawMappedCurrentState: null, + rawMappedHistoricState: null, + showTicks: INVLIST.showTicks, + diffOverlayOn: false, + currentErrMsg: null, + historicErrMsg: null + }); + } + getSettings = () => { + const settings = { + 'NODESERVER': INVLIST.NODESERVER, + 'PROXY': INVLIST.PROXY, + 'PREFIX': INVLIST.PREFIX, + 'VERSION': INVLIST.VERSION, + 'USESTUBS': INVLIST.useStubs + }; + return settings; + } + fetchInventoryData = (param) => { + console.log('fetchInventoryData', param); + }; + + generateDiffArray = (arr) => { + let tempArray = {}; + tempArray['properties'] = []; + tempArray['related-to'] = []; + + for (var i = 0; i < arr.properties.length; i++ ){ + if(arr.properties[i].key !== "length"){ + tempArray['properties'][arr.properties[i].key] = arr.properties[i]; + }else{ + tempArray['properties']["LENGTH"] = arr.properties[i]; + } + } + for (var j = 0; j < arr['related-to'].length; j++ ){ + tempArray['related-to'][arr['related-to'][j].url] = arr['related-to'][j]; + } + return tempArray; + } + + getCurrentStateCall = (settings,url,param) =>{ + let path = ""; + let stubPath = ""; + if(this.props.match.params.type == 'cq'){ + path = 'query'; + stubPath = 'currentCQState'; + }else{ + path = 'dsl'; + stubPath = "currentBYOQState"; + } + this.setState({currentErrMsg:null}); + commonApi(settings, path + '?format=state', 'PUT', this.state.payload, stubPath, null, 'history-traversal') + .then(res => { + this.getHistoryStateCall(this.getSettings()); + Visualization.chart('currentState', this.state.currentGraphNodes, this.state.currentGraphLinks, res.data, this); + this.setState( + { + topologyCurrentState : res.data, + enableBusyRecentFeedback: false + }); + console.log('After recent node service call ......',this.state); + console.log('[HistoryQuery.jsx] recent node results : ', res.data); + }, error=>{ + this.triggerError(error, "current"); + }).catch(error => { + this.triggerError(error, "current"); + }); + }; + triggerError = (error, type) => { + console.error('[HistoryQuery.jsx] error : ', JSON.stringify(error)); + let errMsg = ''; + if (error.response) { + // The request was made and the server responded with a status code + // that falls out of the range of 2xx + console.log(error.response.data); + console.log(error.response.status); + console.log(error.response.headers); + if(error.response.status){ + errMsg += " Code: " + error.response.status; + } + if(error.response.data){ + errMsg += " - " + JSON.stringify(error.response.data); + } + } else if (error.request) { + // The request was made but no response was received + // `error.request` is an instance of XMLHttpRequest in the browser and an instance of + // http.ClientRequest in node.js + console.log(error.request); + errMsg += " - Request was made but no response received"; + } else { + // Something happened in setting up the request that triggered an Error + console.log('Error', error.message); + errMsg += " - Unknown error occurred " + error.message; + } + //Suppress 404's because that is just no results + if(error.response && error.response.status === 404){ + errMsg = ''; + } + if(type === 'current'){ + this.setState({ + topologyCurrentState : null, + currentErrMsg: errMsg, + enableBusyRecentFeedback:false + }); + }else if (type === 'historic'){ + if(this.state.isPlaying){ + this.setState({ + isPlaying: false, + isStopped: true, + isPaused: false }); + }else{ + this.setState({ + topologyHistoryState : null, + nodeDiff: null, + enableBusyDiffFeedback: false, + enableBusyHistoryStateFeedback:false, + historicErrMsg: errMsg + }); + } + }else{ + console.log('[HistoryQuery.jsx] tiggerError method called without a type.' ); + } + } + getHistoryStateCall = (settings, url, param, timeStamp) =>{ + let path = ""; + let stubPath = ""; + let stubChangesPath = ""; + if(this.props.match.params.type == 'cq'){ + path = 'query'; + stubPath = 'historicalCQState'; + stubChangesPath = 'historicalCQChanges'; + }else{ + path = 'dsl'; + stubPath = 'historicalBYOQState'; + stubChangesPath = 'historicalBYOQChanges'; + } + let ts = this.state.currentStateHistoryValue; + if(timeStamp){ + ts = parseInt(timeStamp); + } + this.setState({historicErrMsg:null}); + commonApi(settings, path + "?format=state" + "&startTs=" + ts + "&endTs=" + ts, 'PUT', this.state.payload, stubPath, null, 'history-traversal') + .then(res => { + Visualization.chart('historicState', this.state.historicGraphNodes, this.state.historicGraphLinks, res.data, this); + this.setState( + { + topologyHistoryState : res.data, + enableBusyHistoryStateFeedback: false + }); + console.log('After historical node state service call ......',this.state); + console.log('[HistoryQuery.jsx] historical node state results : ', res.data); + if(this.state.topologyHistoryState != null && this.state.topologyCurrentState != null){ + let topologyDiffHistoryArr = []; + let topologyDiffCurrentArr = []; + let tempNodeCurrentState = []; + let tempNodeHistoricState = []; + for( var i = 0; i < this.state.topologyHistoryState.results.length; i++ ){ + topologyDiffHistoryArr[this.state.topologyHistoryState.results[i].url] = this.generateDiffArray(this.state.topologyHistoryState.results[i]); + tempNodeHistoricState[this.state.topologyHistoryState.results[i].url] = this.state.topologyHistoryState.results[i]; + } + for( var j = 0; j < this.state.topologyCurrentState.results.length; j++ ){ + topologyDiffCurrentArr[this.state.topologyCurrentState.results[j].url] = this.generateDiffArray(this.state.topologyCurrentState.results[j]); + tempNodeCurrentState[this.state.topologyCurrentState.results[j].url] = this.state.topologyCurrentState.results[j]; + } + var result = deepDiffMapper.map(topologyDiffHistoryArr, topologyDiffCurrentArr); + console.log("diff map" + result); + this.setState({ totalDiff: result, enableBusyDiffFeedback: false, rawMappedCurrentState: tempNodeCurrentState, rawMappedHistoricState: tempNodeHistoricState}); + }else{ + this.setState({ enableBusyDiffFeedback: false }); + } + }, error=>{ + this.triggerError(error, "historic"); + }).catch(error => { + this.triggerError(error, "historic"); + }); + if(this.state.showTicks){ + commonApi(settings, path + "?format=changes", 'PUT', this.state.payload, stubChangesPath, null, 'history-traversal') + .then(res => { + let tickTempArray = []; + for(var j = 0; j < res.data.results.length; j++ ){ + for(var k = 0; k < res.data.results[j].changes.length; k++){ + if(!tickTempArray.includes(res.data.results[j].changes[k])){ + tickTempArray.push(res.data.results[j].changes[k]); + } + } + } + let tickArray = tickTempArray.sort(function(a, b) { + var compareA = a; + var compareB = b; + if(compareA < compareB) return -1; + if(compareA > compareB) return 1; + return 0; + }); + console.log("tick array: " + tickArray); + this.setState({showSlider:true, sliderTickArray: tickArray}); + }).catch(error => { + console.log('[HistoryQuery.jsx] historical node changes error : ', error); + this.setState({showSlider:false}); + }); + }else{ + this.setState({showSlider:true}); + } + }; + +componentWillReceiveProps(nextProps) { + console.log('[History.jsx] componentWillReceiveProps'); + console.log('[History.jsx] next payloadEnc:', atob(nextProps.match.params.payloadEnc)); + console.log('[History.jsx] this payloadEnc:', atob(this.props.match.params.payloadEnc)); + + if (nextProps.match.params.payloadEnc + && nextProps.match.params.type + && nextProps.match.params.epochTime + && ((nextProps.match.params.payloadEnc !== this.props.match.params.payloadEnc) || + (nextProps.match.params.type !== this.props.match.params.type) || + (nextProps.match.params.epochTime !== this.props.match.params.epochTime)) + ) { + this.props = nextProps; + this.initState(); + this.getCurrentStateCall(this.getSettings()); + } + }; + + handlePageChange = (pageNumber) => { + console.log('[History.jsx] HandelPageChange active page is', pageNumber); + this.setState({}); + }; + + stateHistoryFormat = (event) =>{ + this.setState({ currentStateHistoryValue: event.target.value, selectedHistoryStateFormatted: moment(event.target.value).format('dddd, MMMM Do, YYYY h:mm:ss A')}); + }; + + changeHistoryState = () =>{ + console.log('minEpochStateTime: ' + this.state.minEpochStateTime); + console.log('maxEpochStartTime: ' + this.state.maxEpochStartTime); + console.log('stepEpochStateTime: ' + this.state.stepEpochStateTime); + console.log('currentStateHistoryValue: ' + this.state.currentStateHistoryValue); + console.log("Calling the route again with a new timestamp"); + this.props.history.push('/historyQuery/' + this.props.match.params.type + '/' + this.props.match.params.payloadEnc + '/' + this.state.currentStateHistoryValue); + } + + viewTopologyComp = () =>{ + this.setState({ + showTopologyDiffModal: true + }); + } + + resetGraph = () =>{ + Visualization.chart('currentState', this.state.currentGraphNodes, this.state.currentGraphLinks, this.state.topologyCurrentState, this); + Visualization.chart('historicState', this.state.historicGraphNodes, this.state.historicGraphLinks, this.state.topologyHistoryState, this); + } + + addOverlay = (elementType, key, modificationType) =>{ + let chartToOverlay = 'currentState'; + let color = ''; + let modIcon = ''; + if (modificationType === "deleted"){ + chartToOverlay = "historicState"; + } + switch (modificationType){ + case 'deleted': + color = 'red'; + modIcon = '-'; + break; + case 'created': + color = 'green'; + modIcon = '+'; + break; + case 'modified': + color = 'orange'; + modIcon = '*'; + break; + default: + console.log("hit default " + modificationType); + } + if(key){ + key = (((decodeURIComponent(key)).replace(new RegExp('\/', 'g'),'-')).replace(new RegExp(':', 'g'),'-')).replace(new RegExp('\\.', 'g'),'-'); + }else{ + key=''; + } + console.log("adding overlay item for - element type: " + elementType + " key: " + key + " modificationType: " + modificationType ); + let elementKey = elementType + chartToOverlay + key; + let element = d3.select("#" + elementKey); + + if(elementType === "line"){ + element.attrs({ 'stroke': color, 'stroke-opacity': .6, 'stroke-width': '3px'}); + } + if(elementType === "nodeIcon"){ + element.classed("nodeIcon-" + modificationType, true); + let elementKeyNode = 'node' + chartToOverlay + key; + let elementNode = d3.select("#" + elementKeyNode); + elementNode.append("text") + .attr("dy", 10) + .attr("dx", 35) + .attr('font-size', 25) + .text(modIcon); + } + //Need to also add to historicGraph for modifications in addition to current + if(modificationType === 'modified'){ + let elementKeyMod = elementType + 'historicState' + key; + let elementMod = d3.select("#" + elementKeyMod); + elementMod.classed("nodeIcon-" + modificationType, true); + + let elementKeyModNode = 'nodehistoricState' + key; + let elementModNode = d3.select("#" + elementKeyModNode); + elementModNode.append("text") + .attr("dy", 10) + .attr("dx", 35) + .attr('font-size', 25) + .text(modIcon); + } + } + + viewTopologyCompVisual = () =>{ + if(this.state.diffOverlayOn){ + this.setState({ diffOverlayOn: false}); + this.resetGraph(); + }else if(this.state.totalDiff){ + this.setState({ diffOverlayOn: true}); + const properties = Object.entries(this.state.totalDiff).forEach((prop) => { + if (prop){ + let propWorkaround = prop; + if(prop.data){ + propWorkaround = prop.data; + } + let tempProp = propWorkaround[1]; + let attributeProperties = ''; + let relationships = ''; + let topLevelType = tempProp.type; + let alreadyHighlighted = false; + if(topLevelType){ + this.addOverlay('nodeIcon', propWorkaround[0], topLevelType); + //set this to not mark as modified when it is added new + alreadyHighlighted = true; + } + if(!topLevelType && tempProp.properties){ + for (var key in tempProp.properties) { + if (tempProp.properties.hasOwnProperty(key)) { + let property = tempProp.properties[key]; + if(property && ((property.value && property.value.type !== 'unchanged') || property.type)){ + this.addOverlay('nodeIcon', propWorkaround[0], 'modified'); + break; + } + } + } + } + if(tempProp['related-to'] || tempProp.data['related-to']){ + let rel = null; + let topLevelType = null; + if(tempProp['related-to']){ + rel = tempProp['related-to']; + }else if (tempProp.data['related-to']) { + rel = tempProp.data['related-to']; + topLevelType = tempProp.type; + } + relationships = Object.entries(rel).forEach((property) => { + let relationProp = property[1]; + if(relationProp && relationProp.type && relationProp.type.type && relationProp.type.type !== "unchanged"){ + //do nothing since we only care about additions and deletions on relationships, should not be considered modified + console.log("relationship considered modified: id: " + relationProp.id + " type: "+ relationProp.type + " mod type: " + relationProp.type.type) + }else if(relationProp && relationProp.type && !relationProp.type.type && relationProp.url && relationProp.url.data){ + if(!alreadyHighlighted){ + this.addOverlay('nodeIcon', propWorkaround[0], 'modified'); + } + this.addOverlay('line', relationProp.id.data, relationProp.type); + }else if (relationProp && relationProp.type && relationProp.data){ + if(!alreadyHighlighted){ + this.addOverlay('nodeIcon', propWorkaround[0], 'modified'); + } + this.addOverlay('line', relationProp.data.id, relationProp.type); + }else if (topLevelType){ + if(!alreadyHighlighted){ + this.addOverlay('nodeIcon', propWorkaround[0], 'modified'); + } + this.addOverlay('line', relationProp.id, topLevelType); + } + }); + } + }else{ + //No changes, do nothing + } + }); + + }else{ + // do nothing if no diff + } + } + + closeTopologyDiffModal = () => { + this.setState({ + showTopologyDiffModal: false + }); + } + openNodeModal(nodeDisplay, nodeUri, nodeType){ // open modal + console.log('history >> showModal'); + this.setState({ nodeDiff: this.state.totalDiff[nodeUri]}); + nodeDisplay = "State Comparison of " + nodeUri; + if(!this.state.rawMappedHistoricState[nodeUri]){ + this.state.rawMappedHistoricState[nodeUri] = {}; + } + if(!this.state.rawMappedCurrentState[nodeUri]){ + this.state.rawMappedCurrentState[nodeUri] = {}; + } + this.state.rawMappedHistoricState[nodeUri].primaryHeader = "Historic State of " + nodeDisplay; + this.state.rawMappedCurrentState[nodeUri].primaryHeader = "Current State of " + nodeDisplay; + if(nodeDisplay){ + this.setState({ + nodeDisplay: nodeDisplay, + selectedNodeHistoryState: this.state.rawMappedHistoricState[nodeUri], + selectedNodeCurrentState: this.state.rawMappedCurrentState[nodeUri], + focusedNodeUri: nodeUri, + focusedNodeType: nodeType, + showNodeModal:true + }); + }else{ + this.setState({ + showNodeModal:true + }); + } + } + closeNodeModal = () => { + this.setState({ + showNodeModal: false + }); + } + + getStateIndex = () =>{ + return this.state.sliderTickArray.indexOf(this.state.currentStateHistoryValue); + } + + navigateAnimation = (index, command) => { + if(!command){ + this.setState({isPlaying:false, isStopped: false, isPaused: true, currentStateHistoryValue: this.state.sliderTickArray[index], selectedHistoryStateFormatted: moment(this.state.sliderTickArray[index]).format('dddd, MMMM Do, YYYY h:mm:ss A')}); + }else if (command === 'play'){ + this.setState({currentStateHistoryValue: this.state.sliderTickArray[index], selectedHistoryStateFormatted: moment(this.state.sliderTickArray[index]).format('dddd, MMMM Do, YYYY h:mm:ss A')}); + } + this.props.history.push('/historyQuery/' + this.props.match.params.type + '/' + this.props.match.params.payloadEnc + '/' + this.state.sliderTickArray[index]); + } + + play = () =>{ + if(this.state.isPlaying){ + if(!this.state.enableBusyHistoryStateFeedback){ + var index = Math.min(this.state.sliderTickArray.length - 1, this.getStateIndex() + 1); + if(this.state.sliderTickArray.length > this.getStateIndex() + 1){ + this.navigateAnimation(this.getStateIndex() + 1, 'play'); + + }else{ + this.setState({isPlaying:false, isStopped: true, isPaused: false}); + } + } + }else{ + clearInterval(this.state.intervalId); + } + } + + animationControl = (controlType) => { + console.log("Control was hit: " + controlType); + switch(controlType){ + case 'play': + if(!this.state.isPlaying){ + this.setState({isPlaying:true, isStopped: false, isPaused: false, intervalId: setInterval(this.play, INVLIST.animationIntervalMs)}); + } + break; + case 'pause': + if(this.state.isPlaying){ + clearInterval(this.state.intervalId); + this.setState({isPlaying:false, isPaused: true}); + } + break; + case 'stop': + if(this.state.isPlaying || this.state.isPaused){ + clearInterval(this.state.intervalId); + this.setState({isPlaying:false, isStopped: true, isPaused: false}); + } + break; + case 'skipForwardStep': + var index = Math.min(this.state.sliderTickArray.length - 1, this.getStateIndex() + 1); + this.navigateAnimation(index); + break; + case 'skipBackwardStep': + var index = Math.max(0, this.getStateIndex() - 1); + this.navigateAnimation(index); + break; + case 'skipForwardLast': + this.navigateAnimation(this.state.sliderTickArray.length - 1); + break; + case 'skipBackwardEpoch': + this.navigateAnimation(0); + break; + default: + this.setState({isPlaying:false, isStopped: false, isPaused: false}); + break; + } + } + // START: These functions are for the animation controls + setHistoricStateValues = (currValue) =>{ + this.setState({currentStateHistoryValue: currValue, selectedHistoryStateFormatted: moment(currValue).format('dddd, MMMM Do, YYYY h:mm:ss A')}); + } + + navigateHistory = (time) =>{ + this.props.history.push('/historyQuery/' + this.props.match.params.type + '/' + this.props.match.params.payloadEnc + '/' + time); + } + + setStateValue = (key, value) =>{ + this.setState((state) => { key : value }); + } + getStateValue = (stateVar) => { + return this.state[stateVar]; + } + clear = (interval) =>{ + clearInterval(interval); + } + // END + + render() { + if(INVLIST.isHistoryEnabled){ + return ( + <div> + <header className='addPadding jumbotron my-4'> + <h1 className='display-2'>History Visualization</h1> + <p className='lead'> + On this page you have the ability to view a series of network elements in their current and historic state. + Zooming and panning are enabled in the graphs. You can use the scrollwheel to zoom and click+drag to pan. + If a node is single clicked you can drag the elements to reposition them. Double-clicking a node will + show the comparison between the two nodes in a pop-up modal. Animation controls are provided to seemlessly transition between states. + You can view the graph difference in a visual form by clicking View Visual Comparison. + </p> + </header> + <Grid fluid={true} className="addPadding"> + <Row className={this.state.currentErrMsg ? 'show' : 'hidden'} > + <div className='addPaddingTop alert alert-danger' role="alert"> + An error occurred while trying to get current information, please try again later. If this issue persists, please contact the system administrator. {this.state.currentErrMsg} + </div> + </Row> + <Row className={!this.state.currentErrMsg ? 'show' : 'hidden'} > + <Col className='col-lg-12'> + <div className='card d3-history-query-card'> + <div className='card-header history-query-card-header'> + <h2><strong>Current State</strong> of <em>{this.state.queryDisplay}</em></h2> + </div> + <div className={'card-header ' + (this.state.topologyHistoryState ? '' : 'hidden')}> + <button type='button' className='btn btn-outline-primary' onClick={this.viewTopologyCompVisual}>Toggle Visual Comparison</button> + </div> + <div className='history-query-card-content'> + {!this.state.topologyCurrentState || (this.state.topologyCurrentState.results && this.state.topologyCurrentState.results.length === 0) && (<div className='addPaddingTop'><p>No current state for this query</p></div>)} + <OutputVisualization identifier="currentState" width={this.svgWidth} height="600" overflow="scroll"/> + </div> + <div className='card-footer'> + <strong>Tip:</strong> <em>Click and drag network elements to reposition them, double-click nodes to see the node detail comparison. In addition: The graph supports pinch zoom or scrollwheel for zooming. Panning can be done by single-click and drag.</em> + </div> + </div> + </Col> + </Row> + <Row className={this.state.historicErrMsg ? 'show' : 'hidden'} > + <div className='addPaddingTop alert alert-danger' role="alert"> + An error occurred, while trying to get historic information, please try again later. If this issue persists, please contact the system administrator. {this.state.historicErrMsg} + </div> + </Row> + <Row className={!this.state.historicErrMsg ? 'show' : 'hidden'}> + <Col className='col-lg-12'> + <div className='card d3-history-query-card'> + <div className='card-header history-query-card-header'> + <h2><strong>Historical State</strong> of <em>{this.state.queryDisplay}</em> at {moment(parseInt(this.props.match.params.epochTime)).format('dddd, MMMM Do, YYYY h:mm:ss A')}</h2> + </div> + <div className='card-header'> + { (this.state.showSlider && this.state.showTicks) && (<Row className='show-grid'> + <Col md={3}> + <ReactBootstrapSlider + value={this.state.currentStateHistoryValue} + change={this.stateHistoryFormat} + slideStop={this.stateHistoryFormat} + step={ 1 } + ticks={ this.state.sliderTickArray } + ticks_snap_bounds={ 10000 } + orientation="horizontal" /> + </Col> + <Col md={8}> + <i className='icon-controls-skipbackstartover animationControlIcon' onClick={() => this.animationControl('skipBackwardEpoch')} role="img"></i> + <i className='icon-controls-rewind animationControlIcon' onClick={() => this.animationControl('skipBackwardStep')} role="img"></i> + <i className={'icon-controls-pointer ' + (this.state.isPlaying ? 'animationPlayingIcon' : 'animationControlIcon')} onClick={() => this.animationControl('play')} role="img"></i> + <i className={'icon-controls-pause ' + (this.state.isPaused ? 'animationPausedIcon' : 'animationControlIcon')} onClick={() => this.animationControl('pause')} role="img"></i> + <i className={'icon-controls-stop ' + (this.state.isStopped ? 'animationStoppedIcon' : 'animationControlIcon')} onClick={() => this.animationControl('stop')} role="img"></i> + <i className='icon-controls-fastforward animationControlIcon' onClick={() => this.animationControl('skipForwardStep')} role="img"></i> + <i className='icon-controls-skipforward animationControlIcon' onClick={() => this.animationControl('skipForwardLast')} role="img"></i> + </Col> + </Row> + )} + { (this.state.showSlider && !this.state.showTicks) && (<ReactBootstrapSlider + value={this.state.currentStateHistoryValue} + change={this.stateHistoryFormat} + slideStop={this.stateHistoryFormat} + step={this.state.stepEpochStateTime} + max={this.state.maxEpochStartTime} + min={this.state.minEpochStartTime} + orientation="horizontal" />)} + + <p>{this.state.selectedHistoryStateFormatted}</p> + <button type='button' className='btn btn-outline-primary' onClick={this.changeHistoryState}>Refresh</button> + </div> + <div className='history-query-card-content' > + {!this.state.topologyHistoryState || (this.state.topologyHistoryState.results && this.state.topologyHistoryState.results.length === 0) && (<div className="addPaddingTop"><p>No state during this time period</p></div>)} + <OutputVisualization identifier="historicState" width={this.svgWidth} height="600" overflow="scroll"/> + </div> + <div className={'card-footer ' + (this.state.topologyHistoryState ? '' : 'hidden')}> + <strong>Tip:</strong> <em>Click and drag network elements to reposition them, double-click nodes to see the node detail comparison. In addition: The graph supports pinch zoom or scrollwheel for zooming. Panning can be done by single-click and drag.</em> + </div> + </div> + + </Col> + </Row> + </Grid> + <div className='static-modal'> + <Modal show={this.state.showNodeModal} onHide={this.closeNodeModal} dialogClassName="modal-override"> + <Modal.Header> + <Modal.Title>Retrieve {this.state.nodeDisplay} History</Modal.Title> + </Modal.Header> + <Modal.Body> + <Grid fluid={true}> + <Row className='show-grid'> + <Col md={4}> + <HistoryCard node={this.state.selectedNodeHistoryState}/> + </Col> + <NodeDiffCard diff={this.state.nodeDiff}/> + <Col md={4}> + <HistoryCard node={this.state.selectedNodeCurrentState}/> + </Col> + </Row> + </Grid> + </Modal.Body> + <Modal.Footer> + <Button onClick={this.closeNodeModal}>Close</Button> + </Modal.Footer> + </Modal> + </div> + <div className='static-modal'> + <Modal show={this.state.showTopologyDiffModal} onHide={this.closeTopologyDiffModal}> + <Modal.Header> + <Modal.Title>Retrieve Topology History</Modal.Title> + </Modal.Header> + <Modal.Body> + <Grid fluid={true}> + <Row className='show-grid'> + <Col md={12}> + <TopologyDiffCard node={this.state.totalDiff}/> + </Col> + </Row> + </Grid> + </Modal.Body> + <Modal.Footer> + <Button onClick={this.closeTopologyDiffModal}>Close</Button> + </Modal.Footer> + </Modal> + </div> + </div> + ); + }else{ + return(<p>History Not Enabled for this instance, please check config.</p>) + } + } +} + +export default HistoryQuery; diff --git a/src/app/model/history/HistoryReducer.js b/src/app/model/history/HistoryReducer.js new file mode 100644 index 0000000..27456ec --- /dev/null +++ b/src/app/model/history/HistoryReducer.js @@ -0,0 +1,43 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import {HistoryConstants} from './HistoryConstants'; + +const initalState = { + inventoryData: [] +}; + +export default (state = initalState, action) => { + switch (action.type) { + case(HistoryConstants.UPDATE_INVENTORY_DATA): + console.log('[HistoryReducer] action.data:', action.data); + return { + ...state, + inventoryData: action.data + }; + default: + return { + ...state + }; + } + +}; + + diff --git a/src/app/model/history/components/AnimationControls.jsx b/src/app/model/history/components/AnimationControls.jsx new file mode 100644 index 0000000..3f1eb92 --- /dev/null +++ b/src/app/model/history/components/AnimationControls.jsx @@ -0,0 +1,126 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; +import Col from 'react-bootstrap/lib/Col'; + +class AnimationControls extends Component { + constructor(props){ + console.log(props); + super(props); + this.props = props; + } + + getIndex = () =>{ + return (this.props.get('sliderTickArray')).indexOf(this.props.get('currentStateHistoryValue')); + } + + navigateAnimation = (index, command) => { + if(!command){ + this.props.set('isPlaying',false); + this.props.set('isStopped', false); + this.props.set('isPaused', true); + this.props.setValueState((this.props.get('sliderTickArray'))[index]); + }else if (command === 'play'){ + this.props.setValueState((this.props.get('sliderTickArray'))[index]); + } + this.props.setNavigate((this.props.get('sliderTickArray'))[index]); + } + + play = () =>{ + if(this.props.get('isPlaying')){ + var index = Math.min((this.props.get('sliderTickArray')).length - 1, this.getIndex() + 1); + this.navigateAnimation(this.getIndex() + 1, 'play'); + if(index === (this.props.get('sliderTickArray')).length - 1){ + this.props.set('isPlaying', false); + this.props.set('isStopped', true); + this.props.set('isPaused', false); + } + }else{ + this.props.clear(this.props.get('intervalId')); + } + } + + animationControl = (controlType) => { + console.log("Control was hit: " + controlType); + switch(controlType){ + case 'play': + if(!this.props.get('isPlaying')){ + if(!this.props.get('intervalId')){ + this.props.set('intervalId', setInterval(this.play, 10000)); + } + this.props.set('isPlaying', true); + this.props.set('isStopped', false); + this.props.set('isPaused', false); + } + break; + case 'pause': + if(this.props.get('isPlaying')){ + this.props.clear(this.props.get('intervalId')); + this.props.set('isPlaying', false); + this.props.set('isPaused', true); + } + break; + case 'stop': + if(this.props.get('isPlaying') || this.props.get('isPaused')){ + this.props.clear(this.props.get('intervalId')); + this.props.set('isPlaying', false); + this.props.set('isStopped', true); + this.props.set('isPaused', false); + } + break; + case 'skipForwardStep': + var index = Math.min((this.props.get('sliderTickArray')).length - 1, this.getIndex() + 1); + this.navigateAnimation(index); + break; + case 'skipBackwardStep': + var index = Math.max(0, this.getIndex() - 1); + this.navigateAnimation(index); + break; + case 'skipForwardLast': + this.navigateAnimation((this.props.get('sliderTickArray')).length - 1); + break; + case 'skipBackwardEpoch': + this.navigateAnimation(0); + break; + default: + this.props.set('isPlaying', false); + this.props.set('isStopped', false); + this.props.set('isPaused', false); + break; + } + } + render(){ + return ( + <Col md={8}> + <i className='icon-controls-skipbackstartover animationControlIcon' onClick={() => this.animationControl('skipBackwardEpoch')} role="img"></i> + <i className='icon-controls-rewind animationControlIcon' onClick={() => this.animationControl('skipBackwardStep')} role="img"></i> + { !this.props.playControlsDisabled && (<span><i className={'icon-controls-pointer ' + (this.props.get('isPlaying') ? 'animationPlayingIcon' : 'animationControlIcon')} onClick={() => this.animationControl('play')} role="img"></i> + <i className={'icon-controls-pause ' + (this.props.get('isPaused') ? 'animationPausedIcon' : 'animationControlIcon')} onClick={() => this.animationControl('pause')} role="img"></i> + <i className={'icon-controls-stop ' + (this.props.get('isStopped') ? 'animationStoppedIcon' : 'animationControlIcon')} onClick={() => this.animationControl('stop')} role="img"></i></span>)} + <i className='icon-controls-fastforward animationControlIcon' onClick={() => this.animationControl('skipForwardStep')} role="img"></i> + <i className='icon-controls-skipforward animationControlIcon' onClick={() => this.animationControl('skipForwardLast')} role="img"></i> + </Col> + ); + } +}; + +export default AnimationControls; diff --git a/src/app/model/history/components/HistoryCard.jsx b/src/app/model/history/components/HistoryCard.jsx new file mode 100644 index 0000000..39d7f57 --- /dev/null +++ b/src/app/model/history/components/HistoryCard.jsx @@ -0,0 +1,101 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React from 'react'; +import moment from "moment"; +import Col from 'react-bootstrap/lib/Col'; +import Panel from 'react-bootstrap/lib/Panel'; + +const historyCard = (props) => { + if(props && props.node && props.node.properties){ + const properties = (props.node.properties).map((prop, idx) => { + return ( + <Panel> + <Panel.Heading className="custom-accordion"> + <Panel.Title toggle> <strong>{prop.key}</strong> : {'' + prop.value}</Panel.Title> + </Panel.Heading> + <Panel.Collapse> + <Panel.Body className='cardwrap'> + <p><strong>Last Updated By:</strong> {prop.sot}</p> + <p><strong>Last Updated (time):</strong> {moment(prop.timestamp).format('dddd, MMMM Do, YYYY h:mm:ss A')}</p> + <p><strong>Transaction Id:</strong> {(prop['tx-id']) ? prop['tx-id'] : 'N/A'}</p> + </Panel.Body> + </Panel.Collapse> + </Panel> + ); + }); + + //TODO handle no relationships and no attributes + + const relationships = (props.node['related-to']).map((prop, idx) => { + return ( + <p key={idx}><strong>{prop['node-type']}:</strong> {prop.url} {prop['relationship-label']} (added by {prop.sot} on {moment(prop.timestamp).format('dddd, MMMM Do, YYYY h:mm:ss A')})</p> + ); + }); + + return ( + <Col className={""+(props.split ? 'col-lg-4' : 'col-lg-12')}> + <div className='card model-card'> + <div className='card-header'> + <h4 className='card-title'>{props.node.primaryHeader}</h4> + </div> + <div className='card-header'> + {props.node.secondaryHeader} + </div> + <div className='card-content model-card-content'> + {properties} + </div> + <div className='card-footer'> + <Panel> + <Panel.Heading> + <Panel.Toggle> + <button type='button' className='btn btn-outline-primary'> + Relationships + </button> + </Panel.Toggle> + </Panel.Heading> + <Panel.Collapse> + <Panel.Body className='cardwrap'> + {relationships} + </Panel.Body> + </Panel.Collapse> + </Panel> + </div> + </div> + </Col> + ); + }else{ + return( + <Col className={""+(props.split ? 'col-lg-4' : 'col-lg-12')}> + <div className='card model-card'> + <div className='card-header'> + <h4 className='card-title'>No State Found</h4> + </div> + <div className='card-content model-card-content'> + No State was found at the provided timestamp. Please try another timestamp. + </div> + </div> + </Col> + ); + } +}; + +export default historyCard; + diff --git a/src/app/model/history/components/HistoryEntry.jsx b/src/app/model/history/components/HistoryEntry.jsx new file mode 100644 index 0000000..7b1a297 --- /dev/null +++ b/src/app/model/history/components/HistoryEntry.jsx @@ -0,0 +1,55 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; +import Col from 'react-bootstrap/lib/Col'; + +class HistoryEntry extends Component { + constructor(props){ + console.log(props); + super(props); + this.props = props; + } + + render(){ + this.triggerState = () => { + this.props.triggerState(this.props.entryNodeId, this.props.entryEpoch); + } + return ( + <a className={"list-group-item list-group-item-action flex-column align-items-start "+ (this.props.entryAction === 'Deleted' ? 'group-item-danger' : '')} + onClick={this.triggerState}> + <div className='d-flex w-100 justify-content-between'> + <h3 className="mb-1">{this.props.entryHeader}</h3> + <h3 className="mb-1">{this.props.entryBody}</h3> + <small>{this.props.entryDate}</small> + </div> + <div> + <small>Modified by {this.props.entrySOT}</small> + </div> + <div> + <small>Transaction Id : {this.props.entryTransId}</small> + </div> + </a> + ); + } +}; + +export default HistoryEntry; diff --git a/src/app/model/history/components/HistoryGallery.jsx b/src/app/model/history/components/HistoryGallery.jsx new file mode 100644 index 0000000..0e4c011 --- /dev/null +++ b/src/app/model/history/components/HistoryGallery.jsx @@ -0,0 +1,65 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React from 'react'; +import Grid from 'react-bootstrap/lib/Grid'; +import Row from 'react-bootstrap/lib/Row'; +import HistoryEntry from './HistoryEntry.jsx'; +/** + * This function will take all of the node objects and turn them into + * a ui grid of HistoryCard components. This function is essentially a container + * for the HistoryCards + * @param props + * @returns {*} + */ +const HistoryGallery = (props) => { + + let entries = null; + if (props.entries && props.entries.length > 0) { + entries = props.entries.map((entry, idx) => { + return ( + <HistoryEntry + key={idx} + triggerState={props.triggerState} + entryKey={entry.key} + entryType={entry.type} + entryValue={entry.value} + entryBody= {entry.body} + entryHeader= {entry.header} + entrySOT={entry.sot} + entryAction= {entry.action} + entryEpoch= {entry.timeRank} + entryNodeId= {props.nodeId} + entryDate={entry.displayTimestamp} + entryTransId = {entry['tx-id']}/> + ); + }); + }else{ + return (<p>No History</p>); + } + + return ( + <div className="list-group"> + {entries} + </div> + ); +}; + +export default HistoryGallery; diff --git a/src/app/model/history/components/NodeDiffCard.jsx b/src/app/model/history/components/NodeDiffCard.jsx new file mode 100644 index 0000000..2bc2a82 --- /dev/null +++ b/src/app/model/history/components/NodeDiffCard.jsx @@ -0,0 +1,106 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React from 'react'; +import moment from "moment"; +import Col from 'react-bootstrap/lib/Col'; +import Panel from 'react-bootstrap/lib/Panel'; + +const nodeDiffCard = (props) => { + let showNoPropsMessage = true; + let showNoRelationshipsMessage = true; + if(props && props.diff && props.diff.properties){ + const properties = Object.entries(props.diff.properties).map((property, idx) => { + let prop = property[1]; + if(prop && prop.value && prop.value.type !== 'unchanged'){ + showNoPropsMessage = false; + return ( + <div> + <p><strong>Attribute:</strong> {prop.key.data} ({prop.value.type})</p> + </div> + ); + }else if (prop && prop.type){ + showNoPropsMessage = false; + return ( + <div> + <p><strong>Attribute:</strong> {prop.data.key} ({prop.type})</p> + </div> + ); + } + }); + + //TODO handle no relationships and no attributes + + const relationships = Object.entries(props.diff['related-to']).map((property, idx) => { + let prop = property[1]; + if(prop && prop.type && prop.type.type){ + return (''); + }else if(prop && prop.type && !prop.data){ + showNoRelationshipsMessage = false; + return ( + <div> + <p><strong>Relationship</strong>: {prop['relationship-label'].data} {prop['node-type'].data} {prop.url.data} ({prop.type})</p> + </div> + ); + }else if (prop && prop.type && prop.data){ + showNoRelationshipsMessage = false; + return ( + <div> + <p><strong>Relationship</strong>: {prop.data['relationship-label']} {prop.data['node-type']} {prop.data.url} ({prop.type})</p> + </div> + ); + } + }); + + return ( + <Col className='col-lg-4'> + <div className='card model-card'> + <div className='card-header'> + <h4 className='card-title'>Changes from Historic to Current State</h4> + </div> + <div className='card-header'></div> + <div className='card-content model-card-content'> + {properties} + <div className={showNoPropsMessage ? 'show' : 'hidden'}><p><strong>No Attribute differences, current.</strong></p></div> + {relationships} + <div className={showNoRelationshipsMessage ? 'show' : 'hidden'}><p><strong>No Relationship differences, current.</strong></p></div> + </div> + </div> + </Col> + ); + }else{ + return( + <Col className='col-lg-4'> + <div className='card model-card'> + <div className='card-header'> + <h4 className='card-title'>Unable to pull diff</h4> + </div> + <div className='card-header'></div> + <div className='card-content model-card-content'> + Diff unable to be calculated currently, choose a different timeframe. + </div> + </div> + </Col> + ); + } +}; + +export default nodeDiffCard; + diff --git a/src/app/model/history/components/TopologyDiffCard.jsx b/src/app/model/history/components/TopologyDiffCard.jsx new file mode 100644 index 0000000..9d49b17 --- /dev/null +++ b/src/app/model/history/components/TopologyDiffCard.jsx @@ -0,0 +1,151 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React from 'react'; +import moment from "moment"; +import Col from 'react-bootstrap/lib/Col'; +import Panel from 'react-bootstrap/lib/Panel'; + +const topologyDiffCard = (props) => { + let showNoNodesMessage = true; + if(props && props.node){ + const properties = Object.entries(props.node).map((prop, idx) => { + if (prop){ + showNoNodesMessage = false; + let showNoRelationshipsMessage = true; + let showNoAttributesMessage = true; + let propWorkaround = prop; + if(prop.data){ + propWorkaround = prop.data; + } + let tempProp = propWorkaround[1]; + let attributeProperties = ''; + let relationships = ''; + if(tempProp.properties){ + attributeProperties = Object.entries(tempProp.properties).map((property, idx) => { + let attrProp = property[1]; + if(attrProp && attrProp.value && attrProp.value.type !== 'unchanged'){ + showNoAttributesMessage = false; + return ( + <div> + <p><strong>Attribute:</strong> {attrProp.key.data} ({attrProp.value.type})</p> + </div> + ); + }else if (attrProp && attrProp.type){ + showNoAttributesMessage = false; + return ( + <div> + <p><strong>Attribute:</strong> {attrProp.data.key} ({attrProp.type})</p> + </div> + ); + } + }); + } + if(tempProp['related-to'] || tempProp.data['related-to']){ + let rel = null; + let topLevelType = null; + if(tempProp['related-to']){ + rel = tempProp['related-to']; + }else if (tempProp.data['related-to']) { + rel = tempProp.data['related-to']; + topLevelType = tempProp.type; + } + relationships = Object.entries(rel).map((property, idx) => { + let relationProp = property[1]; + if(relationProp && relationProp.type && relationProp.type.type && relationProp.type.type !== "unchanged"){ + return (''); + }else if(relationProp && relationProp.type && !relationProp.type.type && relationProp.url && relationProp.url.data){ + showNoRelationshipsMessage = false; + return ( + <div> + <p><strong>Relationship</strong>: {relationProp['relationship-label'].data} {relationProp['node-type'].data} {relationProp.url.data} ({relationProp.type})</p> + </div> + ); + }else if (relationProp && relationProp.type && relationProp.data){ + showNoRelationshipsMessage = false; + return ( + <div> + <p><strong>Relationship</strong>: {relationProp.data['relationship-label']} {relationProp.data['node-type']} {relationProp.data.url} ({relationProp.type})</p> + </div> + ); + }else if (topLevelType){ + showNoRelationshipsMessage = false; + return ( + <div> + <p><strong>Relationship</strong>: {relationProp['relationship-label']} {relationProp['node-type']} {relationProp.url} ({topLevelType})</p> + </div> + ); + } + }); + } + return ( + <Panel> + <Panel.Heading className="custom-accordion"> + <Panel.Title toggle><strong>Node:</strong> {prop[0]} <p className={tempProp.type ? 'show' : 'hidden'}>({tempProp.type})</p></Panel.Title> + </Panel.Heading> + <Panel.Collapse> + <Panel.Body className='cardwrap'> + {attributeProperties} + <div className={showNoAttributesMessage ? 'show' : 'hidden'}><p><strong>No Attribute differences, current.</strong></p></div> + {relationships} + <div className={showNoRelationshipsMessage ? 'show' : 'hidden'}><p><strong>No Relationship differences, current.</strong></p></div> + </Panel.Body> + </Panel.Collapse> + </Panel> + ); + }else{ + <div> + <p><strong>Node changes in the topology states</strong></p> + </div> + } + }); + + return ( + <Col className='col-lg-12'> + <div className='card model-card'> + <div className='card-header'> + <h4 className='card-title'>Changes from Historic to Current State</h4> + </div> + <div className='card-header'></div> + <div className='card-content model-card-content'> + {properties} + </div> + </div> + </Col> + ); + }else{ + return( + <Col className='col-lg-12'> + <div className='card model-card'> + <div className='card-header'> + <h4 className='card-title'>Unable to pull diff</h4> + </div> + <div className='card-header'></div> + <div className='card-content model-card-content'> + Diff unable to be calculated currently, choose a different timeframe. + </div> + </div> + </Col> + ); + } +}; + +export default topologyDiffCard; + diff --git a/src/app/model/modelSearch/Model.jsx b/src/app/model/modelSearch/Model.jsx new file mode 100644 index 0000000..9a49be9 --- /dev/null +++ b/src/app/model/modelSearch/Model.jsx @@ -0,0 +1,846 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React, { Component } from 'react'; +import { connect } from 'react-redux'; +import Filter from 'generic-components/filter/Filter.jsx'; +import OutputToggle from 'generic-components/OutputToggle.jsx'; +import {ExportExcel} from 'utils/ExportExcel.js'; +import commonApi from 'utils/CommonAPIService.js'; +import {GlobalExtConstants} from 'utils/GlobalExtConstants.js'; +import Spinner from 'utils/SpinnerContainer.jsx'; +import ModelGallery from './components/ModelGallery.jsx'; +import DatePicker from 'react-datepicker'; +import moment from "moment"; +import ModelBreadcrumb from './components/ModelBreadcrumb.jsx'; +import Grid from 'react-bootstrap/lib/Grid'; +import Row from 'react-bootstrap/lib/Row'; +import Col from 'react-bootstrap/lib/Col'; +import Button from 'react-bootstrap/lib/Button'; +import Modal from 'react-bootstrap/lib/Modal'; +import Pagination from 'react-js-pagination'; +import { ModelConstants } from './ModelConstants'; +import OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger'; +import Tooltip from 'react-bootstrap/lib/Tooltip'; +import DownloadRangeModel from 'generic-components/DownloadRangeModel.jsx'; +import BootstrapSwitchButton from 'bootstrap-switch-button-react'; + +let INVLIST = GlobalExtConstants.INVLIST; +let DOWNLOAD_ALL = GlobalExtConstants.DOWNLOAD_ALL; +let generateExcels = ExportExcel.generateExcels; +let buildAttrList = ExportExcel.buildAttrList; +let DOWNLOAD_TOOLTIP = GlobalExtConstants.DOWNLOAD_TOOLTIP; +let ENVIRONMENT = GlobalExtConstants.ENVIRONMENT; +let APERTURE_SERVICE = JSON.parse(sessionStorage.getItem(ENVIRONMENT + 'APERTURE_SERVICE')); +let filterTypeList = GlobalExtConstants.FILTER_TYPES; +let TABULAR_FILTER_TYPE = GlobalExtConstants.TABULAR_FILTER_TYPE; +let URI_DELIMITCHAR = GlobalExtConstants.URI_DELIMITCHAR; +/*const mapStateToProps = ({extensibility: {extModelReducer} }) => { + let {inventoryData} = extModelReducer; + return { + inventoryData + }; +};*/ + + const mapStateToProps = (state) => { + return { + currState: state.modelReducer + }; +}; + +const mapActionToProps = (dispatch) => { + return { + onInventoryDataReceived: (data) => { + dispatch({ type: 'UPDATE_INVENTORY_DATA', data: data }); + } + }; +}; + +/** + * This class is used to handle any url interactions for models. + * When a user selects a inventory item in browse or special search, + * this model class should be used to handle the url + params and query + * the proxy server. + */ + +export class model extends Component { + + elements = []; + filterQuery = ''; + pageTitle = ''; + nodeType = ''; + historyStackString = ''; + typeOfCall = true; + nodeResults = ''; + downloadTooltip = DOWNLOAD_TOOLTIP; + downloadAllTooltip = 'Downloads First ' + DOWNLOAD_ALL + ' Results'; + downloadRangeTooltip= 'Downloads Results By Custom Range Selection'; + initialFilterSelectedList = []; + initialFilterMessage = []; + initialNonDisplay = true; + constructor(props) { + console.log(props); + APERTURE_SERVICE = JSON.parse(sessionStorage.getItem(ENVIRONMENT + 'APERTURE_SERVICE')); + super(props); + var filterSelectedList = []; + var seletedFilter = []; + var filterMessage = []; + var nonDisplay = true; + var enableToggle= JSON.parse(sessionStorage.getItem(ENVIRONMENT + 'ENABLE_ANALYSIS')); + TABULAR_FILTER_TYPE=(APERTURE_SERVICE && enableToggle)?'CONTAINS':'='; + if (this.props.match.params.type) { + seletedFilter = this.props.match.params.type.split(';'); + seletedFilter.map((param) => { + console.log('param', param); + console.log('param.indexOf(=)', param.indexOf('=')); + if (param.indexOf(URI_DELIMITCHAR+'='+URI_DELIMITCHAR) !== -1) { + let id = param.split(URI_DELIMITCHAR+'='+URI_DELIMITCHAR)[0]; + let value = param.split(URI_DELIMITCHAR+'='+URI_DELIMITCHAR)[1]; + filterSelectedList.push({ 'id': id, 'value': value, 'type':'='}); + filterMessage.push(id+'='+value); + enableToggle=false; + }else{ + for(var x in filterTypeList){ + if (param.indexOf(URI_DELIMITCHAR+filterTypeList[x]+URI_DELIMITCHAR) !== -1) { + let paramArray=param.split(URI_DELIMITCHAR+filterTypeList[x]+URI_DELIMITCHAR); + let id = paramArray[0]; + let value = paramArray[1]; + filterSelectedList.push({ 'id': id, 'value': value, 'type': filterTypeList[x]}); + filterMessage.push(id+filterTypeList[x]+value); + enableToggle=true; + } + } + } + }); + } + if (this.props.match.params.nodeId) { + nonDisplay = false; + } + if(this.props.match.params.page==='false'){ + enableToggle=false; + } + if(!this.props.location.historyStackString){ + this.props.location.historyStackString = this.props.location.pathname + ',,Origin||'; + }else{ + this.historyStackString = this.props.location.historyStackString; + } + this.state = { + activePage: 1, + totalResults: 0, + enableBusyFeedback: true, + data: [], + filterList: [], + nodes: [], + filterSelected: (this.props.match.params.type) ? this.props.match.params.type.split(';')[0] : '', + filterDisplay: 'Select Filter', + filterTypeDisplay: 'Filter Type', + filterMessage: filterMessage, + filterSelectedList: filterSelectedList, + isRunEnable: false, + isFilterEnable: nonDisplay, + isPaginationEnable: nonDisplay, + showHistoryModal: false, + nodeDisplay: 'test', + startDate: moment(), + historyType: 'nodeState', + enableCalendar: true, + focusedNodeUri: 0, + viewName: localStorage.getItem(GlobalExtConstants.ENVIRONMENT + '_' + sessionStorage.getItem(GlobalExtConstants.ENVIRONMENT + 'userId') + '_viewPreference') || 'CardLayout', + errorResults: false, + errorMessage: '', + showResults: false, + resetColumnFilters: true, + defaultViewName: localStorage.getItem(GlobalExtConstants.ENVIRONMENT + '_' + sessionStorage.getItem(GlobalExtConstants.ENVIRONMENT + 'userId') + '_viewPreference') || 'CardLayout', + isPageNumberChange: false, + totalPages: 0, + pageRange: 1, + showDownloadResultsModal: false, + errorDownloadResults:false, + downloadErrorMsg: '', + enableModelBusyFeedback:false, + downloadCount:DOWNLOAD_ALL, + enableRealTime: enableToggle + }; + this.baseState=this.state; + } + resultsMessage = ''; + componentDidMount = () => { + console.log('[Model.jsx] componentDidMount props available are', JSON.stringify(this.props)); + if (this.state.isFilterEnable) { + this.populateFilteringOptions(); + } + this.initialFilterSelectedList = this.state.filterSelectedList; + this.initialFilterMessage = this.state.filterMessage; + this.initialNonDisplay = this.state.isFilterEnable; + this.beforefetchInventoryData(); + }; + handleDateChange = (newDate) =>{ + this.setState({ startDate: moment(+newDate) }); + console.log('[Model.jsx] handleDateChange date is ', this.state.startDate); + console.log('[Model.jsx] handleDateChange date is in millis ', +this.state.startDate); + } + openHistory = (nodeDisplay, nodeUri, nodeType) => { // open modal + console.log('history >> showModal'); + let historyNodeUri = (nodeUri)?nodeUri.replace('/aperture/','/'):nodeUri;//replace always first occurence + if(nodeDisplay){ + this.setState({ + nodeDisplay: nodeDisplay, + focusedNodeUri: historyNodeUri, + focusedNodeType: nodeType, + showHistoryModal:true + }); + }else{ + this.setState({ + showHistoryModal:true + }); + } + } + closeHistory = () => { + this.setState({ + showHistoryModal: false + }); + } + submitHistory = () => { + //do some logic in history + console.log("submitting history"); + let epochStartTime = (this.state.startDate).unix(); + this.props.history.push('/history/' + this.state.historyType+'/' + this.nodeType + '/' + btoa(this.state.focusedNodeUri) + '/' + epochStartTime * 1000); + } + setHistoryType(event) { + console.log(event.target.value); + let enableCalendar = false; + if(event.target.value === 'nodeLifeCycle'){ + enableCalendar = false; + }else{ + enableCalendar = true; + } + this.setState({ + historyType: event.target.value, + enableCalendar: enableCalendar + }); + console.log(this.state.enableCalendar); + } + setViewName(event) { + console.log(event.currentTarget.value); + this.setState({ + viewName: event.currentTarget.value + }); + } + setDefaultViewName = (event) =>{ + let ENVIRONMENT = GlobalExtConstants.ENVIRONMENT; + let layout = event.target.value; + + if(sessionStorage.getItem(ENVIRONMENT + 'userId')) { + if (event.target.checked) { + localStorage.setItem(ENVIRONMENT + '_' + sessionStorage.getItem(ENVIRONMENT + 'userId') + '_viewPreference', layout); + } else { + localStorage.removeItem(ENVIRONMENT + '_' + sessionStorage.getItem(ENVIRONMENT + 'userId') + '_viewPreference'); + } + } + + this.setState({ + defaultViewName: event.target.value + }); + this.baseState.viewName=event.target.value; + this.baseState.defaultViewName=event.target.value; + } + componentWillUnmount = () => { + console.log('[Model.jsx] componentWillUnMount'); + this.props.onInventoryDataReceived([]); + } + beforefetchInventoryData = (param) => { + this.typeOfCall = true; + if (param) { + this.props.onInventoryDataReceived([]); + this.formFilterQuery(param.filterMessage); + this.setState( + { enableBusyFeedback: true, activePage: 1, totalResults: 0, totalPages: 0,filterMessage: param.filterMessage, filterSelectedList: param.filterSelectedList}, + function () { this.fetchInventoryData(param); }.bind(this) + ); + } else { + this.formFilterQuery(this.state.filterMessage); + this.fetchInventoryData(); + } + }; + + formFilterQuery = (filterMessage) => { + let filterQuery = filterMessage.join('&'); + this.filterQuery = (filterMessage.length > 0) ? '&' + filterQuery : ''; + }; + + fetchInventoryData = (param) => { + console.log('fetchInventoryData', param); + this.resultsMessage = ''; + const inventory = INVLIST.INVENTORYLIST; + let url = ''; + console.log('[Model.jsx] fetchInventoryData nodeId= ', this.props.match.params.nodeId); + if (this.props.match.params.type !== undefined && this.props.match.params.type !== null) { + this.nodeType = this.props.match.params.type; + } + console.log('[Model.jsx] nodeType: ' + this.nodeType); + let pageName = this.nodeType.split(';')[0].replace(/\s/g, '').toUpperCase(); + console.log('[Model.jsx] pageName: ' + pageName); + if (inventory[pageName] && inventory[pageName].display) { + this.pageTitle = inventory[pageName].display; + } else { + this.pageTitle = pageName; + } + var nonRelationshipState = false; + if (this.props.match.params.nodeId) { + this.setUri(this.props.location.uri); + this.setBreadcrumb(this.props.location.uri); + url = sessionStorage.getItem(ENVIRONMENT + 'URI'); + if(this.state.enableRealTime){ + let versionPattern="^"+INVLIST.VERSION+"\\/"; + var versionRegularExp = new RegExp(versionPattern, 'g'); + let matchVersion = url.match(versionRegularExp,'g'); + if(!matchVersion){ + url= INVLIST.VERSION+'/'+url; + } + } + } else { + url = inventory[pageName].apiPath; + this.setBreadcrumb(url); + nonRelationshipState=true; + } + console.log('[Model.jsx] active page', this.state.activePage); + console.log('this.state.filterSelectedList', this.state.filterSelectedList); + console.log('filterQuery', this.filterQuery); + //Aperture with Diff Filter types Operater + this.nodeResults = ''; + var method = 'GET'; + var payload = {}; + const settings = { + 'NODESERVER': INVLIST.NODESERVER, + 'PROXY': INVLIST.PROXY, + 'PREFIX': INVLIST.PREFIX, + 'VERSION': INVLIST.VERSION, + 'USESTUBS': INVLIST.useStubs, + 'APERTURE': INVLIST.APERTURE, + 'APERTURE_SERVICENAME':INVLIST.APERTURE_SERVICENAME + }; + if(this.state.enableRealTime){ + settings['ISAPERTURE'] = (nonRelationshipState)? true : false; + }else{ + if(!(this.state.enableRealTime && nonRelationshipState)){ + url = (url)?url.replace(INVLIST.VERSION+'/',''):url; + } + } + if(this.state.enableRealTime && nonRelationshipState){ + var filterList=this.state.filterSelectedList; + var filters = []; + for(var k in filterList){ + if(filterList.hasOwnProperty(k)){ + let filter ={} + filter['filter']= filterList[k].type; + filter['key'] = filterList[k].id; + filter['value'] = filterList[k].value; + filters.push(filter); + } + } + method= 'POST'; + payload['node-type'] = url.split('/')[1]; + payload['filter-version'] = 'v1'; + payload['filters'] = filters; + }else{ + payload = null; + } + + var path = '?format=simple&resultIndex=' + this.state.activePage + '&resultSize='; + if(this.typeOfCall){ + path = path + ModelConstants.RESULTS_PER_PAGE; + url=(this.state.enableRealTime && nonRelationshipState)? path: url + path + this.filterQuery; + this.commonApiServiceCall(settings,url,param,method,payload); + }else{ + let pagerange=this.state.pageRange.toString(); + pagerange=pagerange.split('-'); + if(pagerange.length > 1){ + path = '?format=simple&resultIndex=' + parseInt(pagerange[0]) + '&resultSize='+ ModelConstants.RESULTS_PER_PAGE + '&resultRangeEnd=' + parseInt(pagerange[1]); + }else{ + path = '?format=simple&resultIndex=' + 1 + '&resultSize=' + parseInt(pagerange); + } + url=(this.state.enableRealTime && nonRelationshipState)? path: url + path + this.filterQuery; + this.commonApiServiceCallForAllData(settings,url,method,payload); + } + }; + commonApiServiceCall = (settings,url,param,method,payload) =>{ + + commonApi(settings, url, method, payload, 'modelDefault') + .then(res => { + // Call dispatcher to update state + console.log('once before service call ......',this.state); + this.resultsMessage = ''; + var totalResults = parseInt(res.headers['total-results']); + let downloadCount = DOWNLOAD_ALL; + if(totalResults > DOWNLOAD_ALL){ + this.downloadAllTooltip = DOWNLOAD_ALL + ' results out of '+ totalResults +' will be downloaded, please filter results further to obtain full report'; + }else{ + this.downloadAllTooltip = (totalResults === 1) ? 'Downloads ' + totalResults + ' Results' : 'Downloads all ' + totalResults + ' Results' + downloadCount= totalResults; + } + this.setState( + { + nodes : res.data.results, + totalResults : res.headers['total-results'], + totalPages: res.headers['total-results'], + enableBusyFeedback:false, + showResults: true, + errorResults: false, + downloadCount: downloadCount, + filterSelectedList:(param)?param.filterSelectedList:this.state.filterSelectedList + },function(){this.props.onInventoryDataReceived(res.data.results);}); + + console.log('After service call ......',this.state); + console.log('[Model.jsx] results : ', res); + }, error=>{ + this.triggerError(error); + }).catch(error => { + this.triggerError(error); + }); + }; + commonApiServiceCallForAllData = (settings,url,method,payload) => { + + commonApi(settings, url,method, payload, 'modelDefault') + .then(res => { + // Call dispatcher to update state + console.log('once before service call ......',this.state); + this.resultsMessage = ''; + this.nodeResults = res.data.results; + let totalResults = parseInt(res.headers['total-results']); + let totalPages = parseInt(res.headers['total-pages']); + this.setState({totalPages:totalPages,errorDownloadResults:false,downloadErrorMsg:''},() => {this.getAllExcels()}); + console.log('[Model.jsx] results : ', res); + }).catch(error => { + console.log('[Model.jsx] error : ', error); + this.nodeResults = ''; + let errMsg = this.renderErrorMsg(error); + this.setState({ enableBusyFeedback: false,errorDownloadResults:true,downloadErrorMsg:errMsg,enableModelBusyFeedback:false}); + }); + }; + + triggerError = (error) => { + console.error('[Model.jsx] error : ', JSON.stringify(error)); + this.props.onInventoryDataReceived([]); + this.resultsMessage = 'No Results Found'; + this.downloadAllTooltip = 'Downloads First ' + DOWNLOAD_ALL + ' Results'; + this.nodeResults = ''; + this.setState({ + enableBusyFeedback: false, + totalResults: 0, + totalPages: 0, + showResults: false, + errorResults: true + }); + let errMsg = this.renderErrorMsg(error); + //Suppress Error Message when 404 results not found occur + if(error.response && error.response.status === 404){ + this.setState({errorMessage:'', errorResults:false}); + }else{ + this.setState({errorMessage:errMsg}); + } + }; + renderErrorMsg = (error) =>{ + let errMsg=''; + if (error.response) { + // The request was made and the server responded with a status code + // that falls out of the range of 2xx + console.log(error.response.data); + console.log(error.response.status); + console.log(error.response.headers); + if(error.response.status){ + errMsg += " Code: " + error.response.status; + } + if(error.response.data){ + errMsg += " - " + JSON.stringify(error.response.data); + } + } else if (error.request) { + // The request was made but no response was received + // `error.request` is an instance of XMLHttpRequest in the browser and an instance of + // http.ClientRequest in node.js + console.log(error.request); + errMsg += " - Request was made but no response received"; + } else { + // Something happened in setting up the request that triggered an Error + console.log('Error', error.message); + errMsg += " - Unknown error occurred " + error.message; + } + + console.log(error.config); + return errMsg; + } + + componentWillReceiveProps(nextProps) { + console.log('[Model.jsx] componentWillReceiveProps'); + console.log('[Model.jsx] next nodeId:', nextProps.match.params.nodeId); + console.log('[Model.jsx] this nodeId:', this.props.match.params.nodeId); + + if(nextProps.match.params.nodeId !== undefined && this.props.match.params.nodeId !== undefined){ + if (nextProps.match.params.nodeId && nextProps.match.params.nodeId + !== this.props.match.params.nodeId) { + this.props = nextProps; + this.beforefetchInventoryData(); + } + } + }; + + setUri(uri) { + let delimiter = '\/'; + let start = 3; + let tokens = uri.split(delimiter).slice(start); + let result = tokens.join(delimiter); + sessionStorage.setItem(ENVIRONMENT + 'URI', result); + }; + + setBreadcrumb(uri){ + var nodeType = this.nodeType.split(';')[0]; + var display = nodeType + ': ' + (uri).split(nodeType+'\/').pop(); + var hsEntry = this.props.location.pathname + ',' + uri + ','+ display + '||'; + console.log("History Stack String: " + this.props.location.historyStackString); + if(this.historyStackString.indexOf(hsEntry) > -1){ + var tempHistoryStack = this.historyStackString.split(hsEntry)[0]; + var tempHistoryStackFormat = tempHistoryStack.replace(hsEntry, ""); + this.historyStackString = tempHistoryStackFormat; + } + this.historyStackString += hsEntry; + this.props.location.historyStackString = this.historyStackString; + console.log('[Model.jsx] historyStack in model' + this.historyStackString); + } + + handlePageChange = (pageNumber) => { + console.log('[Model.jsx] HandelPageChange active page is', pageNumber); + this.props.onInventoryDataReceived([]); + this.setState( + { activePage: pageNumber, enableBusyFeedback: true, resetColumnFilters: false, isPageNumberChange: true}, + function () { this.beforefetchInventoryData(); }.bind(this) + ); + }; + openDownloadRange = () =>{ + this.setState({ + showDownloadResultsModal: true, + errorDownloadResults: false, + downloadErrorMsg:''}); + } + closeDownloadResults = () =>{ + this.setState({ + showDownloadResultsModal: false, + enableModelBusyFeedback: false + }); + } + getAllExcels = (pageRange,rangeState) =>{ + console.log('getAllExcels>>>>>>>>>>>*',pageRange); + if(pageRange){ + this.typeOfCall=false; + let rangeModelState=(rangeState)? rangeState: false; + this.setState( + { pageRange: pageRange,enableBusyFeedback: true, enableModelBusyFeedback:true,showDownloadResultsModal:rangeModelState}, + function () { this.fetchInventoryData(); }.bind(this) + ); + }else{ + this.setState( + {errorDownloadResults: false, showDownloadResultsModal: false, downloadErrorMsg:'', enableBusyFeedback: false, enableModelBusyFeedback:false}, + function () { generateExcels(this.nodeResults);this.nodeResults='';this.typeOfCall = true;}.bind(this) + ); + } + }; + + populateFilteringOptions = () => { + let tempState = this.state; + tempState.filterList = buildAttrList(this.state.filterSelected, tempState.filterList); + this.setState(tempState); + }; + + // HELPER FUNCTIONS + isContaining = (nameKey, listArray) => { + let found = false; + listArray.map((lists) => { + if (lists.id === nameKey) { + found = true; + } + }); + return found; + }; + isTableFilterApply = (columnFilterList,nodeType,columnsList) => { + console.log('Model js ....columnFilterList:',columnFilterList); + console.log('Model js .... nodeType:',nodeType); + var columnFilter = columnFilterList[nodeType][0]; + console.log('model js columnFilter:',columnFilter); + var columns = columnsList[nodeType]; + var applyState = false; + var filterSelectedList = []; + var filterMessage = []; + + for(var i=0;i<columnFilter.length;i++){ + var colFilterValue = columnFilter[i][columns[i].value]; + if(colFilterValue != ""){ + filterSelectedList.push({ 'id': columns[i].value, 'value': colFilterValue, 'type': TABULAR_FILTER_TYPE}); + let filterMsg = columns[i].value + TABULAR_FILTER_TYPE + colFilterValue; + filterMessage.push(filterMsg); + applyState = true; + } + } + console.log('isTableFilterApply filterSelectedList>>>>>',filterSelectedList); + console.log('isTableFilterApply filterMessage>>>>>>>>>>',filterMessage); + + if(applyState){ + var tempState = this.state; + var state = true; + var stateFilterSelectedList = tempState.filterSelectedList; + var id = 'id'; + var value = 'value'; + if(stateFilterSelectedList.length > 0){ + for(var j in filterSelectedList){ + state = true; + for(var k in stateFilterSelectedList){ + if(stateFilterSelectedList[k][id] === filterSelectedList[j][id]){ + state =false; + tempState.filterSelectedList[k] = { 'id':filterSelectedList[j][id], 'value': filterSelectedList[j][value], 'type': TABULAR_FILTER_TYPE}; + } + } + if(state){ + tempState.filterSelectedList.push({ 'id':filterSelectedList[j][id], 'value': filterSelectedList[j][value], 'type': TABULAR_FILTER_TYPE}); + } + } + stateFilterSelectedList = tempState.filterSelectedList; + for(var k in stateFilterSelectedList){ + tempState.filterMessage[k] = stateFilterSelectedList[k][id] + TABULAR_FILTER_TYPE + stateFilterSelectedList[k][value] + } + }else{ + tempState.filterSelectedList = filterSelectedList; + tempState.filterMessage = filterMessage; + } + + console.log('isTableFilterApply tempState:',tempState); + this.beforefetchInventoryData(tempState); + } + }; + prepareModelGalleryElement = () =>{ + let modelGalleryElement=''; + if(this.state.isFilterEnable){ + modelGalleryElement = <ModelGallery nodes={this.props.currState.inventoryData} + viewName={this.state.viewName} + historyStackString={this.props.location.historyStackString} + openHistoryModal={this.openHistory} + isPageNumberChange={this.state.isPageNumberChange} + resetColumnInd={this.state.resetColumnFilters} + isTableFilterApply={this.isTableFilterApply} + enableRealTime={this.state.enableRealTime} + />; + }else{ + modelGalleryElement = <ModelGallery nodes={this.props.currState.inventoryData} + viewName={this.state.viewName} + historyStackString={this.props.location.historyStackString} + openHistoryModal={this.openHistory} + isPageNumberChange={this.state.isPageNumberChange} + resetColumnInd={this.state.resetColumnFilters} + enableRealTime={this.state.enableRealTime} + />; + } + return modelGalleryElement; + } + prepareDownloadRangeModel = () =>{ + + let downloadRangeModel =(this.state.showDownloadResultsModal)? <DownloadRangeModel + showDownloadResultsModal={this.state.showDownloadResultsModal} + totalPages={this.state.totalPages} + totalResults={this.state.totalResults} + triggerDownload={this.getAllExcels} + errorDownloadResults={this.state.errorDownloadResults} + downloadErrorMsg={this.state.downloadErrorMsg} + triggerClose={this.closeDownloadResults} + enableModelBusyFeedback={this.state.enableModelBusyFeedback} + /> : ''; + return downloadRangeModel; + } + toggleRealTimeAnalysisCallback=(checked)=>{ + console.log('toggleRealTimeAnalysisCallback>>>>',checked); + sessionStorage.setItem(ENVIRONMENT + 'ENABLE_ANALYSIS', !checked); + TABULAR_FILTER_TYPE=(APERTURE_SERVICE && !checked)?'CONTAINS':'='; + this.baseState.enableRealTime = !checked; + this.baseState.filterMessage = []; + this.baseState.filterSelectedList = []; + this.setState({...this.baseState},()=>{this.beforefetchInventoryData(this.state)}); + } + render() { + console.log('[Model Props] render: ', JSON.stringify(this.props) + 'elements : ', this.elements); + console.log('[Model nodeId] render: ', this.props.match.params.nodeId); + console.log('[Model nodeId] render this.state: ', this.state); + var toggelRealtimeAnalysis = ''; + if(APERTURE_SERVICE){ + toggelRealtimeAnalysis = <div className='toggleSwitch'><BootstrapSwitchButton + checked={!this.state.enableRealTime} + onlabel='Real Time' + onstyle='danger' + offlabel='Analysis' + offstyle='success' + style='w-100 mx-3' + onChange={(checked) => { + this.toggleRealTimeAnalysisCallback(checked); + }} + /></div> + } + const modelGalleryElement = this.prepareModelGalleryElement(); + let downloadRangeModel = this.prepareDownloadRangeModel(); + return ( + <div> + {toggelRealtimeAnalysis} + <Grid fluid={true} className='model-container'> + <Row className='show-grid'> + <Col md={12}> + <h1>{this.pageTitle}</h1> + <Filter key='browseSearch' + nodeType={this.state.filterSelected} + filterList={this.state.filterList} + filterDisplay={this.state.filterDisplay} + filterTypeDisplay={this.state.filterTypeDisplay} + isRunEnable={this.state.isRunEnable} + filterMessage={this.state.filterMessage} + loadInventory={this.beforefetchInventoryData} + filterSelectedList={this.state.filterSelectedList} + isFilterEnable={this.state.isFilterEnable} + enableRealTime={this.state.enableRealTime}/> + </Col> + </Row> + <Spinner loading={this.state.enableBusyFeedback}> + <Row className='show-grid'> + <Col md={8} className={this.state.isPaginationEnable && this.state.showResults ? 'show' : 'hidden'}> + <Pagination + activePage={this.state.activePage} + itemsCountPerPage={ModelConstants.RESULTS_PER_PAGE} + totalItemsCount={this.state.totalResults} + pageRangeDisplayed={ModelConstants.PAGE_RANGE_DISPLAY} + onChange={this.handlePageChange} /> + </Col> + <Col md={2} className={this.state.isPaginationEnable && this.state.showResults ? 'text-right' : 'text-left'}> + <OverlayTrigger placement='top' overlay={<Tooltip id='tooltip-top'>{this.downloadAllTooltip}</Tooltip>}> + <span className='d-inline-block' style={{display: 'inline-block'}}> + <Button bsSize='small' onClick={() => {this.getAllExcels(this.state.downloadCount)}}> + Download XLSX <i className='icon-documents-downloadablefile'></i> + </Button> + </span> + </OverlayTrigger> + </Col> + <Col md={2} className={this.state.isPaginationEnable && this.state.showResults ? 'text-right' : 'text-left'}> + <OverlayTrigger placement='top' overlay={<Tooltip id='tooltip-top'>{this.downloadRangeTooltip}</Tooltip>}> + <span className='d-inline-block' style={{display: 'inline-block'}}> + <Button bsSize='small' onClick={this.openDownloadRange}> + Download XLSX (Range)<i className='icon-documents-downloadablefile'></i> + </Button> + </span> + </OverlayTrigger> + </Col> + </Row> + <Row className='show-grid'> + <ModelBreadcrumb historyStackString={this.props.location.historyStackString}/> + </Row> + <Row> + <div className={'addPaddingTop alert alert-danger ' +(this.state.errorResults ? 'show' : 'hidden')} role="alert"> + An error occurred, please try again later. If this issue persists, please contact the system administrator. {this.state.errorMessage} + </div> + </Row> + <Row className='show-grid'> + { this.state.showResults && <div className='addPaddingTop'> + <OutputToggle scope={this} visualDisabled={true}/> + </div> + } + </Row> + <Row className={'show-grid ' + this.state.showResults ? 'show' : 'hidden'}> + <Col md={12}> + <hr /> + <h5>Total Results: <strong>{this.state.totalResults}</strong></h5> + <span className='resultMessage'>{this.resultsMessage}</span> + </Col> + </Row> + <Row className='show-grid'> + { + modelGalleryElement + } + </Row> + <Row className='show-grid'> + <Col md={12} className={this.state.isPaginationEnable && this.state.showResults ? 'show' : 'hidden'}> + <Pagination + activePage={this.state.activePage} + itemsCountPerPage={ModelConstants.RESULTS_PER_PAGE} + totalItemsCount={this.state.totalResults} + pageRangeDisplayed={ModelConstants.PAGE_RANGE_DISPLAY} + onChange={this.handlePageChange} /> + </Col> + </Row> + <div className='static-modal'> + <Modal show={this.state.showHistoryModal} onHide={this.closeHistory}> + <Modal.Header> + <Modal.Title>Retrieve {this.state.nodeDisplay} History</Modal.Title> + </Modal.Header> + <Modal.Body> + <form> + <div className="radio"> + <label> + <input type="radio" value="nodeState" + checked={this.state.historyType === 'nodeState'} + onChange={(e) => this.setHistoryType(e)} /> + View state at + </label> + </div> + <div className="radio"> + <label> + <input type="radio" value="nodeLifeCycleSince" + checked={this.state.historyType === 'nodeLifeCycleSince'} + onChange={(e) => this.setHistoryType(e)} /> + View updates since + </label> + </div> + <div className="radio"> + <label> + <input type="radio" value="nodeLifeCycle" + checked={this.state.historyType === 'nodeLifeCycle'} + onChange={(e) => this.setHistoryType(e)} /> + View all updates + </label> + </div> + </form> + <div className={this.state.enableCalendar ? 'show' : 'hidden'}> + <DatePicker + inline + selected={this.state.startDate} + onChange={(newDate) => this.handleDateChange(newDate)} + showTimeSelect + timeFormat="HH:mm" + timeIntervals={15} + dateFormat="MMMM D, YYYY h:mm a" + timeCaption="time" + /> + </div> + </Modal.Body> + <Modal.Footer> + <Button onClick={this.closeHistory}>Close</Button> + <Button onClick={this.submitHistory}>Submit</Button> + </Modal.Footer> + </Modal> + </div> + </Spinner> + <Spinner loading={this.state.enableModelBusyFeedback}> + {downloadRangeModel} + </Spinner> + </Grid> + </div> + ); + } +} + +export default connect(mapStateToProps, mapActionToProps)(model); diff --git a/src/app/model/modelSearch/ModelActions.js b/src/app/model/modelSearch/ModelActions.js new file mode 100644 index 0000000..e5faa35 --- /dev/null +++ b/src/app/model/modelSearch/ModelActions.js @@ -0,0 +1,20 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + diff --git a/src/app/model/modelSearch/ModelConstants.js b/src/app/model/modelSearch/ModelConstants.js new file mode 100644 index 0000000..a9758c6 --- /dev/null +++ b/src/app/model/modelSearch/ModelConstants.js @@ -0,0 +1,25 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +export const ModelConstants = { + UPDATE_INVENTORY_DATA : 'UPDATE_INVENTORY_DATA', + RESULTS_PER_PAGE : 50 , + PAGE_RANGE_DISPLAY : 10 +}; diff --git a/src/app/model/modelSearch/ModelReducer.js b/src/app/model/modelSearch/ModelReducer.js new file mode 100644 index 0000000..0ea0c08 --- /dev/null +++ b/src/app/model/modelSearch/ModelReducer.js @@ -0,0 +1,43 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import {ModelConstants} from './ModelConstants'; + +const initalState = { + inventoryData: [] +}; + +export default (state = initalState, action) => { + switch (action.type) { + case(ModelConstants.UPDATE_INVENTORY_DATA): + console.log('[ModelReducer] action.data:', action.data); + return { + ...state, + inventoryData: action.data + }; + default: + return { + ...state + }; + } + +}; + + diff --git a/src/app/model/modelSearch/components/ModelBreadcrumb.jsx b/src/app/model/modelSearch/components/ModelBreadcrumb.jsx new file mode 100644 index 0000000..ffcddb1 --- /dev/null +++ b/src/app/model/modelSearch/components/ModelBreadcrumb.jsx @@ -0,0 +1,72 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React from 'react'; +import Col from 'react-bootstrap/lib/Col'; +import Label from 'react-bootstrap/lib/Label'; +import { Link } from 'react-router-dom'; +import {GlobalExtConstants} from 'utils/GlobalExtConstants.js'; + +const modelBreadcrumb = (props) => { + + let links = null; + let historyStackArr = []; + var setURIInSession = function(uri){ + sessionStorage.setItem(GlobalExtConstants.ENVIRONMENT + 'URI', uri); + } + if (props.historyStackString) { + historyStackArr = props.historyStackString.split('||'); + for(var i = 0; i < historyStackArr.length; i++){ + historyStackArr[i] = historyStackArr[i].split(','); + console.log('[ModelBreadcrumb.jsx] previous url ' + historyStackArr[i][0] + ' previous api call '+ historyStackArr[i][1]); + } + links = historyStackArr.map((link, idx) => { + let breadCrumbTxt=decodeURI(link[2]).replace(/%2F/g,'/'); + return ( + <div className='customBreadCrumb'> + {idx === historyStackArr.length - 2 ? ( + <b id={'breadcrumbStatic' + idx} style={{'float' : 'left'}}>{breadCrumbTxt}</b> + ) : idx !== historyStackArr.length - 1 ? ( + <div id={'breadcrumbLink' + idx}> + <div style={{'float' : 'left'}}> + <Link + key={idx} + to={{ + pathname: link[0], + uri: link[1], + historyStackString: (breadCrumbTxt==='Origin')?'':props.historyStackString + }} onClick={() => setURIInSession(link[1])}>{breadCrumbTxt} + </Link> + </div> + <div style={{'float' : 'left'}}> >> </div> + </div> + ):(<div></div>)} + </div> + ); + }); + } + return ( + <Col md={12} className='addPaddingTop'> + {links} + </Col> + ); +}; + +export default modelBreadcrumb; diff --git a/src/app/model/modelSearch/components/ModelCard.jsx b/src/app/model/modelSearch/components/ModelCard.jsx new file mode 100644 index 0000000..2890b52 --- /dev/null +++ b/src/app/model/modelSearch/components/ModelCard.jsx @@ -0,0 +1,75 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React from 'react'; +import ModelRelationships from './ModelRelationships.jsx'; +import { Link } from 'react-router-dom'; +import {ExportExcel} from 'utils/ExportExcel.js'; +let buildAttrList = ExportExcel.buildAttrList; + +const modelCard = (props) => { + + var propKey = ''; + var navigateQueryBuilder = ''; + var editModalIcon = ''; + var requiredParams = buildAttrList(props.nodeType,[],'mandatory'); + const properties = Object.keys(props.nodeProps).map((prop, idx) => { + let description=''; + for(var a in requiredParams){ + if(requiredParams[a].value === prop){ + description=requiredParams[a].description; + if(propKey === ''){ + propKey = prop + ':' + btoa('<pre>' + props.nodeProps[prop].toString() + '</pre>'); + }else{ + propKey = propKey + ';' + prop + ':' + btoa('<pre>' + props.nodeProps[prop].toString() + '</pre>'); + } + } + } + return ( + <p className='pre-wrap-text' key={idx}><strong title={description}>{prop}:</strong> {props.nodeProps[prop].toString()}</p> + ); + }); + let pathNameStr = '/customDslBuilder/' + props.nodeType + '/' + propKey; + editModalIcon = <a className={props.isWriteAllowed ? 'show' : 'hidden'} onClick={e => {props.openEditNodeModal(props.nodeUrl)}}><i style={{cursor: 'pointer'}} className="pull-right fa fa-pencil-square-o" aria-hidden="true"></i></a>; + navigateQueryBuilder = <Link + to={{ + pathname: pathNameStr + }}> + <i className={'icon-misc-operationsL pull-right'} role="img"></i> + </Link>; + return ( + <div className='card model-card'> + <div className='card-header'> + <h4 className='card-title'>{props['nodeType']}{editModalIcon}{navigateQueryBuilder}</h4> + </div> + <div className='card-header'> + {props.nodeUrl} + </div> + <div className='card-content model-card-content'> + {properties} + </div> + <div className='card-footer'> + <ModelRelationships historyStackString={props.historyStackString} relatives={props} openHistoryModal={props.openHistoryModal} /> + </div> + </div> + ); +}; + +export default modelCard; diff --git a/src/app/model/modelSearch/components/ModelGallery.jsx b/src/app/model/modelSearch/components/ModelGallery.jsx new file mode 100644 index 0000000..d192708 --- /dev/null +++ b/src/app/model/modelSearch/components/ModelGallery.jsx @@ -0,0 +1,672 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React, { Component } from 'react'; +import Grid from 'react-bootstrap/lib/Grid'; +import Row from 'react-bootstrap/lib/Row'; +import Col from 'react-bootstrap/lib/Col'; +import ModelCard from './ModelCard.jsx'; +import Modal from 'react-bootstrap/lib/Modal'; +import Button from 'react-bootstrap/lib/Button'; +import BootstrapTable from 'react-bootstrap-table-next'; +import {ExportExcel} from 'utils/ExportExcel.js'; +import filterFactory, { textFilter, customFilter } from 'react-bootstrap-table2-filter'; +//import overlayFactory from 'react-bootstrap-table2-overlay'; +import OutputVisualization from 'generic-components/OutputVisualization.jsx'; +import RelationshipList from './ModelTabularView.jsx'; +import PropTypes from 'prop-types'; +import Tabs from 'react-bootstrap/lib/Tabs'; +import Tab from 'react-bootstrap/lib/Tab'; +import commonApi from 'utils/CommonAPIService.js'; +import {GlobalExtConstants} from 'utils/GlobalExtConstants.js'; +import {GeneralCommonFunctions} from 'utils/GeneralCommonFunctions.js'; +import Spinner from 'utils/SpinnerContainer.jsx'; + +let INVLIST = GlobalExtConstants.INVLIST; +let ENVIRONMENT = GlobalExtConstants.ENVIRONMENT; + +/** + * This function will take all of the node objects and turn them into + * a ui grid of ModelCard components. This function is essentially a container + * for the ModelCards + * @param props + * @returns {*} + */ +class AttributeFilter extends Component { + + constructor(props) { + super(props); + this.filter = this.filter.bind(this); + this.getValue = this.getValue.bind(this); + this.props = props; + this.state = { + filterText: '', + isPageChange: this.props.isPageChange, + columnValue : '' + }; + } + getValue = () => { + return this.input.value; + } + setPlaceHolder = () => { + let filterText = ''; + if(filterText === ''){ + filterText = 'Enter ' + this.props.column.text; + } + return filterText; + } + setFilterValue = () =>{ + let filterText = ''; + var columnFilter = this.props.columnFilterList[this.props.nodeType][0]; + for(var i=0;i<columnFilter.length;i++){ + if(columnFilter[i][this.props.column.text] != undefined){ + filterText = columnFilter[i][this.props.column.text]; + } + } + return filterText; + } + filter = () => { + let txt=this.props.column.text; + let obj = {}; + obj[txt] = this.getValue(); + var columnFilterList = this.props.columnFilterList; + var columnFilter = columnFilterList[this.props.nodeType][0]; + for(var i=0;i<columnFilter.length;i++){ + if(columnFilter[i][txt] != undefined){ + columnFilter[i][txt] = this.getValue(); + columnFilterList[this.props.nodeType] = []; + columnFilterList[this.props.nodeType].push(columnFilter); + this.props.handleOnFilter(columnFilterList,this.props.nodeType,this.props.columns,this.getValue(),this.props.aliasColumnList); + this.props.onFilter(this.getValue()); + } + } + } + render() { + return ( + <div> + + <input + key="input" + ref={ node => this.input = node } + type="text" + placeholder={this.setPlaceHolder()} + // value={this.setFilterValue} + onChange={this.filter} + /> + + </div> + ) + } +} + +class ModelGallery extends Component { + constructor(props){ + super(props); + this.props = props; + this.state = { + rerender: false, + expanded: [], + columnFilterList : {}, + columnsList: {}, + aliasColumnList: {}, + nodeType: '', + disableFilter: true, + showEditNodeModal: false, + focusedNode: null, + isEditSuccess: false, + isWriteAllowed: sessionStorage.getItem(ENVIRONMENT + 'roles') && sessionStorage.getItem(ENVIRONMENT + 'roles').indexOf('ui_write') > -1, + editInputFields: [] + } + } + componentWillMount() { + console.log('Model gallery component will mount****'); + } + componentWillUnmount() { + console.log('Model Gallery component will unmount****'); + } + handleOnExpand = (row, isExpand, rowIndex, e) => { + console.log('handleOnExpand single Row...',row.id); + if (isExpand) { + this.setState(() => ({ + expanded: [...this.state.expanded,row.id] + })); + } else { + this.setState(() => ({ + expanded: this.state.expanded.filter(x => x !== row.id) + }),function () { this.forceUpdate(); }.bind(this)); + + } + } + handleOnExpandAll = (isExpand, rows, e) => { + console.log('handleOnExpandAll to expand all rows'); + var expandArr = []; + if (isExpand) { + for(var r=0; r < rows.length; r++){ + expandArr.push(rows[r].id); + } + } + this.setState(() => ({ + expanded: expandArr + }),function () { this.forceUpdate(); }.bind(this)); + + } + handleOnFilter = (colFilterList,nodeType,columns,value,aliasColumnList) =>{ + console.log('handleOnFilter to Re-render',colFilterList); + var applyState = true; + if(value === ''){ + Object.keys(colFilterList).forEach(function(pkey){ + var filterList = colFilterList[pkey][0]; + for(var j in filterList){ + Object.keys(filterList[j]).forEach(function(key){ + if(filterList[j][key] !== ''){ + applyState = false; + } + }); + } + }); + }else{ + applyState = false; + } + this.setState({columnFilterList : colFilterList,rerender:true,columnsList : columns,nodeType: nodeType, disableFilter: applyState,aliasColumnList: aliasColumnList}); + } + generateRegexForDsl= (nodeType) =>{ + var nodePatternwithProp = nodeType+"\\*\\{.*?\\}\\(.*?\\)[\\,|\\>|\\]|\\)]|"+nodeType+"\\*\\(.*?\\)\\{.*?\\}[\\,|\\>|\\]|\\)]|"+nodeType+"\\{.*?\\}\\(.*?\\)[\\,|\\>|\\]|\\)]|"+nodeType+"\\(.*?\\)\\{.*?\\}[\\,|\\>|\\]|\\)]|"+nodeType+"\\{.*?\\}[\\,|\\>|\\]|\\)]|"+nodeType+"\\*\\{.*?\\}[\\,|\\>|\\]|\\)]"; + return nodePatternwithProp; + } + /* Start Edit Node Modal Functions */ + closeEditNodeModal = () =>{ + this.setState({editErrMsg: null, editInfoMsg: null, showEditNodeModal:false}); + } + submitEditNodeModal = () =>{ + var payload = {"operations": []}; + const settings = { + 'NODESERVER': INVLIST.NODESERVER, + 'PROXY': INVLIST.PROXY, + 'PREFIX': INVLIST.PREFIX, + 'VERSION': INVLIST.VERSION, + 'USESTUBS': INVLIST.useStubs, + 'APERTURE': INVLIST.APERTURE, + 'APERTURE_SERVICENAME':INVLIST.APERTURE_SERVICENAME + }; + let delimiter = '\/'; + let start = 3; + if((this.state.focusedNode.url).indexOf("/aperture/v") > -1){ + start = 4; + } + let tokens = (this.state.focusedNode.url).split(delimiter).slice(start); + let patchURL = tokens.join(delimiter); + var entry = { + "action": "patch", + "uri": patchURL, + "body": {} + }; + let path = "bulk/single-transaction"; + this.setState({editErrMsg: null, isPatchLoading: true}); + for(var key in this.state.editInputFields){ + if(this.state.editInputFields[key].isEdited){ + if(this.state.editInputFields[key].newValue !== ""){ + entry.body[key] = encodeURI(this.state.editInputFields[key].newValue); + }else{ + entry.body[key] = null; + } + } + } + payload.operations.push(entry); + console.log('ModelGallery: settings:' + JSON.stringify(settings)); + console.log('ModelGallery: path:' + path); + console.log('ModelGallery: payload:' + JSON.stringify(payload)); + commonApi(settings, path, 'POST', payload, 'SingleTransactionEdit', null, null, null, true) + .then(res => { + console.log('ModelGallery: Response', Object.keys(res.data)); + if(res.status === 201 || res.status === 200){ + if(res.data["operation-responses"] && res.data["operation-responses"][0] && res.data["operation-responses"][0]["response-status-code"] === 200 ){ + this.setState({isEditSuccess: true, isPatchLoading: false, showEditNodeModal:false}); + GeneralCommonFunctions.scrollTo("editSuccessMessage"); + }else{ + this.triggerError(res.data); + } + }else{ + this.triggerError(res.data); + } + }, error=>{ + this.triggerError(error); + }).catch(error => { + this.triggerError(error); + }); + } + triggerError = (error) => { + console.error('[ModelGallery.jsx] error : ', JSON.stringify(error)); + let errMsg = this.renderErrorMsg(error); + this.setState({ + isPatchLoading: false, + isEditSuccess: false, + editErrMsg: errMsg + }); + }; + renderErrorMsg = (error) =>{ + let errMsg=''; + if (error.response) { + // The request was made and the server responded with a status code + // that falls out of the range of 2xx + console.log('[ModeGallery.jsx] error :', error.response); + if(error.response.status){ + errMsg += " Code: " + error.response.status; + } + if(error.response.data){ + errMsg += " - " + JSON.stringify(error.response.data); + } + } else if (error["requestError"]){ + errMsg += JSON.stringify(error["requestError"]); + } else if (error.request) { + // The request was made but no response was received + // `error.request` is an instance of XMLHttpRequest in the browser and an instance of + // http.ClientRequest in node.js + console.log(error.request); + errMsg += " - Request was made but no response received"; + } else { + // Something happened in setting up the request that triggered an Error + console.log('Error', error.message); + errMsg += " - Unknown error occurred " + error.message; + } + return errMsg; + } + openEditNodeModal = (nodeKey) => { + console.log("ModelGallery :: openEditNodeModal called with " + nodeKey); + var focusedNode = null; + for (var i = 0; i < this.props.nodes.length && !focusedNode; i++){ + if(nodeKey === this.props.nodes[i].url){ + focusedNode = this.props.nodes[i]; + break; + } + } + var editInputFields = []; + if(focusedNode){ + var nodeType = focusedNode['node-type']; + focusedNode.allowedEditProps = []; + //call to check what props can be modified in oxm here; + focusedNode.allowedEditProps = GeneralCommonFunctions.getEditableAttributes(nodeType); + if(focusedNode.allowedEditProps.length > 0){ + for (var key in focusedNode.allowedEditProps){ + var attr = focusedNode.allowedEditProps[key]; + editInputFields[attr] = {}; + editInputFields[attr].isEdited = false; + if(focusedNode.properties[attr]){ + editInputFields[attr].oldValue = focusedNode.properties[attr]; + editInputFields[attr].newValue = focusedNode.properties[attr]; + }else{ + editInputFields[attr].oldValue = ""; + editInputFields[attr].newValue = ""; + } + } + }else{ + this.setState({editInfoMsg: "This element cannot be edited, please contact an administrator if you need the ability to edit the attributes on this element."}); + } + }else{ + //could not find the node, this shouldn't happen + console.log("ModelGallery :: openEditNodeModal could not find " + nodeKey + " in this.props.nodes. This shouldn't happen."); + } + + this.setState({showEditNodeModal:true, isEditSuccess: false, focusedNode: focusedNode, editInputFields: editInputFields}); + } + handleInputChange(event) { + const target = event.target; + const value = target.type === 'checkbox' ? target.checked : target.value; + const name = target.name; + var editInputFields = this.state.editInputFields; + if(target.type === 'text'){ + editInputFields[name].newValue = value; + }else if(target.type === 'checkbox'){ + if(!value){ + editInputFields[name].newValue = editInputFields[name].oldValue, + editInputFields[name].isEdited = value + }else{ + editInputFields[name].isEdited = value + } + } + this.setState({ + editInputFields: editInputFields + }); + } + /* End Edit Node Modal Functions */ + render(){ + let cards = null; + let tableColumns = []; + let tableValues = []; + let rowIndexValue = 0; + let svgWidth = window.outerWidth * 0.8; + let nodesList=[]; + let tableColumnsList={}; + let tableDataList={}; + let columnFilter = []; + let columnFilterList = (this.state.rerender) ? this.state.columnFilterList : {}; + let aliasColumnList=(this.state.rerender) ? this.state.aliasColumnList: {}; + let aliasRegex=/\'(\s)as(\s)\'|\'as\'/ig; + console.log('Model gallery this.props>>>',this.props); + console.log('columnFilterList while rendering:',columnFilterList); + this.onTableFilterClick = (nodeType) => { + this.setState({rerender:false},function(){this.props.isTableFilterApply(this.state.columnFilterList,nodeType,this.state.columnsList,this.state.aliasColumnList);}.bind(this)) + } + const expandRows = { + parentClassName: 'parent-expand-bar', + onlyOneExpanding: true, + renderer: (row, rowIndex) => ( + <div> + <RelationshipList node={this.props.nodes[parseInt(row.id.split('_')[0])]} + key={this.props.nodes[parseInt(row.id.split('_')[0])].id} + nodeId={this.props.nodes[parseInt(row.id.split('_')[0])].id} + nodeType={this.props.nodes[parseInt(row.id.split('_')[0])]['node-type']} + nodeProps={this.props.nodes[parseInt(row.id.split('_')[0])].properties} + nodeRelatives={this.props.nodes[parseInt(row.id.split('_')[0])]['related-to']} + nodeUrl={this.props.nodes[parseInt(row.id.split('_')[0])].url} + historyStackString={this.props.historyStackString} + openHistoryModal={this.props.openHistoryModal} + openEditNodeModal={this.openEditNodeModal} + isWriteAllowed={this.state.isWriteAllowed} + rowIndex={parseInt(row.id.split('_')[0])} + enableRealTime={this.props.enableRealTime} + aliasColumnList={this.props.tableFilterAliasColumns} + /> + </div> + ), + showExpandColumn: true, + expandByColumnOnly: true, + onExpandAll: this.handleOnExpandAll, + expanded: this.state.expanded, + onExpand: this.handleOnExpand + + }; + const rowEvents = { + onClick: (e, row, rowIndex) => { + //row index is usefull when single node type exist, for multiple node type use row id + rowIndexValue = parseInt(row.id.split('_')[0]); + }, + onMouseEnter: (e, row, rowIndex) => { + //row index is usefull when single node type exist, for multiple node type use row id + rowIndexValue = parseInt(row.id.split('_')[0]); + } + }; + let aliasColumns=[] + + if(this.props.nodes && this.props.nodes[0] && this.props.nodes[0]['node-type'] && this.props.viewName === "CellLayout" ){ + for(var n=0; n<this.props.nodes.length; n++){ + let nodeType = this.props.nodes[n]['node-type']; + let nodeTypeProperties =[]; + let aliasProperties=[]; + let plainNodes =''; + let dslQuery = this.props.dslQuery + ','; + if(this.props.dslQuery){ + var nodePatternwithProp = this.generateRegexForDsl(nodeType); + var nodeRegularExp = new RegExp(nodePatternwithProp, 'g'); + plainNodes = dslQuery.match(nodeRegularExp); + console.log('plainNodes model Gallery>>>>>*',plainNodes); + if(plainNodes){ + let propertiesPattern ="\\{.*?\\}"; + var propRegularExp = new RegExp(propertiesPattern, 'g'); + let nodeTypeProp = plainNodes[0].match(propRegularExp); + nodeTypeProp = nodeTypeProp[0].slice(1,-1).split(',');//.replace(/\'/g,'').toLowerCase().split(','); + for(var s=0;s<nodeTypeProp.length;s++){ + let nodeTypePropes=nodeTypeProp[s].match(aliasRegex); + let alias=''; + let nprop=''; + if(nodeTypePropes){ + let nodeTypeSplit=nodeTypeProp[s].split(aliasRegex); + nprop=nodeTypeSplit[0].replace(/\'/g,''); + alias=nodeTypeSplit[nodeTypeSplit.length-1].replace(/\'/g,''); + }else{ + nprop=nodeTypeProp[s].replace(/\'/g,'').toLowerCase(); + } + aliasProperties.push(alias); + nodeTypeProperties.push(nprop); + } + } + } + if(nodesList.indexOf(nodeType) === -1){ + tableColumns=[]; + tableValues=[]; + nodesList.push(nodeType); + let tableColumnsBuilt = ExportExcel.buildAttrList(nodeType,[],'required'); + if(this.props.dslQuery && plainNodes){ + for(var z=0;z<tableColumnsBuilt.length;z++){ + let index= nodeTypeProperties.indexOf(tableColumnsBuilt[z].value.toLowerCase()); + if(index !== -1){ + if(aliasProperties[index] !==''){ + let objAlias = {}; + objAlias[aliasProperties[index]]=nodeTypeProperties[index]; + aliasColumns.push(objAlias); + tableColumnsBuilt[z].value=aliasProperties[index]; + } + tableColumns.push(tableColumnsBuilt[z]); + } + } + }else{ + tableColumns=tableColumnsBuilt; + } + console.log('after condition table columns>>>>',tableColumns); + tableColumns.push({value:'id'}); + if(!columnFilterList[nodeType]){ + columnFilterList[nodeType] = []; + columnFilter = []; + for(var j = 0; j < tableColumns.length; j++){ + let txt = tableColumns[j].value; + //if(!this.state.reRender && (!columnFilter[j] || (columnFilter[j] && columnFilter[j][txt] === undefined))){ + let obj = {}; + obj[txt] = ''; + obj['description'] = tableColumns[j].description; + columnFilter.push(obj); + //} + } + columnFilterList[nodeType].push(columnFilter); + } + if(!aliasColumnList[nodeType]){ + aliasColumnList[nodeType]=[]; + aliasColumnList[nodeType].push(aliasColumns); + } + for(var j = 0; j < tableColumns.length; j++){ + if(j === tableColumns.length-1){ + tableColumns[j].dataField = 'id'; + tableColumns[j].hidden = true; + tableColumns[j].text = tableColumns[j].value; + }else{ + tableColumns[j].dataField = tableColumns[j].value; + tableColumns[j].text = tableColumns[j].value; + tableColumns[j].headerAttrs= { title:tableColumns[j].description}; + tableColumns[j].ref=tableColumns[j].value; + tableColumns[j].filter = customFilter(); + tableColumns[j].filterRenderer = (onFilter, column) => <AttributeFilter handleOnFilter= {this.handleOnFilter} onFilter={ onFilter } column={ column } isPageChange={this.props.isPageNumberChange} nodeType={nodeType} columnFilterList={columnFilterList} columns={tableColumnsList} aliasColumnList={aliasColumnList}/>; + } + } + tableColumnsList[nodeType] = tableColumns; + tableDataList[nodeType] = []; + for(var m=0; m<this.props.nodes.length; m++){ + let nodeTypeForData = this.props.nodes[m]['node-type']; + if(nodeTypeForData === nodeType){ + let propertiesOfNode = this.props.nodes[m].properties; + propertiesOfNode.id = m + '_' + nodeType + '_id'; + tableValues.push(propertiesOfNode); + tableDataList[nodeType].push(tableValues); + } + } + } + } + }else{ + cards = this.props.nodes.map(node => { + return ( + <Col key={node.id} lg={3} md={3} sm={6} xs={12}> + <ModelCard + key={node.id} + nodeId={node.id} + nodeType={node['node-type']} + nodeProps={node.properties} + nodeRelatives={node['related-to']} + nodeUrl={node.url} + historyStackString={this.props.historyStackString} + openHistoryModal={this.props.openHistoryModal} + openEditNodeModal={this.openEditNodeModal} + isWriteAllowed={this.state.isWriteAllowed} + enableRealTime={this.props.enableRealTime} + aliasColumnList={this.props.tableFilterAliasColumns}/> + </Col> + ); + }); + } + let tabs=nodesList.map((nodeType,index) => { + return( + <Tab eventKey={nodeType} title={nodeType} key={nodeType}> + <BootstrapTable + id={nodeType} + keyField='id' + data={tableDataList[nodeType][0]} + columns={tableColumnsList[nodeType]} + filter={filterFactory()} + bordered={true} + columnFilter={true} + headerClasses='table-header-view' + expandRow={expandRows} + rowEvents={rowEvents} + bootstrap4 striped hover condensed + /> + </Tab> + ) + }); + return ( + <div> + <div className={'addPaddingTop alert alert-success ' +(this.state.isEditSuccess ? 'show' : 'hidden')} id="editSuccessMessage" role="alert"> + Update made successfully to {this.state.focusedNode ? this.state.focusedNode.url : ""}. If you wish, you may check your update using a real-time mode query, it may take some time to reflect in analysis mode. + </div> + <div className='static-modal'> + <Modal show={this.state.showEditNodeModal} onHide={this.closeEditNodeModal}> + <Modal.Header> + <Modal.Title>Edit Element</Modal.Title> + </Modal.Header> + <Modal.Body> + <Spinner loading={this.state.isPatchLoading}> + <div className={'addPaddingTop alert alert-danger ' +(this.state.editErrMsg && this.state.editErrMsg !== '' ? 'show' : 'hidden')} id="editErrorMessage" role="alert"> + An error occurred in editing the element. Please see details {this.state.editErrMsg} + </div> + <div className={'addPaddingTop alert alert-info ' +(this.state.editInfoMsg && this.state.editInfoMsg !== '' ? 'show' : 'hidden')} id="editNotAllowedMessage" role="alert"> + {this.state.editInfoMsg} + </div> + <form> + {this.state.focusedNode && Object.keys(this.state.editInputFields).length > 0 && (this.state.focusedNode.allowedEditProps).sort().map((attr) => { + return <div class="form-group row"> + <div className="col-sm-3"> + <label for={attr} class="col-form-label">{attr}</label> + </div> + <div class="col-sm-1"> + <div className="checkbox"> + <input type="checkbox" name={attr} checked={this.state.editInputFields[attr].isEdited} onChange={this.handleInputChange.bind(this)} /> + </div> + </div> + <div class="col-sm-8"> + <input type="text" class="form-control" id={attr} name={attr} disabled={!this.state.editInputFields[attr].isEdited} onChange={this.handleInputChange.bind(this)} value={this.state.editInputFields[attr].newValue}/> + </div> + </div>; + + }) + } + </form> + </Spinner> + </Modal.Body> + <Modal.Footer> + <Button onClick={this.closeEditNodeModal}>Close</Button> + <Button className={this.state.editInfoMsg && this.state.editInfoMsg !== '' ? 'hidden' : ''} onClick={this.submitEditNodeModal}>Submit</Button> + </Modal.Footer> + </Modal> + </div> + {(() => { + if (this.props.viewName === "CellLayout" && tableValues.length > 0) { + if(nodesList.length > 1){ + if(this.props.isTableFilterApply){ + return ( + <div className="addPaddingSide"> + <button type='button' className={(this.state.disableFilter)? 'btn btn-outline-secondary' : 'btn btn-primary'} disabled={this.state.disableFilter} onClick={() => {this.onTableFilterClick(nodesList)}} style={{float: 'right', margin: '2px'}}>Apply Filters (All)</button> + <Tabs defaultActiveKey={nodesList[0]} id="multipleTabularView"> + {tabs} + </Tabs> + </div> + ) + }else{ + return ( + <div className="addPaddingSide"> + <Tabs defaultActiveKey={nodesList[0]} id="multipleTabularView"> + {tabs} + </Tabs> + </div> + ) + } + }else{ + if(this.props.isTableFilterApply){ + return( + <div className="addPaddingSide"> + <button type='button' className={(this.state.disableFilter)? 'btn btn-outline-secondary' : 'btn btn-primary'} disabled={this.state.disableFilter} onClick={() => {this.onTableFilterClick(this.state.nodeType)}} style={{float: 'right', margin: '10px'}}>Apply Filters (All)</button> + <BootstrapTable + id='modelGallery' + keyField='id' + data={ tableValues } + columns={ tableColumns } + filter={ filterFactory() } + bordered={ true } + columnFilter={ true } + headerClasses='table-header-view' + expandRow={ expandRows } + rowEvents={ rowEvents } + bootstrap4 striped hover condensed + /> + </div> + ) + }else{ + return ( + <div className="addPaddingSide"> + <BootstrapTable + id='modelGallery' + keyField='id' + data={ tableValues } + columns={ tableColumns } + filter={ filterFactory() } + bordered={ true } + columnFilter={ true } + headerClasses='table-header-view' + expandRow={ expandRows } + rowEvents={ rowEvents } + bootstrap4 striped hover condensed + /> + </div> + ) + } + } + } else if (this.props.viewName === "CardLayout") { + return ( + <Grid fluid={true}> + <Row className='show-grid'> + {cards} + </Row> + </Grid> + ) + } + })()} + <div className={this.props.viewName === "VisualLayout" ? 'show' : 'hidden'}> + <OutputVisualization identifier="currentState" width={svgWidth} height="1200" overflow="scroll"/> + </div> + </div> + ); + } +}; + +export default ModelGallery; diff --git a/src/app/model/modelSearch/components/ModelNodeCard.jsx b/src/app/model/modelSearch/components/ModelNodeCard.jsx new file mode 100644 index 0000000..0caf831 --- /dev/null +++ b/src/app/model/modelSearch/components/ModelNodeCard.jsx @@ -0,0 +1,51 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React from 'react'; +import ModelRelationships from './ModelRelationships.jsx'; +import Col from 'react-bootstrap/lib/Col'; + +const modelNodeCard = (props) => { + + console.log('[Model Node Card] props : ', props); + const properties = Object.keys(props.nodeProps).map( (prop, idx) => { + return ( + <p key={idx}><strong> {prop} : </strong> { props.nodeProps[prop].toString()} </p> + ); + }); + + return ( + <Col lg={8} md={8} sm={10}> + <div className='card model-card'> + <div className='card-header'> + Node {props.nodeId} + </div> + <div className='card-content model-card-content'> + {properties} + </div> + </div> + <ModelRelationships relatives={props}/> + </Col> + ); +}; + +export default modelNodeCard; + + diff --git a/src/app/model/modelSearch/components/ModelNodeGallery.jsx b/src/app/model/modelSearch/components/ModelNodeGallery.jsx new file mode 100644 index 0000000..ef6947e --- /dev/null +++ b/src/app/model/modelSearch/components/ModelNodeGallery.jsx @@ -0,0 +1,46 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React from 'react'; +import ModelNodeCard from './ModelNodeCard.jsx'; + +const modelNodeGallery = (props) => { + + const cards = props.nodes.map(node => { + console.log('[Model Node Gallery] : ', node); + return ( + <ModelNodeCard + key={node.id} + nodeId={node.id} + nodeType={node['node-type']} + nodeProps={node.properties} + nodeRelatives={node['related-to']} + nodeUrl={node.url}/> + ); + }); + + return ( + <div> + {cards} + </div> + ); +}; + +export default modelNodeGallery; diff --git a/src/app/model/modelSearch/components/ModelRelationships.jsx b/src/app/model/modelSearch/components/ModelRelationships.jsx new file mode 100644 index 0000000..8dec154 --- /dev/null +++ b/src/app/model/modelSearch/components/ModelRelationships.jsx @@ -0,0 +1,137 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; +import Label from 'react-bootstrap/lib/Label'; +import Panel from 'react-bootstrap/lib/Panel'; +import {GlobalExtConstants} from 'utils/GlobalExtConstants.js'; +import {ExportExcel} from 'utils/ExportExcel.js'; +let buildAttrList = ExportExcel.buildAttrList; + +let INVLIST = GlobalExtConstants.INVLIST; + +class ModelRelationships extends Component { + constructor(props){ + console.log(props); + super(props); + this.props = props; + } + + render(){ + console.log('[ModelRelationships.jsx] props : ', this.props); + let relationships = null; + let navigateByoq = null; + let relativesArray = []; + this.nodeDisplay = this.props.relatives.nodeType + ' : ' + (this.props.relatives.nodeUrl).split(this.props.relatives.nodeType + '\/').pop(); + this.historyClick = () => { + this.props.openHistoryModal(this.nodeDisplay, this.props.relatives.nodeUrl,this.props.relatives.nodeType); + } + + if (this.props.relatives.nodeRelatives && this.props.relatives.nodeRelatives.length > 0) { + relationships = this.props.relatives.nodeRelatives.sort(function(a, b) { + var compareA = (a['node-type'] + (a.url).split(a['node-type']+'\/').pop()).toLowerCase(); + var compareB = (b['node-type'] + (b.url).split(a['node-type']+'\/').pop()).toLowerCase(); + if(compareA < compareB) return -1; + if(compareA > compareB) return 1; + return 0; + }).map((relative, idx) => { + if (relativesArray.includes(relative['node-type']) === false) relativesArray.push(relative['node-type']); + return ( + <div> + <Link + key={idx} + to={{ + pathname: '/model/' + relative['node-type'] + '/' + relative.id + '/'+ this.props.relatives.enableRealTime, + uri: relative.url, + historyStackString: this.props.historyStackString + }}> + {relative['node-type']}: {(decodeURI((relative.url).split(relative['node-type']+'\/').pop())).replace(/%2F/g,'/')}</Link> <Label bsStyle='default'>{relative['relationship-label'].slice(33)}</Label> + </div> + ); + }); + } + relativesArray = relativesArray.join('&'); + var propKey = ''; + var requiredParams = buildAttrList(this.props.relatives.nodeType,[],'mandatory'); + var aliasColumnFilters = (this.props.relatives.aliasColumnList && this.props.relatives.aliasColumnList[this.props.relatives.nodeType])?this.props.relatives.aliasColumnList[this.props.relatives.nodeType][0]:[]; + console.log('requiredParams>>>>>>>>>>>>',requiredParams); + Object.keys(this.props.relatives.nodeProps).map((prop, idx) => { + for(var a in requiredParams){ + let alias=''; + if(aliasColumnFilters && aliasColumnFilters[requiredParams[a].value]){ + alias=requiredParams[a].value; + requiredParams[a].value=aliasColumnFilters[requiredParams[a].value]; + } + if(requiredParams[a].value === prop){ + let tag= (alias!='')? alias: prop; + if(propKey === ''){ + propKey = tag + ':' + btoa('<pre>' + this.props.relatives.nodeProps[prop].toString() + '</pre>'); + }else{ + propKey = propKey + ';' + tag + ':' + btoa('<pre>' + this.props.relatives.nodeProps[prop].toString() + '</pre>'); + } + } + } + }); + let pathNameStr = (relativesArray.length>0) ? '/customDsl/' + this.props.relatives.nodeType + '/' + propKey + '/' + relativesArray : '/customDsl/' + this.props.relatives.nodeType + '/' + propKey; + navigateByoq = <Link + to={{ + pathname: pathNameStr + }}> + <button type='button' className='btn btn-primary pull-right'>>>BYOQ</button> + </Link>; + if (this.props.relatives.nodeRelatives && this.props.relatives.nodeRelatives.length > 0) { + return ( + <Panel> + <Panel.Heading> + <Panel.Toggle> + <button type='button' className='btn btn-outline-primary'> + Relationships + </button> + </Panel.Toggle> + { INVLIST.isHistoryEnabled && (<button type='button' className='btn btn-outline-primary' onClick={this.historyClick}> + History + </button>)} + {navigateByoq} + </Panel.Heading> + <Panel.Collapse> + <Panel.Body className='cardwrap'> + {relationships} + </Panel.Body> + </Panel.Collapse> + </Panel> + ); + } else { + return ( + <div> + <button type='button' className='btn btn-outline-disabled'> + No relationships + </button> + { INVLIST.isHistoryEnabled && (<button type='button' className='btn btn-outline-primary' onClick={this.historyClick}> + History + </button>)} + {navigateByoq} + </div> + ); + } +} +}; + +export default ModelRelationships; diff --git a/src/app/model/modelSearch/components/ModelTabularView.jsx b/src/app/model/modelSearch/components/ModelTabularView.jsx new file mode 100644 index 0000000..3b5a94a --- /dev/null +++ b/src/app/model/modelSearch/components/ModelTabularView.jsx @@ -0,0 +1,197 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React, { Component } from 'react'; +import BootstrapTable from 'react-bootstrap-table-next'; +import filterFactory, { textFilter, customFilter } from 'react-bootstrap-table2-filter'; +import PropTypes from 'prop-types'; +import { Link } from 'react-router-dom'; +import Label from 'react-bootstrap/lib/Label'; +import {GlobalExtConstants} from 'utils/GlobalExtConstants.js'; +import {ExportExcel} from 'utils/ExportExcel.js'; +let buildAttrList = ExportExcel.buildAttrList; + +let INVLIST = GlobalExtConstants.INVLIST; + + class RelationshipList extends Component { + + + constructor(props) { + super(props); + this.props = props; + this.relationships = null; + this.relativesArray = []; + this.state = { + filteron:false + + } + } + render() { + + + let navigateByoq = null; + this.nodeDisplay = this.props.nodeType + ' : ' + (this.props.nodeUrl).split(this.props.nodeType + '\/').pop(); + this.historyClick = () => { + this.props.openHistoryModal(this.nodeDisplay, this.props.nodeUrl,this.props.nodeType); + } + this.filter = (e) =>{ + let filterValue = e.target.value; + this.returnFilterList(filterValue); + this.setState({filteron:true}); + } + this.returnFilterList = (filterValue) =>{ + if (this.props.nodeRelatives && this.props.nodeRelatives.length > 0) { + this.relationships = null; + this.relationships = this.props.nodeRelatives.sort(function(a, b) { + var compareA = (a['node-type'] + (a.url).split(a['node-type']+'\/').pop()).toLowerCase(); + var compareB = (b['node-type'] + (b.url).split(a['node-type']+'\/').pop()).toLowerCase(); + if(compareA < compareB) return -1; + if(compareA > compareB) return 1; + return 0; + }).map((relative, idx) => { + if (this.relativesArray.includes(relative['node-type']) === false) this.relativesArray.push(relative['node-type']); + if(filterValue === '' || filterValue === ':' || relative['node-type'].toLowerCase().search(filterValue.toLowerCase()) != -1 || (decodeURI((relative.url).split(relative['node-type']+'\/').pop())).replace(/%2F/g,'/').toLowerCase().search(filterValue.toLowerCase()) != -1){ + return ( + <li key={idx + '' +relative.id}> + <Link + key={idx} + to={{ + pathname: '/model/' + relative['node-type'] + '/' + relative.id + '/'+ this.props.enableRealTime, + uri: relative.url, + historyStackString: this.props.historyStackString + }}> + {relative['node-type']}: {(decodeURI((relative.url).split(relative['node-type']+'\/').pop())).replace(/%2F/g,'/')}</Link> <Label bsStyle='default'>{relative['relationship-label'].slice(33)}</Label> + </li> + ); + } + }); + } + } + if(!this.state.filteron){ + this.returnFilterList(''); + } + let relativesArray = (this.relativesArray.length > 0) ? this.relativesArray.join('&') : this.relativesArray; + var propKey = ''; + var requiredParams = buildAttrList(this.props.nodeType,[],'mandatory'); + var aliasColumnFilters = (this.props.aliasColumnList && this.props.aliasColumnList[this.props.nodeType])?this.props.aliasColumnList[this.props.nodeType][0]:[]; + Object.keys(this.props.nodeProps).map((prop, idx) => { + for(var a in requiredParams){ + let alias=''; + if(aliasColumnFilters && aliasColumnFilters[requiredParams[a].value]){ + alias=requiredParams[a].value; + requiredParams[a].value=aliasColumnFilters[requiredParams[a].value]; + } + if(requiredParams[a].value === prop){ + let tag= (alias!='')? alias: prop; + if(propKey === ''){ + propKey = tag + ':' + btoa(this.props.nodeProps[prop].toString()); + }else{ + propKey = propKey + ';' + tag + ':' + btoa(this.props.nodeProps[prop].toString()); + } + } + } + }); + let editModalIcon = <a className={this.props.isWriteAllowed ? 'show' : 'hidden'} onClick={e => {this.props.openEditNodeModal(this.props.nodeUrl)}}><i style={{cursor: 'pointer'}} className="pull-right fa fa-pencil-square-o" aria-hidden="true"></i></a>; + let pathNameStr = (relativesArray.length>0) ? '/customDsl/' + this.props.nodeType + '/' + propKey + '/' + relativesArray : '/customDsl/' + this.props.nodeType + '/' + propKey; + navigateByoq = <Link + to={{ + pathname: pathNameStr + }}> + <button type='button' className='btn btn-primary pull-right'>>>BYOQ</button> + </Link>; + let relationships = []; + if(this.relationships){ + for(var n=0 ; n < this.relationships.length ; n++){ + if(this.relationships[n]){ + relationships.push(this.relationships[n]); + } + } + } + if (this.props.nodeRelatives && this.props.nodeRelatives.length > 0) { + return ( + <div> + <div style={{float: 'left'}}> + <table className='relationshipTable table-striped table-hover table-bordered table-sm'> + <thead> + <tr className='table-header-view'> + <th titlename='Relationships'> + Relationships + <div> + <input + key='input' + type='text' + placeholder='Enter Relationship...' + onChange={(e) => this.filter(e)} + /> + </div> + </th> + </tr> + </thead> + <tbody> + <tr> + <td> + <ul> + {relationships} + </ul> + </td> + </tr> + </tbody> + </table> + </div> + <div style={{float: 'left', margin: '10px'}}> + { INVLIST.isHistoryEnabled && (<button type='button' className='btn btn-primary pull-right' onClick={this.historyClick}> + History + </button>)} + </div> + <div style={{float: 'left',margin: '10px'}}> + {navigateByoq} + </div> + <div style={{float: 'left',margin: '10px'}}> + {editModalIcon} + </div> + </div> + ) + } else { + return ( + <div> + <div style={{float: 'left', margin: '10px'}}> + <button type='button' className='btn btn-outline-disabled'> + No relationships + </button> + </div> + <div style={{float: 'left', margin: '10px'}}> + { INVLIST.isHistoryEnabled && (<button type='button' className='btn btn-primary' onClick={this.historyClick}> + History + </button>)} + </div> + <div style={{float: 'left', margin: '10px'}}> + {navigateByoq} + </div> + <div style={{float: 'left',margin: '10px'}}> + {editModalIcon} + </div> + </div> + ); + } + } + } + +export default RelationshipList; +//export default AttributeFilter; diff --git a/src/app/model/test.jsx b/src/app/model/test.jsx new file mode 100644 index 0000000..69ca45e --- /dev/null +++ b/src/app/model/test.jsx @@ -0,0 +1,147 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +const languages = [ + { + name: 'C', + year: 1972 + }, + { + name: 'C#', + year: 2000 + }, + { + name: 'C++', + year: 1983 + }, + { + name: 'Clojure', + year: 2007 + }, + { + name: 'Elm', + year: 2012 + }, + { + name: 'Go', + year: 2009 + }, + { + name: 'Haskell', + year: 1990 + }, + { + name: 'Java', + year: 1995 + }, + { + name: 'Javascript', + year: 1995 + }, + { + name: 'Perl', + year: 1987 + }, + { + name: 'PHP', + year: 1995 + }, + { + name: 'Python', + year: 1991 + }, + { + name: 'Ruby', + year: 1995 + }, + { + name: 'Scala', + year: 2003 + } +]; + +// https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions#Using_Special_Characters +function escapeRegexCharacters(str) { + return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); +} + +function getSuggestions(value) { + const escapedValue = escapeRegexCharacters(value.trim()); + + const regex = new RegExp('^' + escapedValue, 'i'); + + return languages.filter(language => regex.test(language.name)); +} + +function getSuggestionValue(suggestion) { + return suggestion.name; +} + +function renderSuggestion(suggestion) { + return ( + <span>{suggestion.name}</span> + ); +} + +class Test extends React.Component { + constructor() { + super(); + + this.state = { + value: '', + suggestions: getSuggestions('') + }; + + this.onChange = this.onChange.bind(this); + this.onSuggestionsUpdateRequested = this.onSuggestionsUpdateRequested.bind(this); + } + + onChange(event, { newValue, method }) { + this.setState({ + value: newValue + }); + } + + onSuggestionsUpdateRequested({ value }) { + this.setState({ + suggestions: getSuggestions(value) + }); + } + + render() { + const { value, suggestions } = this.state; + const inputProps = { + placeholder: "Type 'c'", + value, + onChange: this.onChange + }; + + return ( + <Autosuggest suggestions={suggestions} + onSuggestionsUpdateRequested={this.onSuggestionsUpdateRequested} + shouldRenderSuggestions={() => true} + getSuggestionValue={getSuggestionValue} + renderSuggestion={renderSuggestion} + inputProps={inputProps} /> + ); + } +} + +ReactDOM.render(<App />, document.getElementById('app')); diff --git a/src/app/model/testGallery.jsx b/src/app/model/testGallery.jsx new file mode 100644 index 0000000..8d73388 --- /dev/null +++ b/src/app/model/testGallery.jsx @@ -0,0 +1,91 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React, {Component} from 'react'; +import ModelGallery from 'app/modelSearch/components/ModelGallery.jsx'; +import testData from 'app/CustomQueryMultiNode'; + +class testGallery extends Component { + + state = { + nodes: [], + multipleNodes: '', + isLoading: 'show' + } + + componentWillMount () { + this.processData(testData); + } + + + + processData = (data) => { + console.log('Response data' + JSON.stringify(data)); + if (data && data.results) { + //this.nodes = data.results; + this.setState({ + nodes: data.results + }); + + this.multipleNodes = this.state.nodes.length > 1; + } + if (data && data.headers && data.headers.get('total-results')) { + this.modelService.setTotalResults(data.headers.get('total-results')); + } + this.setState({ + isLoading: 'hidden' + }); + } + + render() { + + let nodes = ''; + if ( this.state.nodes.length > 0 ) { + + console.log('nodes exist'); + + nodes = + (<div className='model-container'> + <ModelGallery + nodes={this.state.nodes}/> + </div>); + } + + return( + <div className='multipleNodes'> + <div className={!this.state.isLoading}> + <div className='col align-self-cemter'> + <fa name='cog' className='fa-5x fa-spin'></fa> + </div> + </div> + <div className={!this.state.isLoading}> + <h2>{this.header}</h2> + <div className='nodes container-fluid'> + <div className='row-dsl'> + {nodes} + </div> + </div> + </div> + </div> + ); + } +} + +export default testGallery; diff --git a/src/app/modifications/Modifications.jsx b/src/app/modifications/Modifications.jsx new file mode 100644 index 0000000..f9837e7 --- /dev/null +++ b/src/app/modifications/Modifications.jsx @@ -0,0 +1,190 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React, {Component} from 'react'; +import {GlobalExtConstants} from 'utils/GlobalExtConstants.js'; +import Col from 'react-bootstrap/lib/Col'; +import Row from 'react-bootstrap/lib/Row'; +import Grid from 'react-bootstrap/lib/Grid'; +import Panel from 'react-bootstrap/lib/Panel'; +import * as Excel from 'exceljs/dist/exceljs.min.js'; +import Spinner from 'utils/SpinnerContainer.jsx'; + +let INVLIST = GlobalExtConstants.INVLIST; +let OXM = GlobalExtConstants.OXM; + +let invList = null; + +class Modifications extends Component { + + state = { + file:null, + enableBusyFeedback: false, + enableUploadFeedback: false, + showResults: false, + errorResults: true + }; + + constructor(){ + super(); + } + componentDidMount(){ + }; + addValidationError = (baseString, sheetName, row, validationError) => { + return baseString += 'Error occurred on worksheet ' + sheetName + ' at Row ' + row + ' ' + + validationError + '\n'; + } + uploadedFile = (e) => { + this.setState({enableUploadFeedback: true,enableBusyFeedback:false,showResults:false,errorResults:false}); + let reader = new FileReader(); + let file = e.target.files[0]; + let wb = new Excel.Workbook(); + var columnHeaders = []; + var jsonPayload = []; + reader.onload= () => { + const buffer = reader.result; + var validationErrors = {}; + wb.xlsx.load(buffer).then(workbook => { + workbook.eachSheet(function(worksheet, sheetId) { + worksheet.eachRow({ includeEmpty: true }, function(row, rowNumber) { + if(rowNumber === 1){ + for(var j = 1;j <= row.values.length; j++){ + columnHeaders[sheetId + '-' + j ] = row.values[j]; + } + }else{ + var obj = {}; + obj.properties = {}; + obj['node-type'] = worksheet.name; + for(var j = 1;j <= row.values.length; j++){ + if(['uri','action'].indexOf(columnHeaders[sheetId + '-' + j ]) > -1){ + obj[columnHeaders[sheetId + '-' + j ]] = row.values[j]; + if(!row.values[j] || row.values[j] === ""){ + + }else if (columnHeaders[sheetId + '-' + j ] === 'action' + && ['DELETE','UPDATE', 'ADD'].indexOf((row.values[j]).toUpperCase()) === -1 ){ + validationErrors = this.addValidationError(validationErrors, + worksheet.name, j, 'Action needs to be DELETE, UPDATE, or ADD'); + } + }else if(columnHeaders[sheetId + '-' + j ] !== 'relationship-list'){ + obj.properties[columnHeaders[sheetId + '-' + j ]] = row.values[j]; + } + } + jsonPayload.push(obj); + } + console.log("Row " + rowNumber + " = " + JSON.stringify(row.values)); + }); + console.log(JSON.stringify(jsonPayload)); + }); + this.setState({enableUploadFeedback: false}); + }); + + } + if((file.name).endsWith(".xls") || (file.name).endsWith(".xlsx")){ + reader.readAsArrayBuffer(file); + }else{ + var error = {}; + error.validationMsg = "Please upload a valid file, valid files are .xslx and .xsl only." + triggerError(error); + this.setState({enableUploadFeedback: false}); + } + } + onFileSubmit = () => { + this.setState({enableBusyFeedback:true,showResults:false,errorResults:false}); + } + triggerError = (error) => { + console.error('[Modifications.jsx] error : ', JSON.stringify(error)); + this.setState({ + enableBusyFeedback: false, + showResults: false, + errorResults: true + }); + let errMsg = ''; + if(error.validationMsg){ + errMsg = error.validationMsg; + } else if (error.response) { + // The request was made and the server responded with a status code + // that falls out of the range of 2xx + console.log(error.response.data); + console.log(error.response.status); + console.log(error.response.headers); + if(error.response.status){ + errMsg += " Code: " + error.response.status; + } + if(error.response.data){ + errMsg += " - " + JSON.stringify(error.response.data); + } + } else if (error.request) { + // The request was made but no response was received + // `error.request` is an instance of XMLHttpRequest in the browser and an instance of + // http.ClientRequest in node.js + console.log(error.request); + errMsg += " - Request was made but no response received"; + } else { + // Something happened in setting up the request that triggered an Error + console.log('Error', error.message); + errMsg += " - Unknown error occurred " + error.message; + } + //Suppress Error Message when 404 results not found occur + if(error.response && error.response.status === 404){ + this.setState({errorMessage:'', errorResults:false}); + }else{ + this.setState({errorMessage:errMsg}); + } + } + render = () => { + return( + <div> + <div id='modifications'> + <header className='addPadding jumbotron my-4'> + <h1 className='display-2'>Modifications Page</h1> + <p className='lead'> + On this page you have the ability to make modifications to the data by uploading a xslx. + </p> + </header> + <Grid fluid={true} className='model-container'> + <Spinner loading={this.state.enableUploadFeedback}> + <Row> + <form className="addPadding" onSubmit={this.onFileSubmit}> + <div className="row justify-content-center mb-2"> + <input onChange={this.uploadedFile} type="file" id="excelFile" accept=".xlsx, .xls"/> + <button type="submit" className="btn btn-sm btn-info">Send</button> + </div> + </form> + </Row> + </Spinner> + <Spinner loading={this.state.enableBusyFeedback}> + <Row> + <div className={'addPaddingTop alert alert-danger ' +(this.state.errorResults ? 'show' : 'hidden')} role="alert"> + An error occurred, please try again later. If this issue persists, please contact the system administrator. {this.state.errorMessage} + </div> + </Row> + <Row> + <div className={'addPaddingTop alert alert-success ' +(this.state.showResults ? 'show' : 'hidden')} role="alert"> + The updates were made successfully. + </div> + </Row> + </Spinner> + </Grid> + </div> + </div> + ); + } + } +export default Modifications; diff --git a/src/app/modifications/ModificationsActions.js b/src/app/modifications/ModificationsActions.js new file mode 100644 index 0000000..e5faa35 --- /dev/null +++ b/src/app/modifications/ModificationsActions.js @@ -0,0 +1,20 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + diff --git a/src/app/modifications/ModificationsConstants.js b/src/app/modifications/ModificationsConstants.js new file mode 100644 index 0000000..e5faa35 --- /dev/null +++ b/src/app/modifications/ModificationsConstants.js @@ -0,0 +1,20 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + diff --git a/src/app/modifications/ModificationsReducer.js b/src/app/modifications/ModificationsReducer.js new file mode 100644 index 0000000..4060806 --- /dev/null +++ b/src/app/modifications/ModificationsReducer.js @@ -0,0 +1,19 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ diff --git a/src/app/module/index.js b/src/app/module/index.js new file mode 100644 index 0000000..6e82e14 --- /dev/null +++ b/src/app/module/index.js @@ -0,0 +1,50 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +// Import section (used as anchor to add extension imports) +import Browse from '../browse/Browse.jsx'; +import SpecializedSearch from '../specializedSearch/SpecializedSearch.jsx'; +import Modifications from '../modifications/Modifications.jsx'; +import Model from '../model/modelSearch/Model.jsx'; +import ModelGallery from '../model/modelSearch/components/ModelGallery.jsx'; +import ModelReducer from '../model/modelSearch/ModelReducer.js'; +import History from '../model/history/History.jsx'; +import HistoryGallery from '../model/history/components/HistoryGallery.jsx'; +import HistoryQuery from '../model/history/HistoryQuery.jsx'; +import CustomQuery from '../customQuery/CustomQuery.jsx'; +import CustomDsl from '../byoq/CustomDsl.jsx'; +import CustomDslBuilder from '../byoq/CustomDslBuilder.jsx'; + +let components = {}; +// Components section (used as an anchor to add extension components) +components['ModelGallery'] = ModelGallery; +components['HistoryGallery'] = HistoryGallery; +components['HistoryQuery'] = HistoryQuery; +components['Model'] = Model; +components['ModelReducer'] = ModelReducer; +components['History'] = History; +components['CustomDsl'] = CustomDsl; +components['CustomDslBuilder'] = CustomDslBuilder; +components['Browse'] = Browse; +components['SpecializedSearch'] = SpecializedSearch; +components['Modifications'] = Modifications; +components['CustomQuery'] = CustomQuery; + +export default components; diff --git a/src/app/networking/NetworkConstants.js b/src/app/networking/NetworkConstants.js index 1bc5eb0..8f0de17 100644 --- a/src/app/networking/NetworkConstants.js +++ b/src/app/networking/NetworkConstants.js @@ -31,4 +31,11 @@ export const NO_RESULTS_FOUND = 'No Results Found'; const BACKEND_IP_ADDRESS = document.location.hostname; const BACKEND_PORT_NUMBER = window.location.port; const PROTOCOL = window.location.protocol; -export const BASE_URL = PROTOCOL + '//' + BACKEND_IP_ADDRESS + ':' + BACKEND_PORT_NUMBER; +var base = ''; +var url = window.location.href; +if(url.includes('ecompc_')){ + base = PROTOCOL + '//' + BACKEND_IP_ADDRESS + '/' + url.split('/')[3]; +}else{ + base = PROTOCOL + '//' + BACKEND_IP_ADDRESS + ':' + BACKEND_PORT_NUMBER; +} +export const BASE_URL = base; diff --git a/src/app/personlaization/PersonalizationActions.js b/src/app/personlaization/PersonalizationActions.js index bdf54ca..affaac8 100644 --- a/src/app/personlaization/PersonalizationActions.js +++ b/src/app/personlaization/PersonalizationActions.js @@ -1,78 +1,80 @@ -/*
- * ============LICENSE_START=======================================================
- * org.onap.aai
- * ================================================================================
- * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
- * Copyright © 2017-2018 Amdocs
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-import {
- GET
- } from 'app/networking/NetworkConstants.js';
-import networkCall from 'app/networking/NetworkCalls.js';
-import {
- GET_PERSONALIZED_VALUES_URL,
- PERSONALIZATION_FAILED_MESSAGE,
- personalizationActionTypes
-} from 'app/personlaization/PersonalizationConstans.js';
-import {
- getSetGlobalMessageEvent
-} from 'app/globalInlineMessageBar/GlobalInlineMessageBarActions.js';
-
-import {
- STATUS_CODE_5XX_SERVER_ERROR,
- MESSAGE_LEVEL_WARNING
-} from 'utils/GlobalConstants.js';
-
-
-function createPersonalizedValuesEvent(payload) {
-
- let event = {
- type: personalizationActionTypes.PERSONALIZATION_PAYLOAD_FOUND,
- data: payload
- };
- return event;
-}
-
-function fetchPersonalizedValues(fetchRequestCallback) {
- return dispatch => {
- return fetchRequestCallback().then(
- (response) => {
- if (response.status >= STATUS_CODE_5XX_SERVER_ERROR) {
- dispatch(getSetGlobalMessageEvent(PERSONALIZATION_FAILED_MESSAGE , MESSAGE_LEVEL_WARNING));
- } else {
- // assume 200 status
- return response.json();
- }
- }
- ).then(
- (results)=> {
- dispatch(createPersonalizedValuesEvent(results));
- }
- ).catch(
- () => {
- dispatch(getSetGlobalMessageEvent(PERSONALIZATION_FAILED_MESSAGE , MESSAGE_LEVEL_WARNING));
- }
- );
- };
-}
-
-export function getPersonalizationDetails(){
- let personalizationFetchRequest =
- () => networkCall.getRequest(GET_PERSONALIZED_VALUES_URL, GET);
-
- return dispatch => dispatch(fetchPersonalizedValues(personalizationFetchRequest));
-}
+/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright © 2017-2018 Amdocs + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import { + GET + } from 'app/networking/NetworkConstants.js'; +import networkCall from 'app/networking/NetworkCalls.js'; +import { + GET_PERSONALIZED_VALUES_URL, + PERSONALIZATION_FAILED_MESSAGE, + personalizationActionTypes +} from 'app/personlaization/PersonalizationConstans.js'; +import { + getSetGlobalMessageEvent +} from 'app/globalInlineMessageBar/GlobalInlineMessageBarActions.js'; + +import { + STATUS_CODE_5XX_SERVER_ERROR, + MESSAGE_LEVEL_WARNING +} from 'utils/GlobalConstants.js'; + + +function createPersonalizedValuesEvent(payload) { + + let event = { + type: personalizationActionTypes.PERSONALIZATION_PAYLOAD_FOUND, + data: payload + }; + return event; +} + +function fetchPersonalizedValues(fetchRequestCallback) { + return dispatch => { + return fetchRequestCallback().then( + (response) => { + if (response.status >= STATUS_CODE_5XX_SERVER_ERROR) { + dispatch(getSetGlobalMessageEvent(PERSONALIZATION_FAILED_MESSAGE , MESSAGE_LEVEL_WARNING)); + } else { + // assume 200 status + //for localonly do not commit + //dispatch(createPersonalizedValuesEvent(response)); + return response.json(); + } + } + ).then( + (results)=> { + dispatch(createPersonalizedValuesEvent(results)); + } + ).catch( + () => { + dispatch(getSetGlobalMessageEvent(PERSONALIZATION_FAILED_MESSAGE , MESSAGE_LEVEL_WARNING)); + } + ); + }; +} + +export function getPersonalizationDetails(){ + let personalizationFetchRequest = + () => networkCall.getRequest(GET_PERSONALIZED_VALUES_URL, GET); + + return dispatch => dispatch(fetchPersonalizedValues(personalizationFetchRequest)); +} diff --git a/src/app/personlaization/PersonalizationConstans.js b/src/app/personlaization/PersonalizationConstans.js index bbe0174..755c244 100644 --- a/src/app/personlaization/PersonalizationConstans.js +++ b/src/app/personlaization/PersonalizationConstans.js @@ -1,30 +1,31 @@ -/*
- * ============LICENSE_START=======================================================
- * org.onap.aai
- * ================================================================================
- * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
- * Copyright © 2017-2018 Amdocs
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-import keyMirror from 'utils/KeyMirror.js';
-import {BASE_URL} from 'app/networking/NetworkConstants.js';
-
-export const personalizationActionTypes = keyMirror({
- PERSONALIZATION_PAYLOAD_FOUND: null
-});
-
-export const GET_PERSONALIZED_VALUES_URL = BASE_URL + '/rest/getPersonalizedValues';
-export const PERSONALIZATION_FAILED_MESSAGE = 'Failed to fetch personalization values';
+/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright © 2017-2018 Amdocs + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import keyMirror from 'utils/KeyMirror.js'; +import {BASE_URL} from 'app/networking/NetworkConstants.js'; + +export const personalizationActionTypes = keyMirror({ + PERSONALIZATION_PAYLOAD_FOUND: null +}); + +export const GET_PERSONALIZED_VALUES_URL = BASE_URL + '/rest/getPersonalizedValues'; +export const PERSONALIZATION_FAILED_MESSAGE = 'Failed to fetch personalization values'; +//export const GET_PERSONALIZED_VALUES_URL ='https://localhost:8000/rest/getPersonalizedValues'; diff --git a/src/app/specializedSearch/SpecializedSearch.jsx b/src/app/specializedSearch/SpecializedSearch.jsx new file mode 100644 index 0000000..91a45be --- /dev/null +++ b/src/app/specializedSearch/SpecializedSearch.jsx @@ -0,0 +1,266 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +import React, {Component} from 'react'; +import Filter from 'generic-components/filter/Filter.jsx'; +import {GlobalExtConstants} from 'utils/GlobalExtConstants.js'; +import Col from 'react-bootstrap/lib/Col'; +import Row from 'react-bootstrap/lib/Row'; +import Grid from 'react-bootstrap/lib/Grid'; +import Panel from 'react-bootstrap/lib/Panel'; +import BootstrapSwitchButton from 'bootstrap-switch-button-react'; + +let INVLIST = GlobalExtConstants.INVLIST; +let OXM = GlobalExtConstants.OXM; + +let invList = null; +let APERTURE_SERVICE = JSON.parse(sessionStorage.getItem(GlobalExtConstants.ENVIRONMENT + 'APERTURE_SERVICE')); + +class SpecializedSearch extends Component { + + state = { + data: [], + filterList: [], + filterSelected: '', + filterDisplay: 'Select Filter', + filterTypeDisplay: 'Filter Type', + errorMsg: '', + showFilter:false, + filterMessage:[], + filterValue:'', + filterSelectedList:[], + isRunEnable:true, + enableRealTime: JSON.parse(sessionStorage.getItem(GlobalExtConstants.ENVIRONMENT + 'ENABLE_ANALYSIS')) + }; + + constructor(){ + super(); + APERTURE_SERVICE=JSON.parse(sessionStorage.getItem(GlobalExtConstants.ENVIRONMENT + 'APERTURE_SERVICE')); + } + componentDidMount(){ + + if(this.state.filterSelected === ''){ + const invKeys = Object.keys(INVLIST.INVENTORYLIST); + invKeys.sort().map((item,i) => { + if(i === 0 && this.state.filterSelected === ''){ + this.setState( + { filterSelected: INVLIST.INVENTORYLIST[item].modelPath,filterDisplay:'Select Filter',filterTypeDisplay:'Filter Type'}, + function(){this.populateFilteringOptions();}.bind(this)); + } + }); + } + }; + isContaining(nameKey, listArray){ + var found = false; + listArray.map((lists) => { + if(lists.id === nameKey){ + console.log('foundName key in list',lists.id); + found = true; + } + }); + return found; + }; + radioButtonSelectedHandler(event) { + console.log('radio button clicked'); + this.setState( + { filterSelected: event.target.value,filterList:[],filterSelectedList:[],filterDisplay:'Select Filter',filterTypeDisplay:'Filter Type',filterMessage:[]}, + function(){this.populateFilteringOptions();}.bind(this) + ); + }; + camelToDash = (str) => { + return (str.replace(/\W+/g, '-') + .replace(/([a-z\d])([A-Z])/g, '$1-$2')).toLowerCase(); + } + populateFilteringOptions = () => { + + let result = JSON.parse(OXM); + let arrayOfTypes = result['xml-bindings']['java-types'][0]['java-type']; + console.log('arrayOfTypes ', arrayOfTypes); + let foundIndex = -1; + let searchParam = this.state.filterSelected; + if(['PSERVER', 'COMPLEX', 'CLOUDREGION', 'NETWORKPROFILE', 'VIRTUALDATACENTER'].indexOf(this.state.filterSelected.toUpperCase()) === -1){ + searchParam = this.state.filterSelected.substring(0, this.state.filterSelected.length - 1); + } + if('CHASSIES'.indexOf(this.state.filterSelected.toUpperCase()) !== -1){ + searchParam = this.state.filterSelected.substring(0, this.state.filterSelected.length - 2) + 's'; + }else if(this.state.filterSelected.substr(this.state.filterSelected.length - 3) === 'ies'){ + searchParam = this.state.filterSelected.substring(0, this.state.filterSelected.length - 3) + 'y'; + }else if('COMPLEXES'.indexOf(this.state.filterSelected.toUpperCase()) !== -1){ + searchParam = this.state.filterSelected.substring(0, this.state.filterSelected.length - 2); + } + if(searchParam === 'PINTERFACE'){ + searchParam = 'pInterface'; + } + if(this.state.filterSelected.toUpperCase() === 'LINESOFBUSINESS'){ + searchParam = 'lineOfBusiness'; + } + console.log('searchParam Node type',searchParam); + for (var i = 0; i < arrayOfTypes.length && foundIndex === -1; i++) { + if (arrayOfTypes[i]['xml-root-element'][0]['$']['name'] === this.camelToDash(searchParam)) { + console.log(arrayOfTypes[i]); + foundIndex = i; + } + } + var tempState = this.state; + tempState.filterList = []; + if(foundIndex !== -1){ + tempState.errorMsg = ''; + //build the filter list + if (arrayOfTypes[foundIndex]['java-attributes']) { + let elementLength = 0; + if (arrayOfTypes[foundIndex]['java-attributes'][0]['xml-element']) { + elementLength = arrayOfTypes[foundIndex]['java-attributes'][0]['xml-element'].length; + } + for (var j = 0; j < elementLength; j++) { + let isPrimitive = JSON.stringify(arrayOfTypes[foundIndex]['java-attributes'][0]['xml-element'][j]['$']['type']).indexOf('java.lang') > -1; + if(isPrimitive) { //add to the list + let node = {value: arrayOfTypes[foundIndex]['java-attributes'][0]['xml-element'][j]['$']['name']}; + tempState.filterList.push(node); + } + } + } + + //sort the filter list + tempState.filterList = tempState.filterList.sort(function(filter1, filter2) { + if ( filter1.value < filter2.value ){ + return -1; + }else if( filter1.value > filter2.value ){ + return 1; + }else{ + return 0; + } + }); + } + this.setState(tempState); + console.log('tempState.filterList ' + JSON.stringify(tempState.filterList)); + }; + initialUpdateOfFilter = (filter) => { + this.setState( + { filterSelected: filter,filterDisplay:'Select Filter',filterTypeDisplay:'Filter Type'}, + function(){this.populateFilteringOptions();}.bind(this) + ); + }; + toggleRealTimeAnalysisCallback=(checked)=>{ + console.log('toggleRealTimeAnalysisCallback>>>>',checked); + sessionStorage.setItem(GlobalExtConstants.ENVIRONMENT + 'ENABLE_ANALYSIS', !checked); + + this.setState({ enableRealTime: !checked, + filterList:[], + filterSelectedList:[], + filterDisplay:'Select Filter', + filterTypeDisplay:'Filter Type', + filterMessage:[], + errorMsg: "", + filterMessage: [], + filterValue: "", + isRunEnable: true, + showFilter: false},function(){this.populateFilteringOptions();}.bind(this)); + } + render(){ + var toggelRealtimeAnalysis = ''; + if(APERTURE_SERVICE){ + toggelRealtimeAnalysis = <div className='toggleSwitch'><BootstrapSwitchButton + checked={!this.state.enableRealTime} + onlabel='Real Time' + onstyle='danger' + offlabel='Analysis' + offstyle='success' + style='w-100 mx-3' + onChange={(checked) => { + this.toggleRealTimeAnalysisCallback(checked); + }} + /></div> + } + let pagetitle = ''; + if(this.state.filterSelected !== ''){ + pagetitle = INVLIST.INVENTORYLIST[this.state.filterSelected.replace(/\s/g,'').toUpperCase()].display; + } + const invKeys = Object.keys(INVLIST.INVENTORYLIST); + invList = invKeys.sort().map((item,i) => { + let checkedStatus = INVLIST.INVENTORYLIST[item].modelPath === this.state.filterSelected; + if(i === 0 && this.state.filterSelected === ''){ + checkedStatus = true; + } + let selectedClass = 'leftNavSelection'; + if(checkedStatus){ + selectedClass = 'leftNavSelected '; + } + return ( + <div key={INVLIST.INVENTORYLIST[item].display} className={'form-row ' + selectedClass}> + <label role='radio' className='radio'> + <input type='radio' name='optionsRadios' className='optionsRadios' + value={INVLIST.INVENTORYLIST[item].modelPath} + checked={checkedStatus} + onChange={(event)=> this.radioButtonSelectedHandler(event)}/> + <i className='skin'></i> + <span>{INVLIST.INVENTORYLIST[item].display}</span> + </label> + </div> + ); + }); + + return( + <div> + {toggelRealtimeAnalysis} + <div id='specialSearch'> + <header className='addPadding jumbotron my-4'> + <h1 className='display-2'>Network Element Specialized Search</h1> + <p className='lead'> + On this page you have the ability to build a set of query criteria per network element type and run a query. Simply choose the network element type from the radio buttons, build your filters, and run. + </p> + </header> + </div> + <div className='addPadding'> + <Row className='show-grid' style={{margin: '0px'}}> + <Col md={3} className='leftNavSelection'> + <header>List of Network Element Types</header> + <form id='filters' name='myForm'> + <fieldset role='radiogroup' aria-labelledby='radiolabel1' className='leftNavSelection'> + {invList} + </fieldset> + </form> + </Col> + <Col md={9} className='mainSectionSelection'> + <Panel bsStyle='primary'> + <Panel.Heading> + <Panel.Title componentClass='h3'>Filter Section : {pagetitle} </Panel.Title> + </Panel.Heading> + <Panel.Body> + <Filter key='specializedSearch' + nodeType={this.state.filterSelected} + filterList={this.state.filterList} + filterDisplay={this.state.filterDisplay} + filterTypeDisplay={this.state.filterTypeDisplay} + isRunEnable={this.state.isRunEnable} + filterMessage={this.state.filterMessage} + filterSelectedList={this.state.filterSelectedList} + isFilterEnable={true} + errorMsg={this.state.errorMsg} + enableRealTime={this.state.enableRealTime}/> + </Panel.Body> + </Panel> + </Col> + </Row> + </div> + </div> + ); + } +} +export default SpecializedSearch; diff --git a/src/app/specializedSearch/SpecializedSearchActions.js b/src/app/specializedSearch/SpecializedSearchActions.js new file mode 100644 index 0000000..e5faa35 --- /dev/null +++ b/src/app/specializedSearch/SpecializedSearchActions.js @@ -0,0 +1,20 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + diff --git a/src/app/specializedSearch/SpecializedSearchConstants.js b/src/app/specializedSearch/SpecializedSearchConstants.js new file mode 100644 index 0000000..ad4d715 --- /dev/null +++ b/src/app/specializedSearch/SpecializedSearchConstants.js @@ -0,0 +1,22 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + + export const ATT_URI = 'localhost:8887'; + diff --git a/src/app/specializedSearch/SpecializedSearchReducer.js b/src/app/specializedSearch/SpecializedSearchReducer.js new file mode 100644 index 0000000..e5faa35 --- /dev/null +++ b/src/app/specializedSearch/SpecializedSearchReducer.js @@ -0,0 +1,20 @@ +/* + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright © 2017-2021 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + |