diff options
38 files changed, 3366 insertions, 1200 deletions
diff --git a/aai-annotations/src/test/java/org/onap/aai/annotations/AnnotationsTest.java b/aai-annotations/src/test/java/org/onap/aai/annotations/AnnotationsTest.java index caaec99a..52c74b6e 100644 --- a/aai-annotations/src/test/java/org/onap/aai/annotations/AnnotationsTest.java +++ b/aai-annotations/src/test/java/org/onap/aai/annotations/AnnotationsTest.java @@ -23,25 +23,25 @@ import org.onap.aai.annotations.Metadata; public class AnnotationsTest { - public AnnotationsTest() { - } + public AnnotationsTest() { + } - @Metadata(isKey=false, - description="", - nameProps="", - indexedProps="", - dependentOn="", - container="", - namespace="", - defaultValue="", - searchable="", - uniqueProps="", - uriTemplate="", - extendsFrom="", - isAbstract="", - alternateKeys1="", - maximumDepth="", - crossEntityReference="") - public void testAnnotation() { - } + @Metadata(isKey = false, + description = "", + nameProps = "", + indexedProps = "", + dependentOn = "", + container = "", + namespace = "", + defaultValue = "", + searchable = "", + uniqueProps = "", + uriTemplate = "", + extendsFrom = "", + isAbstract = "", + alternateKeys1 = "", + maximumDepth = "", + crossEntityReference = "") + public void testAnnotation() { + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorTest.java index e8c946d9..6292da71 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorTest.java @@ -50,316 +50,316 @@ import com.google.common.collect.Multimap; @TestPropertySource(properties = { "schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties" }) @SpringBootTest public class EdgeIngestorTest { - @Autowired - EdgeIngestor ei; - - @Rule - public ExpectedException thrown = ExpectedException.none(); - - @Test - public void getRulesTest1() throws EdgeRuleNotFoundException { - EdgeRuleQuery q = new EdgeRuleQuery.Builder("foo").build(); - Multimap<String, EdgeRule> results = ei.getRules(q); - assertTrue(results.size() == 5); - assertTrue(results.containsKey("bar|foo")); - - assertTrue(2 == results.get("bar|foo").size()); - boolean seenLabel1 = false; - boolean seenLabel2 = false; - for(EdgeRule r : results.get("bar|foo")) { - if ("eats".equals(r.getLabel())) { - seenLabel1 = true; - } - if ("eatz".equals(r.getLabel())) { - seenLabel2 = true; - } - } - assertTrue(seenLabel1 && seenLabel2); - - assertTrue(results.containsKey("baz|foo")); - assertTrue(results.containsKey("foo|quux")); - assertTrue(results.containsKey("dog|foo")); - } - - @Test - public void getRulesTest2() throws EdgeRuleNotFoundException { - EdgeRuleQuery q = new EdgeRuleQuery.Builder("dog", "puppy").build(); - Multimap<String, EdgeRule> results = ei.getRules(q); - assertTrue(results.size() == 1); - assertTrue(results.containsKey("dog|puppy")); - Collection<EdgeRule> cr = results.get("dog|puppy"); - for (EdgeRule r : cr) { - assertTrue("dog".equals(r.getFrom())); - assertTrue("puppy".equals(r.getTo())); - assertTrue("caresFor".equals(r.getLabel())); - assertTrue(Direction.OUT.equals(r.getDirection())); - assertTrue("One2Many".equalsIgnoreCase(r.getMultiplicityRule().toString())); - assertTrue("NONE".equals(r.getContains())); - assertTrue("OUT".equals(r.getDeleteOtherV())); - assertTrue("NONE".equals(r.getPreventDelete())); - assertTrue(r.isDefault()); - } - } - - @Test - public void getRulesFlippedTypesTest() throws EdgeRuleNotFoundException { - EdgeRuleQuery q = new EdgeRuleQuery.Builder("l-interface", "logical-link").version(new SchemaVersion("v11")).build(); - Multimap<String, EdgeRule> results = ei.getRules(q); - assertTrue(results.size() == 3); - for (EdgeRule r : results.get("l-interface|logical-link")) { - if ("org.onap.relationships.inventory.Source".equals(r.getLabel()) || - "org.onap.relationships.inventory.Destination".equals(r.getLabel())) { - //these are defined with from=logical-link, to=l-interface, so they must be flipped - assertTrue(Direction.IN.equals(r.getDirection())); - } else if ("tosca.relationships.network.LinksTo".equals(r.getLabel())) { - //this is defined with from=l-interface, to=logical-link, so it shouldn't be flipped - assertTrue(Direction.OUT.equals(r.getDirection())); - } else { - fail("how did you get here"); - } - } - } - - @Test - public void fromToSameFlipTests() throws EdgeRuleNotFoundException, AmbiguousRuleChoiceException { - //getRules, setting from and to - EdgeRuleQuery q = new EdgeRuleQuery.Builder("bloop","bloop").version(new SchemaVersion("v11")).build(); - Multimap<String, EdgeRule> results = ei.getRules(q); - assertTrue(results.size() == 1); - for (EdgeRule r : results.get("bloop|bloop")) { - assertTrue(Direction.IN.equals(r.getDirection())); - } - - //getRule, setting just from - EdgeRuleQuery q2 = new EdgeRuleQuery.Builder("bloop").version(new SchemaVersion("v11")).build(); - assertTrue(Direction.IN.equals(ei.getRule(q2).getDirection())); - - //getChildRules - Multimap<String, EdgeRule> child = ei.getChildRules("bloop", new SchemaVersion("v11")); - assertTrue(child.size() == 1); - for (EdgeRule r : child.get("bloop|bloop")) { - assertTrue(Direction.IN.equals(r.getDirection())); - } - } - - @Test - public void getRulesTest3() throws EdgeRuleNotFoundException { - EdgeRuleQuery q = new EdgeRuleQuery.Builder("l-interface").version(new SchemaVersion("v11")).build(); - Multimap<String, EdgeRule> results = ei.getRules(q); - assertTrue(results.size() == 4); - assertTrue(results.containsKey("lag-interface|l-interface")); - assertTrue(results.containsKey("l-interface|logical-link")); - assertTrue(results.get("l-interface|logical-link").size() == 3); - } - - @Test - public void getRulesNoneFound() throws EdgeRuleNotFoundException { - thrown.expect(EdgeRuleNotFoundException.class); - thrown.expectMessage("No rules found for"); - EdgeRuleQuery q = new EdgeRuleQuery.Builder("l-interface").build(); - ei.getRules(q); - } - - @Test - public void getRuleSimpleTest() throws EdgeRuleNotFoundException, AmbiguousRuleChoiceException { - EdgeRuleQuery q = new EdgeRuleQuery.Builder("parent", "notation").build(); - EdgeRule result = ei.getRule(q); - assertTrue("parent".equals(result.getFrom())); - assertTrue("notation".equals(result.getTo())); - assertTrue("has".equals(result.getLabel())); - assertTrue(Direction.OUT.equals(result.getDirection())); - assertTrue(MultiplicityRule.MANY2MANY.equals(result.getMultiplicityRule())); - assertTrue(AAIDirection.OUT.toString().equals(result.getContains())); - assertTrue(AAIDirection.NONE.toString().equals(result.getDeleteOtherV())); - assertTrue(AAIDirection.NONE.toString().equals(result.getPreventDelete())); - assertTrue("parent contains notation".equals(result.getDescription())); - } - - @Test - public void getRuleFlippedTypesTest() throws EdgeRuleNotFoundException, AmbiguousRuleChoiceException { - EdgeRuleQuery q = new EdgeRuleQuery.Builder("notation", "parent").build(); - EdgeRule result = ei.getRule(q); - assertTrue("parent".equals(result.getFrom())); - assertTrue("notation".equals(result.getTo())); - assertTrue("has".equals(result.getLabel())); - //direction flipped to match input order per old EdgeRules.java API - assertTrue(Direction.IN.equals(result.getDirection())); - assertTrue(MultiplicityRule.MANY2MANY.equals(result.getMultiplicityRule())); - assertTrue(AAIDirection.OUT.toString().equals(result.getContains())); - assertTrue(AAIDirection.NONE.toString().equals(result.getDeleteOtherV())); - assertTrue(AAIDirection.NONE.toString().equals(result.getPreventDelete())); - assertTrue("parent contains notation".equals(result.getDescription())); - } - - @Test - public void getRuleWithDefaultTest() throws EdgeRuleNotFoundException, AmbiguousRuleChoiceException { + @Autowired + EdgeIngestor ei; + + @Rule + public ExpectedException thrown = ExpectedException.none(); + + @Test + public void getRulesTest1() throws EdgeRuleNotFoundException { + EdgeRuleQuery q = new EdgeRuleQuery.Builder("foo").build(); + Multimap<String, EdgeRule> results = ei.getRules(q); + assertTrue(results.size() == 5); + assertTrue(results.containsKey("bar|foo")); + + assertTrue(2 == results.get("bar|foo").size()); + boolean seenLabel1 = false; + boolean seenLabel2 = false; + for(EdgeRule r : results.get("bar|foo")) { + if ("eats".equals(r.getLabel())) { + seenLabel1 = true; + } + if ("eatz".equals(r.getLabel())) { + seenLabel2 = true; + } + } + assertTrue(seenLabel1 && seenLabel2); + + assertTrue(results.containsKey("baz|foo")); + assertTrue(results.containsKey("foo|quux")); + assertTrue(results.containsKey("dog|foo")); + } + + @Test + public void getRulesTest2() throws EdgeRuleNotFoundException { + EdgeRuleQuery q = new EdgeRuleQuery.Builder("dog", "puppy").build(); + Multimap<String, EdgeRule> results = ei.getRules(q); + assertTrue(results.size() == 1); + assertTrue(results.containsKey("dog|puppy")); + Collection<EdgeRule> cr = results.get("dog|puppy"); + for (EdgeRule r : cr) { + assertTrue("dog".equals(r.getFrom())); + assertTrue("puppy".equals(r.getTo())); + assertTrue("caresFor".equals(r.getLabel())); + assertTrue(Direction.OUT.equals(r.getDirection())); + assertTrue("One2Many".equalsIgnoreCase(r.getMultiplicityRule().toString())); + assertTrue("NONE".equals(r.getContains())); + assertTrue("OUT".equals(r.getDeleteOtherV())); + assertTrue("NONE".equals(r.getPreventDelete())); + assertTrue(r.isDefault()); + } + } + + @Test + public void getRulesFlippedTypesTest() throws EdgeRuleNotFoundException { + EdgeRuleQuery q = new EdgeRuleQuery.Builder("l-interface", "logical-link").version(new SchemaVersion("v11")).build(); + Multimap<String, EdgeRule> results = ei.getRules(q); + assertTrue(results.size() == 3); + for (EdgeRule r : results.get("l-interface|logical-link")) { + if ("org.onap.relationships.inventory.Source".equals(r.getLabel()) || + "org.onap.relationships.inventory.Destination".equals(r.getLabel())) { + //these are defined with from=logical-link, to=l-interface, so they must be flipped + assertTrue(Direction.IN.equals(r.getDirection())); + } else if ("tosca.relationships.network.LinksTo".equals(r.getLabel())) { + //this is defined with from=l-interface, to=logical-link, so it shouldn't be flipped + assertTrue(Direction.OUT.equals(r.getDirection())); + } else { + fail("how did you get here"); + } + } + } + + @Test + public void fromToSameFlipTests() throws EdgeRuleNotFoundException, AmbiguousRuleChoiceException { + //getRules, setting from and to + EdgeRuleQuery q = new EdgeRuleQuery.Builder("bloop","bloop").version(new SchemaVersion("v11")).build(); + Multimap<String, EdgeRule> results = ei.getRules(q); + assertTrue(results.size() == 1); + for (EdgeRule r : results.get("bloop|bloop")) { + assertTrue(Direction.IN.equals(r.getDirection())); + } + + //getRule, setting just from + EdgeRuleQuery q2 = new EdgeRuleQuery.Builder("bloop").version(new SchemaVersion("v11")).build(); + assertTrue(Direction.IN.equals(ei.getRule(q2).getDirection())); + + //getChildRules + Multimap<String, EdgeRule> child = ei.getChildRules("bloop", new SchemaVersion("v11")); + assertTrue(child.size() == 1); + for (EdgeRule r : child.get("bloop|bloop")) { + assertTrue(Direction.IN.equals(r.getDirection())); + } + } + + @Test + public void getRulesTest3() throws EdgeRuleNotFoundException { + EdgeRuleQuery q = new EdgeRuleQuery.Builder("l-interface").version(new SchemaVersion("v11")).build(); + Multimap<String, EdgeRule> results = ei.getRules(q); + assertTrue(results.size() == 4); + assertTrue(results.containsKey("lag-interface|l-interface")); + assertTrue(results.containsKey("l-interface|logical-link")); + assertTrue(results.get("l-interface|logical-link").size() == 3); + } + + @Test + public void getRulesNoneFound() throws EdgeRuleNotFoundException { + thrown.expect(EdgeRuleNotFoundException.class); + thrown.expectMessage("No rules found for"); + EdgeRuleQuery q = new EdgeRuleQuery.Builder("l-interface").build(); + ei.getRules(q); + } + + @Test + public void getRuleSimpleTest() throws EdgeRuleNotFoundException, AmbiguousRuleChoiceException { + EdgeRuleQuery q = new EdgeRuleQuery.Builder("parent", "notation").build(); + EdgeRule result = ei.getRule(q); + assertTrue("parent".equals(result.getFrom())); + assertTrue("notation".equals(result.getTo())); + assertTrue("has".equals(result.getLabel())); + assertTrue(Direction.OUT.equals(result.getDirection())); + assertTrue(MultiplicityRule.MANY2MANY.equals(result.getMultiplicityRule())); + assertTrue(AAIDirection.OUT.toString().equals(result.getContains())); + assertTrue(AAIDirection.NONE.toString().equals(result.getDeleteOtherV())); + assertTrue(AAIDirection.NONE.toString().equals(result.getPreventDelete())); + assertTrue("parent contains notation".equals(result.getDescription())); + } + + @Test + public void getRuleFlippedTypesTest() throws EdgeRuleNotFoundException, AmbiguousRuleChoiceException { + EdgeRuleQuery q = new EdgeRuleQuery.Builder("notation", "parent").build(); + EdgeRule result = ei.getRule(q); + assertTrue("parent".equals(result.getFrom())); + assertTrue("notation".equals(result.getTo())); + assertTrue("has".equals(result.getLabel())); + //direction flipped to match input order per old EdgeRules.java API + assertTrue(Direction.IN.equals(result.getDirection())); + assertTrue(MultiplicityRule.MANY2MANY.equals(result.getMultiplicityRule())); + assertTrue(AAIDirection.OUT.toString().equals(result.getContains())); + assertTrue(AAIDirection.NONE.toString().equals(result.getDeleteOtherV())); + assertTrue(AAIDirection.NONE.toString().equals(result.getPreventDelete())); + assertTrue("parent contains notation".equals(result.getDescription())); + } + + @Test + public void getRuleWithDefaultTest() throws EdgeRuleNotFoundException, AmbiguousRuleChoiceException { - EdgeRuleQuery q = new EdgeRuleQuery.Builder("l-interface","logical-link").version(new SchemaVersion("v11")).build(); - EdgeRule res = ei.getRule(q); - assertTrue(res.isDefault()); - assertTrue("tosca.relationships.network.LinksTo".equals(res.getLabel())); - } - - @Test - public void getRuleWithNonDefault() throws EdgeRuleNotFoundException, AmbiguousRuleChoiceException { - EdgeRuleQuery q = new EdgeRuleQuery.Builder("l-interface","logical-link").label("org.onap.relationships.inventory.Source").version(new SchemaVersion("v11")).build(); - EdgeRule res = ei.getRule(q); - assertFalse(res.isDefault()); - assertTrue("org.onap.relationships.inventory.Source".equals(res.getLabel())); - } - - @Test - public void getRuleNoneFoundTest() throws EdgeRuleNotFoundException, AmbiguousRuleChoiceException { - thrown.expect(EdgeRuleNotFoundException.class); - thrown.expectMessage("No rule found for"); - EdgeRuleQuery q = new EdgeRuleQuery.Builder("l-interface","nonexistent").build(); - ei.getRule(q); - } - - @Test - public void getRuleTooManyPairsTest() throws EdgeRuleNotFoundException, AmbiguousRuleChoiceException { - thrown.expect(AmbiguousRuleChoiceException.class); - thrown.expectMessage("No way to select single rule from these pairs:"); - EdgeRuleQuery q = new EdgeRuleQuery.Builder("foo").build(); - ei.getRule(q); - } - - @Test - public void getRuleAmbiguousDefaultTest() throws EdgeRuleNotFoundException, AmbiguousRuleChoiceException { - thrown.expect(AmbiguousRuleChoiceException.class); - thrown.expectMessage("Multiple defaults found."); - EdgeRuleQuery q = new EdgeRuleQuery.Builder("seed","plant").version(new SchemaVersion("v11")).build(); - ei.getRule(q); - } - - @Test - public void getRuleNoDefaultTest() throws EdgeRuleNotFoundException, AmbiguousRuleChoiceException { - thrown.expect(AmbiguousRuleChoiceException.class); - thrown.expectMessage("No default found."); - EdgeRuleQuery q = new EdgeRuleQuery.Builder("apple", "orange").version(new SchemaVersion("v11")).build(); - ei.getRule(q); - } - - @Test - public void hasRuleTest() { - assertTrue(ei.hasRule(new EdgeRuleQuery.Builder("l-interface").version(new SchemaVersion("v11")).build())); - assertFalse(ei.hasRule(new EdgeRuleQuery.Builder("l-interface").build())); - } - - @Test - public void getCousinRulesTest() { - Multimap<String, EdgeRule> results = ei.getCousinRules("dog"); - assertTrue(results.size() == 2); - assertTrue(results.containsKey("dog|puppy")); - assertTrue(results.containsKey("dog|foo")); - } - - @Test - public void getCousinRulesWithVersionTest() { - Multimap<String, EdgeRule> results = ei.getCousinRules("foo", new SchemaVersion("v10")); - assertTrue(results.size() == 2); - assertTrue(results.containsKey("bar|foo")); - assertTrue(results.get("bar|foo").size() == 2); - } - - @Test - public void getCousinsNoneInVersionTest() { - Multimap<String, EdgeRule> results = ei.getCousinRules("foo", new SchemaVersion("v11")); - assertTrue(results.isEmpty()); - } - - @Test - public void hasCousinTest() { - assertTrue(ei.hasCousinRule("foo")); - assertTrue(ei.hasCousinRule("foo", new SchemaVersion("v10"))); - assertFalse(ei.hasCousinRule("parent")); - assertFalse(ei.hasCousinRule("foo", new SchemaVersion("v11"))); - } + EdgeRuleQuery q = new EdgeRuleQuery.Builder("l-interface","logical-link").version(new SchemaVersion("v11")).build(); + EdgeRule res = ei.getRule(q); + assertTrue(res.isDefault()); + assertTrue("tosca.relationships.network.LinksTo".equals(res.getLabel())); + } + + @Test + public void getRuleWithNonDefault() throws EdgeRuleNotFoundException, AmbiguousRuleChoiceException { + EdgeRuleQuery q = new EdgeRuleQuery.Builder("l-interface","logical-link").label("org.onap.relationships.inventory.Source").version(new SchemaVersion("v11")).build(); + EdgeRule res = ei.getRule(q); + assertFalse(res.isDefault()); + assertTrue("org.onap.relationships.inventory.Source".equals(res.getLabel())); + } + + @Test + public void getRuleNoneFoundTest() throws EdgeRuleNotFoundException, AmbiguousRuleChoiceException { + thrown.expect(EdgeRuleNotFoundException.class); + thrown.expectMessage("No rule found for"); + EdgeRuleQuery q = new EdgeRuleQuery.Builder("l-interface","nonexistent").build(); + ei.getRule(q); + } + + @Test + public void getRuleTooManyPairsTest() throws EdgeRuleNotFoundException, AmbiguousRuleChoiceException { + thrown.expect(AmbiguousRuleChoiceException.class); + thrown.expectMessage("No way to select single rule from these pairs:"); + EdgeRuleQuery q = new EdgeRuleQuery.Builder("foo").build(); + ei.getRule(q); + } + + @Test + public void getRuleAmbiguousDefaultTest() throws EdgeRuleNotFoundException, AmbiguousRuleChoiceException { + thrown.expect(AmbiguousRuleChoiceException.class); + thrown.expectMessage("Multiple defaults found."); + EdgeRuleQuery q = new EdgeRuleQuery.Builder("seed","plant").version(new SchemaVersion("v11")).build(); + ei.getRule(q); + } + + @Test + public void getRuleNoDefaultTest() throws EdgeRuleNotFoundException, AmbiguousRuleChoiceException { + thrown.expect(AmbiguousRuleChoiceException.class); + thrown.expectMessage("No default found."); + EdgeRuleQuery q = new EdgeRuleQuery.Builder("apple", "orange").version(new SchemaVersion("v11")).build(); + ei.getRule(q); + } + + @Test + public void hasRuleTest() { + assertTrue(ei.hasRule(new EdgeRuleQuery.Builder("l-interface").version(new SchemaVersion("v11")).build())); + assertFalse(ei.hasRule(new EdgeRuleQuery.Builder("l-interface").build())); + } + + @Test + public void getCousinRulesTest() { + Multimap<String, EdgeRule> results = ei.getCousinRules("dog"); + assertTrue(results.size() == 2); + assertTrue(results.containsKey("dog|puppy")); + assertTrue(results.containsKey("dog|foo")); + } + + @Test + public void getCousinRulesWithVersionTest() { + Multimap<String, EdgeRule> results = ei.getCousinRules("foo", new SchemaVersion("v10")); + assertTrue(results.size() == 2); + assertTrue(results.containsKey("bar|foo")); + assertTrue(results.get("bar|foo").size() == 2); + } + + @Test + public void getCousinsNoneInVersionTest() { + Multimap<String, EdgeRule> results = ei.getCousinRules("foo", new SchemaVersion("v11")); + assertTrue(results.isEmpty()); + } + + @Test + public void hasCousinTest() { + assertTrue(ei.hasCousinRule("foo")); + assertTrue(ei.hasCousinRule("foo", new SchemaVersion("v10"))); + assertFalse(ei.hasCousinRule("parent")); + assertFalse(ei.hasCousinRule("foo", new SchemaVersion("v11"))); + } - @Test - public void getChildRulesTest() { - Multimap<String, EdgeRule> results = ei.getChildRules("parent"); - assertTrue(results.size() == 6); - assertTrue(results.containsKey("notation|parent")); - assertTrue(results.containsKey("not-notation|parent")); - assertTrue(results.containsKey("out-out|parent")); - assertTrue(results.containsKey("in-in|parent")); - assertTrue(results.containsKey("in-out|parent")); - assertTrue(results.containsKey("out-in|parent")); - } - - @Test - public void getChildRulesWithVersionTest() { - Multimap<String, EdgeRule> results = ei.getChildRules("foo", new SchemaVersion("v10")); - assertTrue(results.size() == 2); - assertTrue(results.containsKey("baz|foo")); - assertTrue(results.containsKey("foo|quux")); - } - - @Test - public void getChildRulesNoneInVersionTest() { - Multimap<String, EdgeRule> results = ei.getChildRules("foo", new SchemaVersion("v11")); - assertTrue(results.isEmpty()); - } - - @Test - public void hasChildTest() { - assertTrue(ei.hasChildRule("foo")); - assertTrue(ei.hasChildRule("foo", new SchemaVersion("v10"))); - assertFalse(ei.hasChildRule("puppy")); - assertFalse(ei.hasChildRule("foo", new SchemaVersion("v11"))); - } - - @Test - public void getParentRulesTest() { - Multimap<String, EdgeRule> results = ei.getParentRules("parent"); - assertTrue(results.size() == 6); - assertTrue(results.containsKey("grandparent1|parent")); - assertTrue(results.containsKey("grandparent2|parent")); - assertTrue(results.containsKey("grandparent3|parent")); - assertTrue(results.containsKey("grandparent4|parent")); - assertTrue(results.containsKey("grandparent5|parent")); - assertTrue(results.containsKey("grandparent6|parent")); - } - - @Test - public void getParentRulesWithVersionTest() { - Multimap<String, EdgeRule> results = ei.getParentRules("baz", new SchemaVersion("v10")); - assertTrue(results.size() == 1); - assertTrue(results.containsKey("baz|foo")); - } - - @Test - public void getParentRulesNoneInVersionTest() { - Multimap<String, EdgeRule> results = ei.getParentRules("baz", new SchemaVersion("v11")); - assertTrue(results.isEmpty()); - } - - @Test - public void hasParentTest() { - assertTrue(ei.hasParentRule("parent")); - assertTrue(ei.hasParentRule("quux", new SchemaVersion("v10"))); - assertFalse(ei.hasParentRule("puppy")); - assertFalse(ei.hasParentRule("foo", new SchemaVersion("v11"))); - } - - @Test - public void getAllCurrentRulesTest() throws EdgeRuleNotFoundException { - Multimap<String, EdgeRule> res = ei.getAllCurrentRules(); - assertTrue(res.size() == 18); - } - - @Test - public void getAllRulesTest() throws EdgeRuleNotFoundException { - Multimap<String, EdgeRule> res = ei.getAllRules(new SchemaVersion("v10")); - assertTrue(res.size() == 4); - assertTrue(res.containsKey("bar|foo")); - assertTrue(res.get("bar|foo").size() == 2); - assertTrue(res.containsKey("baz|foo")); - assertTrue(res.containsKey("foo|quux")); - - thrown.expect(EdgeRuleNotFoundException.class); - thrown.expectMessage("No rules found for version v9."); - ei.getAllRules(new SchemaVersion("v9")); - } + @Test + public void getChildRulesTest() { + Multimap<String, EdgeRule> results = ei.getChildRules("parent"); + assertTrue(results.size() == 6); + assertTrue(results.containsKey("notation|parent")); + assertTrue(results.containsKey("not-notation|parent")); + assertTrue(results.containsKey("out-out|parent")); + assertTrue(results.containsKey("in-in|parent")); + assertTrue(results.containsKey("in-out|parent")); + assertTrue(results.containsKey("out-in|parent")); + } + + @Test + public void getChildRulesWithVersionTest() { + Multimap<String, EdgeRule> results = ei.getChildRules("foo", new SchemaVersion("v10")); + assertTrue(results.size() == 2); + assertTrue(results.containsKey("baz|foo")); + assertTrue(results.containsKey("foo|quux")); + } + + @Test + public void getChildRulesNoneInVersionTest() { + Multimap<String, EdgeRule> results = ei.getChildRules("foo", new SchemaVersion("v11")); + assertTrue(results.isEmpty()); + } + + @Test + public void hasChildTest() { + assertTrue(ei.hasChildRule("foo")); + assertTrue(ei.hasChildRule("foo", new SchemaVersion("v10"))); + assertFalse(ei.hasChildRule("puppy")); + assertFalse(ei.hasChildRule("foo", new SchemaVersion("v11"))); + } + + @Test + public void getParentRulesTest() { + Multimap<String, EdgeRule> results = ei.getParentRules("parent"); + assertTrue(results.size() == 6); + assertTrue(results.containsKey("grandparent1|parent")); + assertTrue(results.containsKey("grandparent2|parent")); + assertTrue(results.containsKey("grandparent3|parent")); + assertTrue(results.containsKey("grandparent4|parent")); + assertTrue(results.containsKey("grandparent5|parent")); + assertTrue(results.containsKey("grandparent6|parent")); + } + + @Test + public void getParentRulesWithVersionTest() { + Multimap<String, EdgeRule> results = ei.getParentRules("baz", new SchemaVersion("v10")); + assertTrue(results.size() == 1); + assertTrue(results.containsKey("baz|foo")); + } + + @Test + public void getParentRulesNoneInVersionTest() { + Multimap<String, EdgeRule> results = ei.getParentRules("baz", new SchemaVersion("v11")); + assertTrue(results.isEmpty()); + } + + @Test + public void hasParentTest() { + assertTrue(ei.hasParentRule("parent")); + assertTrue(ei.hasParentRule("quux", new SchemaVersion("v10"))); + assertFalse(ei.hasParentRule("puppy")); + assertFalse(ei.hasParentRule("foo", new SchemaVersion("v11"))); + } + + @Test + public void getAllCurrentRulesTest() throws EdgeRuleNotFoundException { + Multimap<String, EdgeRule> res = ei.getAllCurrentRules(); + assertTrue(res.size() == 18); + } + + @Test + public void getAllRulesTest() throws EdgeRuleNotFoundException { + Multimap<String, EdgeRule> res = ei.getAllRules(new SchemaVersion("v10")); + assertTrue(res.size() == 4); + assertTrue(res.containsKey("bar|foo")); + assertTrue(res.get("bar|foo").size() == 2); + assertTrue(res.containsKey("baz|foo")); + assertTrue(res.containsKey("foo|quux")); + + thrown.expect(EdgeRuleNotFoundException.class); + thrown.expectMessage("No rules found for version v9."); + ei.getAllRules(new SchemaVersion("v9")); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorWiringTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorWiringTest.java index cf23a702..cae3bf78 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorWiringTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorWiringTest.java @@ -42,16 +42,16 @@ import com.google.common.collect.Multimap; @TestPropertySource(properties = {"schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties"}) @SpringBootTest public class EdgeIngestorWiringTest { - @Autowired - EdgeIngestor ei; - - @Test - public void test() throws EdgeRuleNotFoundException { - assertNotNull(ei); - EdgeRuleQuery q = new EdgeRuleQuery.Builder("quux", "foo").label("dancesWith").version(new SchemaVersion("v10")).build(); - Multimap<String, EdgeRule> results = ei.getRules(q); - assertTrue(results.size() == 1); - assertTrue(results.containsKey("foo|quux")); - } + @Autowired + EdgeIngestor ei; + + @Test + public void test() throws EdgeRuleNotFoundException { + assertNotNull(ei); + EdgeRuleQuery q = new EdgeRuleQuery.Builder("quux", "foo").label("dancesWith").version(new SchemaVersion("v10")).build(); + Multimap<String, EdgeRule> results = ei.getRules(q); + assertTrue(results.size() == 1); + assertTrue(results.containsKey("foo|quux")); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeRuleQueryTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeRuleQueryTest.java index da875ffe..856ebb70 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeRuleQueryTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeRuleQueryTest.java @@ -34,100 +34,100 @@ import com.jayway.jsonpath.DocumentContext; import com.jayway.jsonpath.JsonPath; public class EdgeRuleQueryTest { - private DocumentContext testRules; - private String readStart = "$.rules.[?]"; - - /* **** DATA SETUP **** */ - @Before - public void setup() { - InputStream is = getClass().getResourceAsStream("/edgeRules/test.json"); + private DocumentContext testRules; + private String readStart = "$.rules.[?]"; + + /* **** DATA SETUP **** */ + @Before + public void setup() { + InputStream is = getClass().getResourceAsStream("/edgeRules/test.json"); - Scanner scanner = new Scanner(is); - String json = scanner.useDelimiter("\\Z").next(); - scanner.close(); - - this.testRules = JsonPath.parse(json); - } + Scanner scanner = new Scanner(is); + String json = scanner.useDelimiter("\\Z").next(); + scanner.close(); + + this.testRules = JsonPath.parse(json); + } - /* **** TESTS **** */ - @Test - public void testFromToSingle() { - //rule defined from quux to foo - EdgeRuleQuery q = new EdgeRuleQuery.Builder("quux", "foo").build(); - List<Object> results = testRules.read(readStart, q.getFilter()); - - assertTrue(results.size() == 1); - } + /* **** TESTS **** */ + @Test + public void testFromToSingle() { + //rule defined from quux to foo + EdgeRuleQuery q = new EdgeRuleQuery.Builder("quux", "foo").build(); + List<Object> results = testRules.read(readStart, q.getFilter()); + + assertTrue(results.size() == 1); + } - @Test - public void testToFromSingle() { - //rule defined from quux to foo, this is flipped - EdgeRuleQuery q = new EdgeRuleQuery.Builder("foo", "quux").build(); - List<Object> results = testRules.read(readStart, q.getFilter()); - - assertTrue(results.size() == 1); - } - - @Test - public void testFromToMultiple() { - //rules have two from foo to bar - EdgeRuleQuery q = new EdgeRuleQuery.Builder("foo", "bar").build(); - List<Object> results = testRules.read(readStart, q.getFilter()); - assertTrue(results.size() == 2); - } - - @Test - public void testToFromMultiple() { - //rules have two from foo to bar - EdgeRuleQuery q = new EdgeRuleQuery.Builder("bar", "foo").build(); - List<Object> results = testRules.read(readStart, q.getFilter()); - - assertTrue(results.size() == 2); - assertTrue(!(results.get(0).toString().equals(results.get(1).toString()))); - } - - @Test - public void testJustFrom() { - //there are 4 foo rules (foo>bar, foo>bar, foo>baz, quux>foo) - EdgeRuleQuery q = new EdgeRuleQuery.Builder("foo").build(); - List<Object> results = testRules.read(readStart, q.getFilter()); - assertTrue(results.size() == 4); - - //there are 2 bar rules - EdgeRuleQuery q2 = new EdgeRuleQuery.Builder("bar").build(); - List<Object> results2 = testRules.read(readStart, q2.getFilter()); - assertTrue(results2.size() == 2); - } - - @Test - public void testWithLabel() { - //there are foo >eats> bar and foo >eatz> bar - EdgeRuleQuery q = new EdgeRuleQuery.Builder("foo","bar").label("eatz").build(); - List<Object> results = testRules.read(readStart, q.getFilter()); - assertTrue(results.size() == 1); - assertTrue(results.get(0).toString().contains("eatz")); - } - - @Test - public void testCousin() { - EdgeRuleQuery q = new EdgeRuleQuery.Builder("foo").edgeType(EdgeType.COUSIN).build(); - List<Object> results = testRules.read(readStart, q.getFilter()); - assertTrue(results.size() == 2); - - EdgeRuleQuery q2 = new EdgeRuleQuery.Builder("foo", "bar").edgeType(EdgeType.COUSIN).label("eats").build(); - List<Object> results2 = testRules.read(readStart, q2.getFilter()); - assertTrue(results2.size() == 1); - assertTrue(results2.get(0).toString().contains("eats")); - - EdgeRuleQuery q3 = new EdgeRuleQuery.Builder("foo","quux").edgeType(EdgeType.COUSIN).build(); - List<Object> results3 = testRules.read(readStart, q3.getFilter()); - assertTrue(results3.isEmpty()); - } - - @Test - public void testTree() { - EdgeRuleQuery q = new EdgeRuleQuery.Builder("foo").edgeType(EdgeType.TREE).build(); - List<Object> results = testRules.read(readStart, q.getFilter()); - assertTrue(results.size() == 2); - } + @Test + public void testToFromSingle() { + //rule defined from quux to foo, this is flipped + EdgeRuleQuery q = new EdgeRuleQuery.Builder("foo", "quux").build(); + List<Object> results = testRules.read(readStart, q.getFilter()); + + assertTrue(results.size() == 1); + } + + @Test + public void testFromToMultiple() { + //rules have two from foo to bar + EdgeRuleQuery q = new EdgeRuleQuery.Builder("foo", "bar").build(); + List<Object> results = testRules.read(readStart, q.getFilter()); + assertTrue(results.size() == 2); + } + + @Test + public void testToFromMultiple() { + //rules have two from foo to bar + EdgeRuleQuery q = new EdgeRuleQuery.Builder("bar", "foo").build(); + List<Object> results = testRules.read(readStart, q.getFilter()); + + assertTrue(results.size() == 2); + assertTrue(!(results.get(0).toString().equals(results.get(1).toString()))); + } + + @Test + public void testJustFrom() { + //there are 4 foo rules (foo>bar, foo>bar, foo>baz, quux>foo) + EdgeRuleQuery q = new EdgeRuleQuery.Builder("foo").build(); + List<Object> results = testRules.read(readStart, q.getFilter()); + assertTrue(results.size() == 4); + + //there are 2 bar rules + EdgeRuleQuery q2 = new EdgeRuleQuery.Builder("bar").build(); + List<Object> results2 = testRules.read(readStart, q2.getFilter()); + assertTrue(results2.size() == 2); + } + + @Test + public void testWithLabel() { + //there are foo >eats> bar and foo >eatz> bar + EdgeRuleQuery q = new EdgeRuleQuery.Builder("foo","bar").label("eatz").build(); + List<Object> results = testRules.read(readStart, q.getFilter()); + assertTrue(results.size() == 1); + assertTrue(results.get(0).toString().contains("eatz")); + } + + @Test + public void testCousin() { + EdgeRuleQuery q = new EdgeRuleQuery.Builder("foo").edgeType(EdgeType.COUSIN).build(); + List<Object> results = testRules.read(readStart, q.getFilter()); + assertTrue(results.size() == 2); + + EdgeRuleQuery q2 = new EdgeRuleQuery.Builder("foo", "bar").edgeType(EdgeType.COUSIN).label("eats").build(); + List<Object> results2 = testRules.read(readStart, q2.getFilter()); + assertTrue(results2.size() == 1); + assertTrue(results2.get(0).toString().contains("eats")); + + EdgeRuleQuery q3 = new EdgeRuleQuery.Builder("foo","quux").edgeType(EdgeType.COUSIN).build(); + List<Object> results3 = testRules.read(readStart, q3.getFilter()); + assertTrue(results3.isEmpty()); + } + + @Test + public void testTree() { + EdgeRuleQuery q = new EdgeRuleQuery.Builder("foo").edgeType(EdgeType.TREE).build(); + List<Object> results = testRules.read(readStart, q.getFilter()); + assertTrue(results.size() == 2); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeRuleTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeRuleTest.java index 4be987e7..5abae6b7 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeRuleTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeRuleTest.java @@ -29,31 +29,31 @@ import org.junit.Test; public class EdgeRuleTest { - @Test - public void testFlipDirection() { - Map<String, String> rule = new HashMap<>(); - rule.put("from", "foo"); - rule.put("to", "bar"); - rule.put("label", "links"); - rule.put("contains-other-v", "NONE"); - rule.put("delete-other-v", "NONE"); - rule.put("prevent-delete", "NONE"); - rule.put("multiplicity", "ONE2ONE"); - rule.put("direction", "OUT"); - rule.put("default", "true"); - rule.put("private", "true"); + @Test + public void testFlipDirection() { + Map<String, String> rule = new HashMap<>(); + rule.put("from", "foo"); + rule.put("to", "bar"); + rule.put("label", "links"); + rule.put("contains-other-v", "NONE"); + rule.put("delete-other-v", "NONE"); + rule.put("prevent-delete", "NONE"); + rule.put("multiplicity", "ONE2ONE"); + rule.put("direction", "OUT"); + rule.put("default", "true"); + rule.put("private", "true"); - EdgeRule r = new EdgeRule(rule); - - r.flipDirection(); - assertTrue(Direction.IN.equals(r.getDirection())); - r.flipDirection(); - assertTrue(Direction.OUT.equals(r.getDirection())); - - rule.put("direction", "BOTH"); - EdgeRule r2 = new EdgeRule(rule); - r2.flipDirection(); - assertTrue(Direction.BOTH.equals(r2.getDirection())); - } + EdgeRule r = new EdgeRule(rule); + + r.flipDirection(); + assertTrue(Direction.IN.equals(r.getDirection())); + r.flipDirection(); + assertTrue(Direction.OUT.equals(r.getDirection())); + + rule.put("direction", "BOTH"); + EdgeRule r2 = new EdgeRule(rule); + r2.flipDirection(); + assertTrue(Direction.BOTH.equals(r2.getDirection())); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/edges/JsonIngestorTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/edges/JsonIngestorTest.java index 188848b7..b718c0fd 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/edges/JsonIngestorTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/edges/JsonIngestorTest.java @@ -34,41 +34,41 @@ import static com.jayway.jsonpath.Filter.filter; public class JsonIngestorTest { - private SchemaVersion LATEST = new SchemaVersion("v14"); - private SchemaVersion V10 = new SchemaVersion("v10"); - private SchemaVersion V11 = new SchemaVersion("v11"); + private SchemaVersion LATEST = new SchemaVersion("v14"); + private SchemaVersion V10 = new SchemaVersion("v10"); + private SchemaVersion V11 = new SchemaVersion("v11"); - @Test - public void test() { - //setup - List<String> files = new ArrayList<>(); - files.add("src/test/resources/edgeRules/test.json"); - files.add("src/test/resources/edgeRules/test2.json"); - files.add("src/test/resources/edgeRules/otherTestRules.json"); - Map<SchemaVersion, List<String>> input = new TreeMap<>(); - input.put(LATEST, files); - - List<String> files2 = new ArrayList<>(); - files2.add("src/test/resources/edgeRules/test.json"); - input.put(V10, files2); - - List<String> files3 = new ArrayList<>(); - files3.add("src/test/resources/edgeRules/test3.json"); - files3.add("src/test/resources/edgeRules/defaultEdgesTest.json"); - input.put(V11, files3); - - //test - JsonIngestor ji = new JsonIngestor(); - Map<SchemaVersion, List<DocumentContext>> results = ji.ingest(input); - - assertTrue(results.entrySet().size() == 3); - assertTrue(results.get(LATEST).size() == 3); - assertTrue(results.get(V11).size() == 2); - assertTrue(results.get(V10).size() == 1); - - Filter f = filter(where("from").is("foo").and("contains-other-v").is("NONE")); - List<Map<String, String>> filterRes = results.get(V10).get(0).read("$.rules.[?]",f); - assertTrue(filterRes.size() == 2); - } + @Test + public void test() { + //setup + List<String> files = new ArrayList<>(); + files.add("src/test/resources/edgeRules/test.json"); + files.add("src/test/resources/edgeRules/test2.json"); + files.add("src/test/resources/edgeRules/otherTestRules.json"); + Map<SchemaVersion, List<String>> input = new TreeMap<>(); + input.put(LATEST, files); + + List<String> files2 = new ArrayList<>(); + files2.add("src/test/resources/edgeRules/test.json"); + input.put(V10, files2); + + List<String> files3 = new ArrayList<>(); + files3.add("src/test/resources/edgeRules/test3.json"); + files3.add("src/test/resources/edgeRules/defaultEdgesTest.json"); + input.put(V11, files3); + + //test + JsonIngestor ji = new JsonIngestor(); + Map<SchemaVersion, List<DocumentContext>> results = ji.ingest(input); + + assertTrue(results.entrySet().size() == 3); + assertTrue(results.get(LATEST).size() == 3); + assertTrue(results.get(V11).size() == 2); + assertTrue(results.get(V10).size() == 1); + + Filter f = filter(where("from").is("foo").and("contains-other-v").is("NONE")); + List<Map<String, String>> filterRes = results.get(V10).get(0).read("$.rules.[?]",f); + assertTrue(filterRes.size() == 2); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/edges/TypeAlphabetizerTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/edges/TypeAlphabetizerTest.java index dd5da519..4e3d61dd 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/edges/TypeAlphabetizerTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/edges/TypeAlphabetizerTest.java @@ -26,15 +26,15 @@ import org.junit.Test; public class TypeAlphabetizerTest { - @Test - public void test() { - TypeAlphabetizer alpher = new TypeAlphabetizer(); - assertTrue("aaa|bbb".equals(alpher.buildAlphabetizedKey("aaa", "bbb"))); - assertTrue("l-interface|logical-link".equals(alpher.buildAlphabetizedKey("l-interface", "logical-link"))); - assertTrue("l-interface|logical-link".equals(alpher.buildAlphabetizedKey("logical-link", "l-interface"))); - assertTrue("|foo".equals(alpher.buildAlphabetizedKey(null, "foo"))); - assertTrue("|foo".equals(alpher.buildAlphabetizedKey("foo", null))); - assertTrue("|".equals(alpher.buildAlphabetizedKey(null, null))); - } + @Test + public void test() { + TypeAlphabetizer alpher = new TypeAlphabetizer(); + assertTrue("aaa|bbb".equals(alpher.buildAlphabetizedKey("aaa", "bbb"))); + assertTrue("l-interface|logical-link".equals(alpher.buildAlphabetizedKey("l-interface", "logical-link"))); + assertTrue("l-interface|logical-link".equals(alpher.buildAlphabetizedKey("logical-link", "l-interface"))); + assertTrue("|foo".equals(alpher.buildAlphabetizedKey(null, "foo"))); + assertTrue("|foo".equals(alpher.buildAlphabetizedKey("foo", null))); + assertTrue("|".equals(alpher.buildAlphabetizedKey(null, null))); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorTest.java index 5421aa2a..2de5847e 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorTest.java @@ -65,101 +65,101 @@ import org.springframework.boot.test.context.SpringBootTest; @TestPropertySource(properties = { "schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties" }) @SpringBootTest public class NodeIngestorTest { - @Autowired - NodeIngestor ni; - - //set thrown.expect to whatever a specific test needs - //this establishes a default of expecting no exceptions to be thrown - @Rule - public ExpectedException thrown = ExpectedException.none(); - - @Test - public void testGetContextForVersion() { - DynamicJAXBContext ctx10 = ni.getContextForVersion(new SchemaVersion("v10")); - - //should work bc Foo is valid in test_network_v10 schema - DynamicEntity foo10 = ctx10.newDynamicEntity("Foo"); + @Autowired + NodeIngestor ni; + + //set thrown.expect to whatever a specific test needs + //this establishes a default of expecting no exceptions to be thrown + @Rule + public ExpectedException thrown = ExpectedException.none(); + + @Test + public void testGetContextForVersion() { + DynamicJAXBContext ctx10 = ni.getContextForVersion(new SchemaVersion("v10")); + + //should work bc Foo is valid in test_network_v10 schema + DynamicEntity foo10 = ctx10.newDynamicEntity("Foo"); - foo10.set("fooId","bar"); - assertTrue("bar".equals(foo10.get("fooId"))); - - //should work bc Bar is valid in test_business_v10 schema - DynamicEntity bar10 = ctx10.newDynamicEntity("Bar"); - bar10.set("barId","bar2"); - assertTrue("bar2".equals(bar10.get("barId"))); - XSDOutputResolver outputResolver10 = new XSDOutputResolver(); - ctx10.generateSchema(outputResolver10); - - DynamicJAXBContext ctx11 = ni.getContextForVersion(new SchemaVersion("v11")); - - //should work bc Foo.quantity is valid in test_network_v11 schema - DynamicEntity foo11 = ctx11.newDynamicEntity("Foo"); - foo11.set("quantity","12"); - assertTrue("12".equals(foo11.get("quantity"))); - - DynamicEntity quux11 = ctx11.newDynamicEntity("Quux"); - quux11.set("qManagerName","some guy"); - assertTrue("some guy".equals(quux11.get("qManagerName"))); - XSDOutputResolver outputResolver11 = new XSDOutputResolver(); - ctx11.generateSchema(outputResolver11); + foo10.set("fooId","bar"); + assertTrue("bar".equals(foo10.get("fooId"))); + + //should work bc Bar is valid in test_business_v10 schema + DynamicEntity bar10 = ctx10.newDynamicEntity("Bar"); + bar10.set("barId","bar2"); + assertTrue("bar2".equals(bar10.get("barId"))); + XSDOutputResolver outputResolver10 = new XSDOutputResolver(); + ctx10.generateSchema(outputResolver10); + + DynamicJAXBContext ctx11 = ni.getContextForVersion(new SchemaVersion("v11")); + + //should work bc Foo.quantity is valid in test_network_v11 schema + DynamicEntity foo11 = ctx11.newDynamicEntity("Foo"); + foo11.set("quantity","12"); + assertTrue("12".equals(foo11.get("quantity"))); + + DynamicEntity quux11 = ctx11.newDynamicEntity("Quux"); + quux11.set("qManagerName","some guy"); + assertTrue("some guy".equals(quux11.get("qManagerName"))); + XSDOutputResolver outputResolver11 = new XSDOutputResolver(); + ctx11.generateSchema(outputResolver11); - - thrown.expect(IllegalArgumentException.class); - //should fail bc Quux not in v10 test schema - ctx10.newDynamicEntity("Quux"); - } - - @Test - public void testHasNodeType() { - assertTrue(ni.hasNodeType("foo", new SchemaVersion("v11"))); - assertTrue(ni.hasNodeType("quux", new SchemaVersion("v11"))); - assertFalse(ni.hasNodeType("quux", new SchemaVersion("v10"))); - } - @Test - public void testCombinedSchema() throws TransformerException, IOException { - DynamicJAXBContext ctx13 = ni.getContextForVersion(new SchemaVersion("v13")); - XSDOutputResolver outputResolver13 = new XSDOutputResolver(); - ctx13.generateSchema(outputResolver13); - ByteArrayOutputStream buffer = new ByteArrayOutputStream(); - printDocument(ni.getSchema(new SchemaVersion("v13")),buffer); - String content = new String(Files.readAllBytes(Paths.get("src/test/resources/forWiringTests/aai_oxm_v13.xml"))); - content = content.replaceAll("\\s+", ""); - String expected = buffer.toString().replaceAll("\\s+", ""); - assertThat("OXM:\n"+expected,expected, is(content)); - } + + thrown.expect(IllegalArgumentException.class); + //should fail bc Quux not in v10 test schema + ctx10.newDynamicEntity("Quux"); + } + + @Test + public void testHasNodeType() { + assertTrue(ni.hasNodeType("foo", new SchemaVersion("v11"))); + assertTrue(ni.hasNodeType("quux", new SchemaVersion("v11"))); + assertFalse(ni.hasNodeType("quux", new SchemaVersion("v10"))); + } + @Test + public void testCombinedSchema() throws TransformerException, IOException { + DynamicJAXBContext ctx13 = ni.getContextForVersion(new SchemaVersion("v13")); + XSDOutputResolver outputResolver13 = new XSDOutputResolver(); + ctx13.generateSchema(outputResolver13); + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + printDocument(ni.getSchema(new SchemaVersion("v13")),buffer); + String content = new String(Files.readAllBytes(Paths.get("src/test/resources/forWiringTests/aai_oxm_v13.xml"))); + content = content.replaceAll("\\s+", ""); + String expected = buffer.toString().replaceAll("\\s+", ""); + assertThat("OXM:\n"+expected,expected, is(content)); + } - public static void printDocument(Document doc, OutputStream out) throws IOException, TransformerException { - TransformerFactory tf = TransformerFactory.newInstance(); - Transformer transformer = tf.newTransformer(); - transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no"); - transformer.setOutputProperty(OutputKeys.METHOD, "xml"); - transformer.setOutputProperty(OutputKeys.INDENT, "yes"); - transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); - transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); + public static void printDocument(Document doc, OutputStream out) throws IOException, TransformerException { + TransformerFactory tf = TransformerFactory.newInstance(); + Transformer transformer = tf.newTransformer(); + transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no"); + transformer.setOutputProperty(OutputKeys.METHOD, "xml"); + transformer.setOutputProperty(OutputKeys.INDENT, "yes"); + transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); + transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); - transformer.transform(new DOMSource(doc), - new StreamResult(new OutputStreamWriter(out, "UTF-8"))); - } - - private class XSDOutputResolver extends SchemaOutputResolver { + transformer.transform(new DOMSource(doc), + new StreamResult(new OutputStreamWriter(out, "UTF-8"))); + } + + private class XSDOutputResolver extends SchemaOutputResolver { - @Override - public Result createOutput(String namespaceUri, String suggestedFileName) - throws IOException { - - // create new file - // create stream result - File temp = File.createTempFile("schema", ".xsd"); - StreamResult result = new StreamResult(temp); - System.out.println("Schema file: "+temp.getAbsolutePath()); - - // set system id - result.setSystemId(temp.toURI().toURL().toString()); - - // return result - return result; - } - } + @Override + public Result createOutput(String namespaceUri, String suggestedFileName) + throws IOException { + + // create new file + // create stream result + File temp = File.createTempFile("schema", ".xsd"); + StreamResult result = new StreamResult(temp); + System.out.println("Schema file: "+temp.getAbsolutePath()); + + // set system id + result.setSystemId(temp.toURI().toURL().toString()); + + // return result + return result; + } + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorWiringTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorWiringTest.java index 2749cdb7..a7987fa3 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorWiringTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorWiringTest.java @@ -41,16 +41,16 @@ import org.springframework.boot.test.context.SpringBootTest; @TestPropertySource(properties = {"schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties"}) @SpringBootTest public class NodeIngestorWiringTest { - @Autowired - NodeIngestor ni; - - @Test - public void test() { - DynamicJAXBContext ctx10 = ni.getContextForVersion(new SchemaVersion("v10")); - - //should work bc Bar is valid in test_business_v10 schema - DynamicEntity bar10 = ctx10.newDynamicEntity("Bar"); - bar10.set("barId","bar2"); - assertTrue("bar2".equals(bar10.get("barId"))); - } + @Autowired + NodeIngestor ni; + + @Test + public void test() { + DynamicJAXBContext ctx10 = ni.getContextForVersion(new SchemaVersion("v10")); + + //should work bc Bar is valid in test_business_v10 schema + DynamicEntity bar10 = ctx10.newDynamicEntity("Bar"); + bar10.set("barId","bar2"); + assertTrue("bar2".equals(bar10.get("barId"))); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/setup/ConfigTranslatorWiringTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/setup/ConfigTranslatorWiringTest.java index 543284cb..03b40db5 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/setup/ConfigTranslatorWiringTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/setup/ConfigTranslatorWiringTest.java @@ -39,21 +39,21 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @TestPropertySource(properties = {"schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties"}) @SpringBootTest public class ConfigTranslatorWiringTest { - @Autowired - ConfigTranslator ct; - - @Test - public void test() { - assertNotNull(ct); - Map<SchemaVersion, List<String>> nodes = ct.getNodeFiles(); - assertTrue(nodes.containsKey(new SchemaVersion("v10"))); - assertTrue(1 == nodes.get(new SchemaVersion("v10")).size()); - assertTrue("src/test/resources/oxm/test_business_v10.xml".equals(nodes.get(new SchemaVersion("v10")).get(0))); - - Map<SchemaVersion, List<String>> edges = ct.getEdgeFiles(); - assertTrue(edges.containsKey(new SchemaVersion("v10"))); - assertTrue(1 == edges.get(new SchemaVersion("v10")).size()); - assertTrue("src/test/resources/edgeRules/test.json".equals(edges.get(new SchemaVersion("v10")).get(0))); - } + @Autowired + ConfigTranslator ct; + + @Test + public void test() { + assertNotNull(ct); + Map<SchemaVersion, List<String>> nodes = ct.getNodeFiles(); + assertTrue(nodes.containsKey(new SchemaVersion("v10"))); + assertTrue(1 == nodes.get(new SchemaVersion("v10")).size()); + assertTrue("src/test/resources/oxm/test_business_v10.xml".equals(nodes.get(new SchemaVersion("v10")).get(0))); + + Map<SchemaVersion, List<String>> edges = ct.getEdgeFiles(); + assertTrue(edges.containsKey(new SchemaVersion("v10"))); + assertTrue(1 == edges.get(new SchemaVersion("v10")).size()); + assertTrue("src/test/resources/edgeRules/test.json".equals(edges.get(new SchemaVersion("v10")).get(0))); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanDefaultInjectionTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanDefaultInjectionTest.java index 2103ac21..b5fb0e19 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanDefaultInjectionTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanDefaultInjectionTest.java @@ -31,14 +31,14 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {SchemaLocationsBean.class}) public class SchemaLocationsBeanDefaultInjectionTest { - @Autowired - SchemaLocationsBean bean; + @Autowired + SchemaLocationsBean bean; - @Test - public void test() { - assertNotNull(bean); - assertTrue("foo".equals(bean.getSchemaConfigLocation())); - assertTrue("bar".equals(bean.getNodeDirectory())); - assertTrue("quux".equals(bean.getEdgeDirectory())); - } + @Test + public void test() { + assertNotNull(bean); + assertTrue("foo".equals(bean.getSchemaConfigLocation())); + assertTrue("bar".equals(bean.getNodeDirectory())); + assertTrue("quux".equals(bean.getEdgeDirectory())); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanEnvVarInjectionTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanEnvVarInjectionTest.java index aed9c633..6ccc418a 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanEnvVarInjectionTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanEnvVarInjectionTest.java @@ -33,14 +33,14 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @ContextConfiguration(classes = {SchemaLocationsBean.class}) @TestPropertySource(properties = {"schema.ingest.file = src/test/resources/forWiringTests/schema-ingest2.properties"}) public class SchemaLocationsBeanEnvVarInjectionTest { - @Autowired - SchemaLocationsBean bean; - - @Test - public void test() { - assertNotNull(bean); - assertTrue("testConfig.json".equals(bean.getSchemaConfigLocation())); - assertTrue("bloop/blap".equals(bean.getNodeDirectory())); - assertTrue("different".equals(bean.getEdgeDirectory())); - } + @Autowired + SchemaLocationsBean bean; + + @Test + public void test() { + assertNotNull(bean); + assertTrue("testConfig.json".equals(bean.getSchemaConfigLocation())); + assertTrue("bloop/blap".equals(bean.getNodeDirectory())); + assertTrue("different".equals(bean.getEdgeDirectory())); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterTest.java index 99f2104a..d72d3d3c 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterTest.java @@ -31,14 +31,14 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:forWiringTests/testContext.xml"}) public class SchemaLocationsBeanXMLSetterTest { - @Autowired - SchemaLocationsBean bean; + @Autowired + SchemaLocationsBean bean; - @Test - public void test() { - assertNotNull(bean); - assertTrue("fromXML".equals(bean.getSchemaConfigLocation())); - assertTrue("whatAnXML".equals(bean.getNodeDirectory())); - assertTrue("XMLwiringYAY".equals(bean.getEdgeDirectory())); - } + @Test + public void test() { + assertNotNull(bean); + assertTrue("fromXML".equals(bean.getSchemaConfigLocation())); + assertTrue("whatAnXML".equals(bean.getNodeDirectory())); + assertTrue("XMLwiringYAY".equals(bean.getEdgeDirectory())); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterWithPropFileTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterWithPropFileTest.java index 150313b3..5e49b4f0 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterWithPropFileTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterWithPropFileTest.java @@ -31,14 +31,14 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:forWiringTests/testUsingPropFileContext.xml"}) public class SchemaLocationsBeanXMLSetterWithPropFileTest { - @Autowired - SchemaLocationsBean bean; + @Autowired + SchemaLocationsBean bean; - @Test - public void test() { - assertNotNull(bean); - assertTrue("imatest".equals(bean.getSchemaConfigLocation())); - assertTrue("andIMalittleteapot".equals(bean.getNodeDirectory())); - assertTrue("meh".equals(bean.getEdgeDirectory())); - } + @Test + public void test() { + assertNotNull(bean); + assertTrue("imatest".equals(bean.getSchemaConfigLocation())); + assertTrue("andIMalittleteapot".equals(bean.getNodeDirectory())); + assertTrue("meh".equals(bean.getEdgeDirectory())); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/testutils/BadEdgeConfigForValidationTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/testutils/BadEdgeConfigForValidationTest.java index b2400aab..ff2f22f6 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/testutils/BadEdgeConfigForValidationTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/testutils/BadEdgeConfigForValidationTest.java @@ -29,29 +29,29 @@ import org.onap.aai.setup.*; */ public class BadEdgeConfigForValidationTest extends ConfigTranslator { - public static final SchemaVersion LATEST = new SchemaVersion("v14"); - - public BadEdgeConfigForValidationTest(SchemaLocationsBean bean, SchemaVersions schemaVersions) { - super(bean, schemaVersions); - } - - @Override - public Map<SchemaVersion, List<String>> getNodeFiles() { - List<String> files = new ArrayList<>(); - files.add("src/test/resources/oxm/goodConfigForValidationTest_oxm.xml"); - Map<SchemaVersion, List<String>> input = new HashMap<>(); - input.put(LATEST, files); - return input; - } - - @Override - public Map<SchemaVersion, List<String>> getEdgeFiles() { - Map<SchemaVersion, List<String>> input = new TreeMap<>(); - List<String> files = new ArrayList<>(); - files.add("src/test/resources/edgeRules/test3-butbad.json"); - input.put(LATEST, files); - return input; - } - - + public static final SchemaVersion LATEST = new SchemaVersion("v14"); + + public BadEdgeConfigForValidationTest(SchemaLocationsBean bean, SchemaVersions schemaVersions) { + super(bean, schemaVersions); + } + + @Override + public Map<SchemaVersion, List<String>> getNodeFiles() { + List<String> files = new ArrayList<>(); + files.add("src/test/resources/oxm/goodConfigForValidationTest_oxm.xml"); + Map<SchemaVersion, List<String>> input = new HashMap<>(); + input.put(LATEST, files); + return input; + } + + @Override + public Map<SchemaVersion, List<String>> getEdgeFiles() { + Map<SchemaVersion, List<String>> input = new TreeMap<>(); + List<String> files = new ArrayList<>(); + files.add("src/test/resources/edgeRules/test3-butbad.json"); + input.put(LATEST, files); + return input; + } + + } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/testutils/BadNodeConfigForValidationTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/testutils/BadNodeConfigForValidationTest.java index 9de21f31..a1a0e32a 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/testutils/BadNodeConfigForValidationTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/testutils/BadNodeConfigForValidationTest.java @@ -29,30 +29,30 @@ import org.onap.aai.setup.*; */ public class BadNodeConfigForValidationTest extends ConfigTranslator { - public static final SchemaVersion LATEST = new SchemaVersion("v14"); - - public BadNodeConfigForValidationTest(SchemaLocationsBean bean, SchemaVersions schemaVersions) { - super(bean, schemaVersions); - } - - @Override - public Map<SchemaVersion, List<String>> getNodeFiles() { - List<String> files = new ArrayList<>(); - files.add("src/test/resources/oxm/goodConfigForValidationTest_oxm.xml"); - files.add("src/test/resources/oxm/badConfigForValidationTest_oxm.xml"); - Map<SchemaVersion, List<String>> input = new TreeMap<>(); - input.put(LATEST, files); - return input; - } - - @Override - public Map<SchemaVersion, List<String>> getEdgeFiles() { - Map<SchemaVersion, List<String>> input = new TreeMap<>(); - List<String> files = new ArrayList<>(); - files.add("src/test/resources/edgeRules/test3.json"); - input.put(LATEST, files); - return input; - } - - + public static final SchemaVersion LATEST = new SchemaVersion("v14"); + + public BadNodeConfigForValidationTest(SchemaLocationsBean bean, SchemaVersions schemaVersions) { + super(bean, schemaVersions); + } + + @Override + public Map<SchemaVersion, List<String>> getNodeFiles() { + List<String> files = new ArrayList<>(); + files.add("src/test/resources/oxm/goodConfigForValidationTest_oxm.xml"); + files.add("src/test/resources/oxm/badConfigForValidationTest_oxm.xml"); + Map<SchemaVersion, List<String>> input = new TreeMap<>(); + input.put(LATEST, files); + return input; + } + + @Override + public Map<SchemaVersion, List<String>> getEdgeFiles() { + Map<SchemaVersion, List<String>> input = new TreeMap<>(); + List<String> files = new ArrayList<>(); + files.add("src/test/resources/edgeRules/test3.json"); + input.put(LATEST, files); + return input; + } + + } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/testutils/ConfigTranslatorForWiringTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/testutils/ConfigTranslatorForWiringTest.java index fc0a3984..043f80e7 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/testutils/ConfigTranslatorForWiringTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/testutils/ConfigTranslatorForWiringTest.java @@ -26,28 +26,28 @@ import org.onap.aai.setup.*; public class ConfigTranslatorForWiringTest extends ConfigTranslator { - public ConfigTranslatorForWiringTest(SchemaLocationsBean bean, SchemaVersions schemaVersions) { - super(bean, schemaVersions); - } - - @Override - public Map<SchemaVersion, List<String>> getNodeFiles() { - String f = bean.getNodeDirectory() + "test_business_v10.xml"; - List<String> files = new ArrayList<>(); - files.add(f); - Map<SchemaVersion, List<String>> mp = new TreeMap<>(); - mp.put(new SchemaVersion("v10"), files); - return mp; - } - - @Override - public Map<SchemaVersion, List<String>> getEdgeFiles() { - String f = bean.getEdgeDirectory() + "test.json"; - List<String> files = new ArrayList<>(); - files.add(f); - Map<SchemaVersion, List<String>> mp = new TreeMap<>(); - mp.put(new SchemaVersion("v10"), files); - return mp; - } + public ConfigTranslatorForWiringTest(SchemaLocationsBean bean, SchemaVersions schemaVersions) { + super(bean, schemaVersions); + } + + @Override + public Map<SchemaVersion, List<String>> getNodeFiles() { + String f = bean.getNodeDirectory() + "test_business_v10.xml"; + List<String> files = new ArrayList<>(); + files.add(f); + Map<SchemaVersion, List<String>> mp = new TreeMap<>(); + mp.put(new SchemaVersion("v10"), files); + return mp; + } + + @Override + public Map<SchemaVersion, List<String>> getEdgeFiles() { + String f = bean.getEdgeDirectory() + "test.json"; + List<String> files = new ArrayList<>(); + files.add(f); + Map<SchemaVersion, List<String>> mp = new TreeMap<>(); + mp.put(new SchemaVersion("v10"), files); + return mp; + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/testutils/GoodConfigForValidationTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/testutils/GoodConfigForValidationTest.java index dd8d5977..dbb24ec9 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/testutils/GoodConfigForValidationTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/testutils/GoodConfigForValidationTest.java @@ -32,36 +32,36 @@ import org.onap.aai.setup.SchemaVersions; */ public class GoodConfigForValidationTest extends ConfigTranslator { - private SchemaVersions schemaVersions; + private SchemaVersions schemaVersions; - public GoodConfigForValidationTest(SchemaLocationsBean bean, SchemaVersions schemaVersions) { - super(bean, schemaVersions); - this.schemaVersions = schemaVersions; - } + public GoodConfigForValidationTest(SchemaLocationsBean bean, SchemaVersions schemaVersions) { + super(bean, schemaVersions); + this.schemaVersions = schemaVersions; + } - @Override - public Map<SchemaVersion, List<String>> getNodeFiles() { - List<String> files = new ArrayList<>(); - files.add("src/test/resources/oxm/goodConfigForValidationTest_oxm.xml"); - Map<SchemaVersion, List<String>> input = new TreeMap<>(); - //input.put(SchemaVersion.getLatest(), files); - for (SchemaVersion v : schemaVersions.getVersions()) { - input.put(v, files); - } - return input; - } + @Override + public Map<SchemaVersion, List<String>> getNodeFiles() { + List<String> files = new ArrayList<>(); + files.add("src/test/resources/oxm/goodConfigForValidationTest_oxm.xml"); + Map<SchemaVersion, List<String>> input = new TreeMap<>(); + //input.put(SchemaVersion.getLatest(), files); + for (SchemaVersion v : schemaVersions.getVersions()) { + input.put(v, files); + } + return input; + } - @Override - public Map<SchemaVersion, List<String>> getEdgeFiles() { - Map<SchemaVersion, List<String>> input = new TreeMap<>(); - List<String> files = new ArrayList<>(); - files.add("src/test/resources/edgeRules/test3.json"); - //input.put(SchemaVersion.getLatest(), files); - for (SchemaVersion v : schemaVersions.getVersions()) { - input.put(v, files); - } - return input; - } + @Override + public Map<SchemaVersion, List<String>> getEdgeFiles() { + Map<SchemaVersion, List<String>> input = new TreeMap<>(); + List<String> files = new ArrayList<>(); + files.add("src/test/resources/edgeRules/test3.json"); + //input.put(SchemaVersion.getLatest(), files); + for (SchemaVersion v : schemaVersions.getVersions()) { + input.put(v, files); + } + return input; + } - + } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/testutils/SchemaIncompleteTranslator.java b/aai-schema-ingest/src/test/java/org/onap/aai/testutils/SchemaIncompleteTranslator.java index 66f2bea2..d3df9dcc 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/testutils/SchemaIncompleteTranslator.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/testutils/SchemaIncompleteTranslator.java @@ -32,51 +32,51 @@ import org.onap.aai.setup.SchemaVersion; import org.onap.aai.setup.SchemaVersions; public class SchemaIncompleteTranslator extends ConfigTranslator { - - public SchemaIncompleteTranslator(SchemaLocationsBean bean, SchemaVersions schemaVersions) { - super(bean, schemaVersions); - } + + public SchemaIncompleteTranslator(SchemaLocationsBean bean, SchemaVersions schemaVersions) { + super(bean, schemaVersions); + } - @Override - public Map<SchemaVersion, List<String>> getNodeFiles() { - List<String> files10 = new ArrayList<>(); - files10.add("src/test/resources/oxm/test_network_v10.xml"); - files10.add("src/test/resources/oxm/test_business_v10.xml"); - - List<String> files11 = new ArrayList<>(); - files11.add("src/test/resources/oxm/test_network_v11.xml"); - files11.add("src/test/resources/oxm/test_business_v11.xml"); + @Override + public Map<SchemaVersion, List<String>> getNodeFiles() { + List<String> files10 = new ArrayList<>(); + files10.add("src/test/resources/oxm/test_network_v10.xml"); + files10.add("src/test/resources/oxm/test_business_v10.xml"); + + List<String> files11 = new ArrayList<>(); + files11.add("src/test/resources/oxm/test_network_v11.xml"); + files11.add("src/test/resources/oxm/test_business_v11.xml"); - List<String> files12 = new ArrayList<>(); - files12.add("src/test/resources/oxm/business_oxm_v12.xml"); - - Map<SchemaVersion, List<String>> input = new TreeMap<>(); - - - input.put(new SchemaVersion("v10"), files10); - input.put(new SchemaVersion("v11"), files11); - input.put(new SchemaVersion("v12"), files12); - return input; - } + List<String> files12 = new ArrayList<>(); + files12.add("src/test/resources/oxm/business_oxm_v12.xml"); + + Map<SchemaVersion, List<String>> input = new TreeMap<>(); + + + input.put(new SchemaVersion("v10"), files10); + input.put(new SchemaVersion("v11"), files11); + input.put(new SchemaVersion("v12"), files12); + return input; + } - @Override - public Map<SchemaVersion, List<String>> getEdgeFiles() { - List<String> files = new ArrayList<>(); - files.add("src/test/resources/edgeRules/test.json"); - files.add("src/test/resources/edgeRules/test2.json"); - files.add("src/test/resources/edgeRules/otherTestRules.json"); - Map<SchemaVersion, List<String>> input = new TreeMap<>(); - input.put(schemaVersions.getDefaultVersion(), files); - - List<String> files2 = new ArrayList<>(); - files2.add("src/test/resources/edgeRules/test.json"); - input.put(new SchemaVersion("v10"), files2); - - List<String> files3 = new ArrayList<>(); - files3.add("src/test/resources/edgeRules/test3.json"); - files3.add("src/test/resources/edgeRules/defaultEdgesTest.json"); - input.put(new SchemaVersion("v11"), files3); - - return input; - } + @Override + public Map<SchemaVersion, List<String>> getEdgeFiles() { + List<String> files = new ArrayList<>(); + files.add("src/test/resources/edgeRules/test.json"); + files.add("src/test/resources/edgeRules/test2.json"); + files.add("src/test/resources/edgeRules/otherTestRules.json"); + Map<SchemaVersion, List<String>> input = new TreeMap<>(); + input.put(schemaVersions.getDefaultVersion(), files); + + List<String> files2 = new ArrayList<>(); + files2.add("src/test/resources/edgeRules/test.json"); + input.put(new SchemaVersion("v10"), files2); + + List<String> files3 = new ArrayList<>(); + files3.add("src/test/resources/edgeRules/test3.json"); + files3.add("src/test/resources/edgeRules/defaultEdgesTest.json"); + input.put(new SchemaVersion("v11"), files3); + + return input; + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/testutils/TestUtilConfigTranslator.java b/aai-schema-ingest/src/test/java/org/onap/aai/testutils/TestUtilConfigTranslator.java index b4756d64..bbc0c3f9 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/testutils/TestUtilConfigTranslator.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/testutils/TestUtilConfigTranslator.java @@ -26,57 +26,57 @@ import org.onap.aai.setup.*; public class TestUtilConfigTranslator extends ConfigTranslator { - public static final SchemaVersion LATEST = new SchemaVersion("v14"); - public TestUtilConfigTranslator(SchemaLocationsBean bean, SchemaVersions schemaVersions) { - super(bean, schemaVersions); - } + public static final SchemaVersion LATEST = new SchemaVersion("v14"); + public TestUtilConfigTranslator(SchemaLocationsBean bean, SchemaVersions schemaVersions) { + super(bean, schemaVersions); + } - @Override - public Map<SchemaVersion, List<String>> getNodeFiles() { - List<String> files10 = new ArrayList<>(); - files10.add("src/test/resources/oxm/test_network_v10.xml"); - files10.add("src/test/resources/oxm/test_business_v10.xml"); - - List<String> files11 = new ArrayList<>(); - files11.add("src/test/resources/oxm/test_network_v11.xml"); - files11.add("src/test/resources/oxm/test_business_v11.xml"); - - Map<SchemaVersion, List<String>> input = new TreeMap<>(); - input.put(new SchemaVersion("v10"), files10); - input.put(new SchemaVersion("v11"), files11); + @Override + public Map<SchemaVersion, List<String>> getNodeFiles() { + List<String> files10 = new ArrayList<>(); + files10.add("src/test/resources/oxm/test_network_v10.xml"); + files10.add("src/test/resources/oxm/test_business_v10.xml"); + + List<String> files11 = new ArrayList<>(); + files11.add("src/test/resources/oxm/test_network_v11.xml"); + files11.add("src/test/resources/oxm/test_business_v11.xml"); + + Map<SchemaVersion, List<String>> input = new TreeMap<>(); + input.put(new SchemaVersion("v10"), files10); + input.put(new SchemaVersion("v11"), files11); - List<String> files13 = new ArrayList<>(); - files13.add("src/test/resources/oxm/business_oxm_v13.xml"); - files13.add("src/test/resources/oxm/common_oxm_v13.xml"); - files13.add("src/test/resources/oxm/serviceDesign_oxm_v13.xml"); - files13.add("src/test/resources/oxm/network_oxm_v13.xml"); - - input.put(new SchemaVersion("v10"), files10); - input.put(new SchemaVersion("v11"), files11); - input.put(new SchemaVersion("v13"), files13); - return input; - } + List<String> files13 = new ArrayList<>(); + files13.add("src/test/resources/oxm/business_oxm_v13.xml"); + files13.add("src/test/resources/oxm/common_oxm_v13.xml"); + files13.add("src/test/resources/oxm/serviceDesign_oxm_v13.xml"); + files13.add("src/test/resources/oxm/network_oxm_v13.xml"); + + input.put(new SchemaVersion("v10"), files10); + input.put(new SchemaVersion("v11"), files11); + input.put(new SchemaVersion("v13"), files13); + return input; + } - @Override - public Map<SchemaVersion, List<String>> getEdgeFiles() { - List<String> files = new ArrayList<>(); - files.add("src/test/resources/edgeRules/test.json"); - files.add("src/test/resources/edgeRules/test2.json"); - files.add("src/test/resources/edgeRules/otherTestRules.json"); - Map<SchemaVersion, List<String>> input = new TreeMap<>(); - input.put(LATEST, files); - - List<String> files2 = new ArrayList<>(); - files2.add("src/test/resources/edgeRules/test.json"); - input.put(new SchemaVersion("v10"), files2); - - List<String> files3 = new ArrayList<>(); - files3.add("src/test/resources/edgeRules/test3.json"); - files3.add("src/test/resources/edgeRules/defaultEdgesTest.json"); - input.put(new SchemaVersion("v11"), files3); - - return input; - } + @Override + public Map<SchemaVersion, List<String>> getEdgeFiles() { + List<String> files = new ArrayList<>(); + files.add("src/test/resources/edgeRules/test.json"); + files.add("src/test/resources/edgeRules/test2.json"); + files.add("src/test/resources/edgeRules/otherTestRules.json"); + Map<SchemaVersion, List<String>> input = new TreeMap<>(); + input.put(LATEST, files); + + List<String> files2 = new ArrayList<>(); + files2.add("src/test/resources/edgeRules/test.json"); + input.put(new SchemaVersion("v10"), files2); + + List<String> files3 = new ArrayList<>(); + files3.add("src/test/resources/edgeRules/test3.json"); + files3.add("src/test/resources/edgeRules/defaultEdgesTest.json"); + input.put(new SchemaVersion("v11"), files3); + + return input; + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/testutils/TestUtilConfigTranslatorforBusiness.java b/aai-schema-ingest/src/test/java/org/onap/aai/testutils/TestUtilConfigTranslatorforBusiness.java index 2d753efb..81644de8 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/testutils/TestUtilConfigTranslatorforBusiness.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/testutils/TestUtilConfigTranslatorforBusiness.java @@ -32,49 +32,49 @@ import org.onap.aai.setup.SchemaVersion; import org.onap.aai.setup.SchemaVersions; public class TestUtilConfigTranslatorforBusiness extends ConfigTranslator { - - public TestUtilConfigTranslatorforBusiness(SchemaLocationsBean bean, SchemaVersions schemaVersions) { - super(bean, schemaVersions); - } + + public TestUtilConfigTranslatorforBusiness(SchemaLocationsBean bean, SchemaVersions schemaVersions) { + super(bean, schemaVersions); + } - @Override - public Map<SchemaVersion, List<String>> getNodeFiles() { - List<String> files10 = new ArrayList<>(); -// files10.add("src/test/resources/oxm/test_network_v10.xml"); -// files10.add("src/test/resources/oxm/test_business_v10.xml"); - - List<String> files11 = new ArrayList<>(); -// files11.add("src/test/resources/oxm/test_network_v11.xml"); - files11.add("src/test/resources/oxm/business_v11.xml"); - - List<String> files13 = new ArrayList<>(); - files13.add("src/test/resources/oxm/business_oxm_v13.xml"); - files13.add("src/test/resources/oxm/common_oxm_v13.xml"); - files13.add("src/test/resources/oxm/serviceDesign_oxm_v13.xml"); - files13.add("src/test/resources/oxm/network_oxm_v13.xml"); - - Map<SchemaVersion, List<String>> input = new TreeMap<>(); -// input.put(Version.V10, files10); - input.put(new SchemaVersion("v11"), files11); - input.put(schemaVersions.getDefaultVersion(), files13); - return input; - } + @Override + public Map<SchemaVersion, List<String>> getNodeFiles() { + List<String> files10 = new ArrayList<>(); +// files10.add("src/test/resources/oxm/test_network_v10.xml"); +// files10.add("src/test/resources/oxm/test_business_v10.xml"); + + List<String> files11 = new ArrayList<>(); +// files11.add("src/test/resources/oxm/test_network_v11.xml"); + files11.add("src/test/resources/oxm/business_v11.xml"); + + List<String> files13 = new ArrayList<>(); + files13.add("src/test/resources/oxm/business_oxm_v13.xml"); + files13.add("src/test/resources/oxm/common_oxm_v13.xml"); + files13.add("src/test/resources/oxm/serviceDesign_oxm_v13.xml"); + files13.add("src/test/resources/oxm/network_oxm_v13.xml"); + + Map<SchemaVersion, List<String>> input = new TreeMap<>(); +// input.put(Version.V10, files10); + input.put(new SchemaVersion("v11"), files11); + input.put(schemaVersions.getDefaultVersion(), files13); + return input; + } - @Override - public Map<SchemaVersion, List<String>> getEdgeFiles() { - List<String> files = new ArrayList<>(); - files.add("src/test/resources/dbedgerules/DbEdgeBusinessRules_test.json"); - Map<SchemaVersion, List<String>> input = new TreeMap<>(); - input.put(schemaVersions.getDefaultVersion(), files); - - List<String> files2 = new ArrayList<>(); - files2.add("src/test/resources/dbedgerules/test.json"); -// input.put(Version.V10, files2); - - List<String> files3 = new ArrayList<>(); - files3.add("src/test/resources/dbedgerules/DbEdgeBusinessRules_test.json"); - input.put(new SchemaVersion("v11"), files3); - - return input; - } + @Override + public Map<SchemaVersion, List<String>> getEdgeFiles() { + List<String> files = new ArrayList<>(); + files.add("src/test/resources/dbedgerules/DbEdgeBusinessRules_test.json"); + Map<SchemaVersion, List<String>> input = new TreeMap<>(); + input.put(schemaVersions.getDefaultVersion(), files); + + List<String> files2 = new ArrayList<>(); + files2.add("src/test/resources/dbedgerules/test.json"); +// input.put(Version.V10, files2); + + List<String> files3 = new ArrayList<>(); + files3.add("src/test/resources/dbedgerules/DbEdgeBusinessRules_test.json"); + input.put(new SchemaVersion("v11"), files3); + + return input; + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/CheckEverythingStrategyTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/CheckEverythingStrategyTest.java index 49bb5986..f43ea7dc 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/CheckEverythingStrategyTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/CheckEverythingStrategyTest.java @@ -27,29 +27,29 @@ import org.onap.aai.validation.CheckEverythingStrategy; public class CheckEverythingStrategyTest { - @Test - public void test() { - CheckEverythingStrategy strat = new CheckEverythingStrategy(); - //no issues so nothing notified, should be fine - assertTrue(strat.isOK()); - assertTrue("No errors found.".equals(strat.getErrorMsg())); - - //simulate post one error - String testError1 = "oh noes a problem with the gooble-gobble edge rule!"; - strat.notifyOnError(testError1); - assertFalse(strat.isOK()); - assertTrue(testError1.equals(strat.getErrorMsg())); - - //simulate multiple found - String testError2 = "error 2"; - String testError3 = "duplicate labels not everything is a fork"; - strat.notifyOnError(testError2); - strat.notifyOnError(testError3); - assertFalse(strat.isOK()); - System.out.println(strat.getErrorMsg()); - assertTrue(strat.getErrorMsg().contains(testError1)); - assertTrue(strat.getErrorMsg().contains(testError2)); - assertTrue(strat.getErrorMsg().contains(testError3)); - } + @Test + public void test() { + CheckEverythingStrategy strat = new CheckEverythingStrategy(); + //no issues so nothing notified, should be fine + assertTrue(strat.isOK()); + assertTrue("No errors found.".equals(strat.getErrorMsg())); + + //simulate post one error + String testError1 = "oh noes a problem with the gooble-gobble edge rule!"; + strat.notifyOnError(testError1); + assertFalse(strat.isOK()); + assertTrue(testError1.equals(strat.getErrorMsg())); + + //simulate multiple found + String testError2 = "error 2"; + String testError3 = "duplicate labels not everything is a fork"; + strat.notifyOnError(testError2); + strat.notifyOnError(testError3); + assertFalse(strat.isOK()); + System.out.println(strat.getErrorMsg()); + assertTrue(strat.getErrorMsg().contains(testError1)); + assertTrue(strat.getErrorMsg().contains(testError2)); + assertTrue(strat.getErrorMsg().contains(testError3)); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/FailFastStrategyTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/FailFastStrategyTest.java index b70d13d6..0d9ded01 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/FailFastStrategyTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/FailFastStrategyTest.java @@ -29,22 +29,22 @@ import org.onap.aai.validation.AAISchemaValidationException; import org.onap.aai.validation.FailFastStrategy; public class FailFastStrategyTest { - @Rule - public ExpectedException thrown = ExpectedException.none(); - - @Test - public void test() { - FailFastStrategy strat = new FailFastStrategy(); - - //simulate no issues found - assertTrue(strat.isOK()); - assertTrue("No errors found.".equals(strat.getErrorMsg())); - - //simulate an issue found - String testError = "hi i'm a problem"; - thrown.expect(AAISchemaValidationException.class); - thrown.expectMessage(testError); - strat.notifyOnError(testError); - } + @Rule + public ExpectedException thrown = ExpectedException.none(); + + @Test + public void test() { + FailFastStrategy strat = new FailFastStrategy(); + + //simulate no issues found + assertTrue(strat.isOK()); + assertTrue("No errors found.".equals(strat.getErrorMsg())); + + //simulate an issue found + String testError = "hi i'm a problem"; + thrown.expect(AAISchemaValidationException.class); + thrown.expectMessage(testError); + strat.notifyOnError(testError); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorRainyDayTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorRainyDayTest.java index 8c0ac82c..15396135 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorRainyDayTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorRainyDayTest.java @@ -37,18 +37,18 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {SchemaLocationsBean.class, SchemaVersions.class, BadNodeConfigForValidationTest.class, NodeIngestor.class, - CheckEverythingStrategy.class, DefaultVersionValidationModule.class, VersionValidator.class}) + CheckEverythingStrategy.class, DefaultVersionValidationModule.class, VersionValidator.class}) @TestPropertySource(properties = { "schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties" }) @SpringBootTest public class VersionValidatorRainyDayTest { - @Autowired - VersionValidator validator; + @Autowired + VersionValidator validator; - @Test - public void test() { - assertFalse(validator.validate()); - assertTrue(validator.getErrorMsg().contains(new SchemaVersion("v12").toString())); - assertTrue(validator.getErrorMsg().contains(new SchemaVersion("v11").toString())); - } + @Test + public void test() { + assertFalse(validator.validate()); + assertTrue(validator.getErrorMsg().contains(new SchemaVersion("v12").toString())); + assertTrue(validator.getErrorMsg().contains(new SchemaVersion("v11").toString())); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorSunnyDayTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorSunnyDayTest.java index ff944aad..3c67c0d1 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorSunnyDayTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorSunnyDayTest.java @@ -36,23 +36,23 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = { - SchemaLocationsBean.class, - SchemaVersions.class, - GoodConfigForValidationTest.class, - NodeIngestor.class, - CheckEverythingStrategy.class, - DefaultVersionValidationModule.class, - VersionValidator.class + SchemaLocationsBean.class, + SchemaVersions.class, + GoodConfigForValidationTest.class, + NodeIngestor.class, + CheckEverythingStrategy.class, + DefaultVersionValidationModule.class, + VersionValidator.class }) @TestPropertySource(properties = { "schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties" }) @SpringBootTest public class VersionValidatorSunnyDayTest { - @Autowired - VersionValidator validator; + @Autowired + VersionValidator validator; - @Test - public void test() { - assertTrue(validator.validate()); - } + @Test + public void test() { + assertTrue(validator.validate()); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/CousinDefaultingValidationModuleTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/CousinDefaultingValidationModuleTest.java index a4613813..75ab0d52 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/CousinDefaultingValidationModuleTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/CousinDefaultingValidationModuleTest.java @@ -35,45 +35,45 @@ import org.onap.aai.setup.SchemaVersion; import com.jayway.jsonpath.DocumentContext; public class CousinDefaultingValidationModuleTest { - private static List<DocumentContext> ctxs; - private static CousinDefaultingValidationModule validator; + private static List<DocumentContext> ctxs; + private static CousinDefaultingValidationModule validator; - @BeforeClass - public static void setUpBeforeClass() { - Map<SchemaVersion, List<String>> testRules = new HashMap<>(); - List<String> testFiles = new ArrayList<>(); - testFiles.add("src/test/resources/edgeRules/cousinDefaultValidationTest.json"); + @BeforeClass + public static void setUpBeforeClass() { + Map<SchemaVersion, List<String>> testRules = new HashMap<>(); + List<String> testFiles = new ArrayList<>(); + testFiles.add("src/test/resources/edgeRules/cousinDefaultValidationTest.json"); - SchemaVersion LATEST_VERSION = new SchemaVersion("v14"); - testRules.put(LATEST_VERSION, testFiles); - - JsonIngestor ji = new JsonIngestor(); - ctxs = ji.ingest(testRules).get(LATEST_VERSION); - validator = new CousinDefaultingValidationModule(); - } - - @Test - public void testValidCousins() { - assertTrue("".equals(validator.validate("boop|beep", ctxs))); - } + SchemaVersion LATEST_VERSION = new SchemaVersion("v14"); + testRules.put(LATEST_VERSION, testFiles); + + JsonIngestor ji = new JsonIngestor(); + ctxs = ji.ingest(testRules).get(LATEST_VERSION); + validator = new CousinDefaultingValidationModule(); + } + + @Test + public void testValidCousins() { + assertTrue("".equals(validator.validate("boop|beep", ctxs))); + } - @Test - public void testValidBoth() { - assertTrue("".equals(validator.validate("monster|human", ctxs))); - } + @Test + public void testValidBoth() { + assertTrue("".equals(validator.validate("monster|human", ctxs))); + } - @Test - public void testValidSingleContains() { - assertTrue("".equals(validator.validate("family|baby", ctxs))); - } - - @Test - public void testInvalidTooManyDefaults() { - assertTrue(validator.validate("sheep|wool", ctxs).contains("Multiple set")); - } - - @Test - public void testInvalidNoDefaults() { - assertTrue(validator.validate("cloth|thread", ctxs).contains("None set")); - } + @Test + public void testValidSingleContains() { + assertTrue("".equals(validator.validate("family|baby", ctxs))); + } + + @Test + public void testInvalidTooManyDefaults() { + assertTrue(validator.validate("sheep|wool", ctxs).contains("Multiple set")); + } + + @Test + public void testInvalidNoDefaults() { + assertTrue(validator.validate("cloth|thread", ctxs).contains("None set")); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/DefaultEdgeFieldsValidationModuleTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/DefaultEdgeFieldsValidationModuleTest.java index a1b5fa43..a38632b3 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/DefaultEdgeFieldsValidationModuleTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/DefaultEdgeFieldsValidationModuleTest.java @@ -39,25 +39,25 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @ContextConfiguration(classes = {DefaultEdgeFieldsValidationModule.class}) @SpringBootTest public class DefaultEdgeFieldsValidationModuleTest { - @Autowired - EdgeFieldsValidationModule validator; - - @Test - public void test() { - Map<String, String> test = new HashMap<>(); - for (EdgeField f : EdgeField.values()) { - test.put(f.toString(), "test"); - } - assertTrue("".equals(validator.verifyFields(test))); - - test.remove(EdgeField.DESCRIPTION.toString()); - assertTrue("".equals(validator.verifyFields(test))); //bc description is optional - - test.remove(EdgeField.CONTAINS.toString()); - assertTrue(validator.verifyFields(test).contains("missing required fields: contains-other-v")); - - test.remove(EdgeField.FROM.toString()); - assertTrue(validator.verifyFields(test).contains("missing required fields: from contains-other-v")); - } + @Autowired + EdgeFieldsValidationModule validator; + + @Test + public void test() { + Map<String, String> test = new HashMap<>(); + for (EdgeField f : EdgeField.values()) { + test.put(f.toString(), "test"); + } + assertTrue("".equals(validator.verifyFields(test))); + + test.remove(EdgeField.DESCRIPTION.toString()); + assertTrue("".equals(validator.verifyFields(test))); //bc description is optional + + test.remove(EdgeField.CONTAINS.toString()); + assertTrue(validator.verifyFields(test).contains("missing required fields: contains-other-v")); + + test.remove(EdgeField.FROM.toString()); + assertTrue(validator.verifyFields(test).contains("missing required fields: from contains-other-v")); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorRainyDayTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorRainyDayTest.java index 2a49e45a..8bd66565 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorRainyDayTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorRainyDayTest.java @@ -43,22 +43,22 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {SchemaLocationsBean.class, SchemaVersions.class, BadEdgeConfigForValidationTest.class, NodeIngestor.class, - CheckEverythingStrategy.class, DefaultEdgeFieldsValidationModule.class, UniqueLabelValidationModule.class, - SingleContainmentValidationModule.class, CousinDefaultingValidationModule.class, NodeTypesValidationModule.class, - EdgeRuleValidator.class}) + CheckEverythingStrategy.class, DefaultEdgeFieldsValidationModule.class, UniqueLabelValidationModule.class, + SingleContainmentValidationModule.class, CousinDefaultingValidationModule.class, NodeTypesValidationModule.class, + EdgeRuleValidator.class}) @TestPropertySource(properties = { "schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties" }) @SpringBootTest public class EdgeRuleValidatorRainyDayTest { - @Autowired - EdgeRuleValidator validator; + @Autowired + EdgeRuleValidator validator; - @Test - public void test() { - assertNotNull(validator); //verify spring wiring OK - assertFalse(validator.validate()); - String errors = validator.getErrorMsg(); - assertTrue(errors.contains("missing required fields: delete-other-v")); - assertTrue(errors.contains("has multiple rules using the same label: org.onap.relationships.inventory.Source")); - assertTrue(errors.contains("Invalid node type(s) found: gooble")); - } + @Test + public void test() { + assertNotNull(validator); //verify spring wiring OK + assertFalse(validator.validate()); + String errors = validator.getErrorMsg(); + assertTrue(errors.contains("missing required fields: delete-other-v")); + assertTrue(errors.contains("has multiple rules using the same label: org.onap.relationships.inventory.Source")); + assertTrue(errors.contains("Invalid node type(s) found: gooble")); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorSunnyDayTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorSunnyDayTest.java index af782ccf..a918356c 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorSunnyDayTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorSunnyDayTest.java @@ -43,19 +43,19 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {SchemaLocationsBean.class, SchemaVersions.class, GoodConfigForValidationTest.class, NodeIngestor.class, - CheckEverythingStrategy.class, DefaultEdgeFieldsValidationModule.class, UniqueLabelValidationModule.class, - SingleContainmentValidationModule.class, CousinDefaultingValidationModule.class, NodeTypesValidationModule.class, - EdgeRuleValidator.class}) + CheckEverythingStrategy.class, DefaultEdgeFieldsValidationModule.class, UniqueLabelValidationModule.class, + SingleContainmentValidationModule.class, CousinDefaultingValidationModule.class, NodeTypesValidationModule.class, + EdgeRuleValidator.class}) @TestPropertySource(properties = { "schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties" }) @SpringBootTest public class EdgeRuleValidatorSunnyDayTest { - @Autowired - EdgeRuleValidator validator; + @Autowired + EdgeRuleValidator validator; - @Test - public void test() { - assertNotNull(validator); //verify spring wiring OK - assertTrue(validator.validate()); - assertTrue("No errors found.".equals(validator.getErrorMsg())); - } + @Test + public void test() { + assertNotNull(validator); //verify spring wiring OK + assertTrue(validator.validate()); + assertTrue("No errors found.".equals(validator.getErrorMsg())); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/NodeTypesValidationModuleTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/NodeTypesValidationModuleTest.java index e3efc23c..245e0600 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/NodeTypesValidationModuleTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/NodeTypesValidationModuleTest.java @@ -43,25 +43,25 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @TestPropertySource(properties = { "schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties" }) @SpringBootTest public class NodeTypesValidationModuleTest { - @Autowired - NodeTypesValidationModule validator; + @Autowired + NodeTypesValidationModule validator; - @Test - public void test() { - List<String> testPairs = new ArrayList<>(); - testPairs.add("bar|foo"); - testPairs.add("foo|foo"); - testPairs.add("foo|quux"); - assertTrue("".equals(validator.validate(testPairs, new SchemaVersion("v11")))); - assertTrue(validator.validate(testPairs, new SchemaVersion("v10")).contains("Invalid node type(s) found: quux")); //bc no quux in v10 - } + @Test + public void test() { + List<String> testPairs = new ArrayList<>(); + testPairs.add("bar|foo"); + testPairs.add("foo|foo"); + testPairs.add("foo|quux"); + assertTrue("".equals(validator.validate(testPairs, new SchemaVersion("v11")))); + assertTrue(validator.validate(testPairs, new SchemaVersion("v10")).contains("Invalid node type(s) found: quux")); //bc no quux in v10 + } - @Test - public void testWeirdCases() { - List<String> testPairs = new ArrayList<>(); - testPairs.add("bar|"); - testPairs.add("|foo"); - testPairs.add("|"); - assertTrue("".equals(validator.validate(testPairs, new SchemaVersion("v11")))); //bc empty just ignored - } + @Test + public void testWeirdCases() { + List<String> testPairs = new ArrayList<>(); + testPairs.add("bar|"); + testPairs.add("|foo"); + testPairs.add("|"); + assertTrue("".equals(validator.validate(testPairs, new SchemaVersion("v11")))); //bc empty just ignored + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/SingleContainmentValidationModuleTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/SingleContainmentValidationModuleTest.java index ae7c23d7..7acb558a 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/SingleContainmentValidationModuleTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/SingleContainmentValidationModuleTest.java @@ -32,34 +32,34 @@ import org.onap.aai.setup.SchemaVersion; import com.jayway.jsonpath.DocumentContext; public class SingleContainmentValidationModuleTest { - private static List<DocumentContext> ctxs; - private static SingleContainmentValidationModule validator; - public static final SchemaVersion LATEST = new SchemaVersion("v14"); + private static List<DocumentContext> ctxs; + private static SingleContainmentValidationModule validator; + public static final SchemaVersion LATEST = new SchemaVersion("v14"); - @BeforeClass - public static void setUpBeforeClass() { - Map<SchemaVersion, List<String>> testRules = new TreeMap<>(); - List<String> testFiles = new ArrayList<>(); - testFiles.add("src/test/resources/edgeRules/containsValidationTest.json"); - testRules.put(LATEST, testFiles); - - JsonIngestor ji = new JsonIngestor(); - ctxs = ji.ingest(testRules).get(LATEST); - validator = new SingleContainmentValidationModule(); - } + @BeforeClass + public static void setUpBeforeClass() { + Map<SchemaVersion, List<String>> testRules = new TreeMap<>(); + List<String> testFiles = new ArrayList<>(); + testFiles.add("src/test/resources/edgeRules/containsValidationTest.json"); + testRules.put(LATEST, testFiles); + + JsonIngestor ji = new JsonIngestor(); + ctxs = ji.ingest(testRules).get(LATEST); + validator = new SingleContainmentValidationModule(); + } - @Test - public void testValid() { - assertTrue("".equals(validator.validate("human|monster", ctxs))); - } + @Test + public void testValid() { + assertTrue("".equals(validator.validate("human|monster", ctxs))); + } - @Test - public void testValidWithNone() { - assertTrue("".equals(validator.validate("bread|cheese", ctxs))); - } - - @Test - public void testInvalid() { - assertTrue(validator.validate("box|cat", ctxs).contains("has multiple containment rules")); - } + @Test + public void testValidWithNone() { + assertTrue("".equals(validator.validate("bread|cheese", ctxs))); + } + + @Test + public void testInvalid() { + assertTrue(validator.validate("box|cat", ctxs).contains("has multiple containment rules")); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/UniqueLabelValidationModuleTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/UniqueLabelValidationModuleTest.java index 3b0ab034..233f8b4b 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/UniqueLabelValidationModuleTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/UniqueLabelValidationModuleTest.java @@ -32,61 +32,61 @@ import org.onap.aai.setup.SchemaVersion; import com.jayway.jsonpath.DocumentContext; public class UniqueLabelValidationModuleTest { - private static List<DocumentContext> ctxs; - private static UniqueLabelValidationModule validator; - public static final SchemaVersion LATEST = new SchemaVersion("v14"); + private static List<DocumentContext> ctxs; + private static UniqueLabelValidationModule validator; + public static final SchemaVersion LATEST = new SchemaVersion("v14"); - @BeforeClass - public static void setup() { - Map<SchemaVersion, List<String>> testRules = new TreeMap<>(); - List<String> testFiles = new ArrayList<>(); - testFiles.add("src/test/resources/edgeRules/labelValidationTest1.json"); - testFiles.add("src/test/resources/edgeRules/labelValidationTest2.json"); - testRules.put(LATEST, testFiles); - - JsonIngestor ji = new JsonIngestor(); - ctxs = ji.ingest(testRules).get(LATEST); - validator = new UniqueLabelValidationModule(); - } + @BeforeClass + public static void setup() { + Map<SchemaVersion, List<String>> testRules = new TreeMap<>(); + List<String> testFiles = new ArrayList<>(); + testFiles.add("src/test/resources/edgeRules/labelValidationTest1.json"); + testFiles.add("src/test/resources/edgeRules/labelValidationTest2.json"); + testRules.put(LATEST, testFiles); + + JsonIngestor ji = new JsonIngestor(); + ctxs = ji.ingest(testRules).get(LATEST); + validator = new UniqueLabelValidationModule(); + } - @Test - public void testValidSetOneFile() { - assertTrue("".equals(validator.validate("human|monster", ctxs))); - assertTrue("".equals(validator.validate("monster|human", ctxs))); - } - - @Test - public void testValidDupLabelButDiffPairs() { - assertTrue("".equals(validator.validate("human|strange-and-interesting-plant", ctxs))); - assertTrue("".equals(validator.validate("strange-and-interesting-plant|human", ctxs))); - } - - @Test - public void testValidAcrossFiles() { - assertTrue("".equals(validator.validate("human|toaster", ctxs))); - assertTrue("".equals(validator.validate("toaster|human", ctxs))); - } + @Test + public void testValidSetOneFile() { + assertTrue("".equals(validator.validate("human|monster", ctxs))); + assertTrue("".equals(validator.validate("monster|human", ctxs))); + } + + @Test + public void testValidDupLabelButDiffPairs() { + assertTrue("".equals(validator.validate("human|strange-and-interesting-plant", ctxs))); + assertTrue("".equals(validator.validate("strange-and-interesting-plant|human", ctxs))); + } + + @Test + public void testValidAcrossFiles() { + assertTrue("".equals(validator.validate("human|toaster", ctxs))); + assertTrue("".equals(validator.validate("toaster|human", ctxs))); + } - @Test - public void testInvalidSetOneFileBothTypes() { - assertTrue(validator.validate("sphinx|monster", ctxs).contains("has multiple rules using the same label")); - assertTrue(validator.validate("monster|sphinx", ctxs).contains("has multiple rules using the same label")); - } - - @Test - public void testInvalidSetOneFileJustCousins() { - assertTrue(validator.validate("griffin|hippogriff", ctxs).contains("has multiple rules using the same label")); - assertTrue(validator.validate("hippogriff|griffin", ctxs).contains("has multiple rules using the same label")); - } - - @Test - public void testInvalidSetMultipleFiles() { - assertTrue(validator.validate("lava|floor", ctxs).contains("has multiple rules using the same label")); - assertTrue(validator.validate("floor|lava", ctxs).contains("has multiple rules using the same label")); - } - - @Test - public void testInvalidCopyInOtherFile() { - assertTrue(validator.validate("badger|mushroom", ctxs).contains("has multiple rules using the same label")); - } + @Test + public void testInvalidSetOneFileBothTypes() { + assertTrue(validator.validate("sphinx|monster", ctxs).contains("has multiple rules using the same label")); + assertTrue(validator.validate("monster|sphinx", ctxs).contains("has multiple rules using the same label")); + } + + @Test + public void testInvalidSetOneFileJustCousins() { + assertTrue(validator.validate("griffin|hippogriff", ctxs).contains("has multiple rules using the same label")); + assertTrue(validator.validate("hippogriff|griffin", ctxs).contains("has multiple rules using the same label")); + } + + @Test + public void testInvalidSetMultipleFiles() { + assertTrue(validator.validate("lava|floor", ctxs).contains("has multiple rules using the same label")); + assertTrue(validator.validate("floor|lava", ctxs).contains("has multiple rules using the same label")); + } + + @Test + public void testInvalidCopyInOtherFile() { + assertTrue(validator.validate("badger|mushroom", ctxs).contains("has multiple rules using the same label")); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorRainyDayTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorRainyDayTest.java index a026504f..86fe8a77 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorRainyDayTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorRainyDayTest.java @@ -39,21 +39,21 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {SchemaLocationsBean.class, SchemaVersions.class, BadNodeConfigForValidationTest.class, NodeIngestor.class, - CheckEverythingStrategy.class, DefaultDuplicateNodeDefinitionValidationModule.class, NodeValidator.class}) + CheckEverythingStrategy.class, DefaultDuplicateNodeDefinitionValidationModule.class, NodeValidator.class}) @TestPropertySource(properties = { "schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties" }) @SpringBootTest public class NodeValidatorRainyDayTest { - @Autowired - NodeValidator validator; + @Autowired + NodeValidator validator; - @Test - public void test() { - assertNotNull(validator); //check spring wiring ok - assertFalse(validator.validate()); - String result = validator.getErrorMsg(); - assertTrue(result.contains("LogicalLink")); - assertTrue(result.contains("LagInterface")); - assertFalse(result.contains("LInterface")); - } + @Test + public void test() { + assertNotNull(validator); //check spring wiring ok + assertFalse(validator.validate()); + String result = validator.getErrorMsg(); + assertTrue(result.contains("LogicalLink")); + assertTrue(result.contains("LagInterface")); + assertFalse(result.contains("LInterface")); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSchemaIncompleteTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSchemaIncompleteTest.java index 83bf3748..e40f9301 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSchemaIncompleteTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSchemaIncompleteTest.java @@ -54,35 +54,35 @@ import javax.xml.transform.stream.StreamResult; @TestPropertySource(properties = { "schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties" }) //@SpringBootTest public class NodeValidatorSchemaIncompleteTest { - @Autowired - NodeIngestor ni; - - //set thrown.expect to whatever a specific test needs - //this establishes a default of expecting no exceptions to be thrown - @Rule - public ExpectedException thrown = ExpectedException.none(); + @Autowired + NodeIngestor ni; + + //set thrown.expect to whatever a specific test needs + //this establishes a default of expecting no exceptions to be thrown + @Rule + public ExpectedException thrown = ExpectedException.none(); - //Throws a NullPointerException because a JavaType is referenced, but not defined - @Test - public void testIncompleteCombinedSchema() throws TransformerException, IOException, IllegalStateException { - thrown.expect(NullPointerException.class); + //Throws a NullPointerException because a JavaType is referenced, but not defined + @Test + public void testIncompleteCombinedSchema() throws TransformerException, IOException, IllegalStateException { + thrown.expect(NullPointerException.class); - - ByteArrayOutputStream buffer = new ByteArrayOutputStream(); - printDocument(ni.getSchema(new SchemaVersion("v12")),buffer); - } - - public static void printDocument(Document doc, OutputStream out) throws IOException, TransformerException { - TransformerFactory tf = TransformerFactory.newInstance(); - Transformer transformer = tf.newTransformer(); - transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no"); - transformer.setOutputProperty(OutputKeys.METHOD, "xml"); - transformer.setOutputProperty(OutputKeys.INDENT, "yes"); - transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); - transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); + + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + printDocument(ni.getSchema(new SchemaVersion("v12")),buffer); + } + + public static void printDocument(Document doc, OutputStream out) throws IOException, TransformerException { + TransformerFactory tf = TransformerFactory.newInstance(); + Transformer transformer = tf.newTransformer(); + transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no"); + transformer.setOutputProperty(OutputKeys.METHOD, "xml"); + transformer.setOutputProperty(OutputKeys.INDENT, "yes"); + transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); + transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); - transformer.transform(new DOMSource(doc), - new StreamResult(new OutputStreamWriter(out, "UTF-8"))); - } + transformer.transform(new DOMSource(doc), + new StreamResult(new OutputStreamWriter(out, "UTF-8"))); + } } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSunnyDayTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSunnyDayTest.java index 6d0a6a50..257d6e18 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSunnyDayTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSunnyDayTest.java @@ -39,18 +39,18 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {SchemaLocationsBean.class, SchemaVersions.class, GoodConfigForValidationTest.class, NodeIngestor.class, - CheckEverythingStrategy.class, DefaultDuplicateNodeDefinitionValidationModule.class, NodeValidator.class}) + CheckEverythingStrategy.class, DefaultDuplicateNodeDefinitionValidationModule.class, NodeValidator.class}) @TestPropertySource(properties = { "schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties" }) @SpringBootTest public class NodeValidatorSunnyDayTest { - @Autowired - NodeValidator validator; + @Autowired + NodeValidator validator; - @Test - public void test() { - assertNotNull(validator); //check spring wiring ok - assertTrue(validator.validate()); - assertTrue("No errors found.".equals(validator.getErrorMsg())); - } + @Test + public void test() { + assertNotNull(validator); //check spring wiring ok + assertTrue(validator.validate()); + assertTrue("No errors found.".equals(validator.getErrorMsg())); + } } diff --git a/aai-schema/src/main/resources/onap/aai_schema/aai_schema_v14.xsd b/aai-schema/src/main/resources/onap/aai_schema/aai_schema_v14.xsd index c7c5eee1..c31850d8 100644 --- a/aai-schema/src/main/resources/onap/aai_schema/aai_schema_v14.xsd +++ b/aai-schema/src/main/resources/onap/aai_schema/aai_schema_v14.xsd @@ -2074,7 +2074,7 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" <xs:complexType> <xs:annotation> <xs:appinfo> - <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Persist common address information of external systems.",indexedProps="esr-system-info-id,system-name,system-type",searchable="esr-system-info-id,system-name,system-type",container="esr-system-info-list",dependentOn="cloud-region,esr-ems,esr-vnfm,esr-thirdparty-sdnc")</annox:annotate> + <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Persist common address information of external systems.",indexedProps="esr-system-info-id,system-name,system-type",searchable="esr-system-info-id,system-name,system-type",container="esr-system-info-list",dependentOn="cloud-region,esr-ems,esr-vnfm,esr-thirdparty-sdnc,ext-aai-network")</annox:annotate> </xs:appinfo> </xs:annotation> <xs:sequence> @@ -3934,6 +3934,13 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" </xs:appinfo> </xs:annotation> </xs:element> + <xs:element name="resource-version" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> <xs:element ref="tns:relationship-list" minOccurs="0"/> </xs:sequence> </xs:complexType> @@ -5084,17 +5091,17 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" </xs:appinfo> </xs:annotation> </xs:element> - <xs:element name="model-version-id" type="xs:string" minOccurs="0"> + <xs:element name="model-invariant-id" type="xs:string" minOccurs="0"> <xs:annotation> <xs:appinfo> - <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the model-version-id for this object.")</annox:annotate> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",visibility="deployment",requires="model-version-id",dbAlias="model-invariant-id-local")</annox:annotate> </xs:appinfo> </xs:annotation> </xs:element> - <xs:element name="model-invariant-id" type="xs:string" minOccurs="0"> + <xs:element name="model-version-id" type="xs:string" minOccurs="0"> <xs:annotation> <xs:appinfo> - <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the model-invariant-id for this object.")</annox:annotate> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="model-invariant-id",dbAlias="model-version-id-local",privateEdge="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}")</annox:annotate> </xs:appinfo> </xs:annotation> </xs:element> @@ -8392,6 +8399,1010 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" </xs:sequence> </xs:complexType> </xs:element> + <xs:element name="connectivity"> + <xs:complexType> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Instance of a connectivity",indexedProps="connectivity-id,etht-svc-name,bandwidth-profile-name,vpn-type,color-aware,coupling-flag,access-provider-id,access-client-id,access-topology-id,access-node-id,access-ltp-id,operational-status",nameProps="etht-svc-name",searchable="connectivity-id",uniqueProps="connectivity-id",container="connectivities",namespace="network")</annox:annotate> + </xs:appinfo> + </xs:annotation> + <xs:sequence> + <xs:element name="connectivity-id" type="xs:string"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(isKey=true,description="Uniquely identifies this connectivity by id")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="bandwidth-profile-name" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the name of a bandwidth profile.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="vpn-type" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the type of a bandwidth profile.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="cir" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the CIR of this connectivity.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="eir" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the EIR of this connectivity.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="cbs" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the CBS of this connectivity.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="ebs" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the EBS of this connectivity.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="color-aware" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the color-awareness of this connectivity.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="coupling-flag" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the coupling flag of this connectivity.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="etht-svc-name" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="The ethernet service name for this connectivity.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="access-provider-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the id of the access provider of this connectivity.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="access-client-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the id of the access client of this connectivity.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="access-topology-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the id of the access topology of this connectivity.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="access-node-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the id of the access node of this connectivity.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="access-ltp-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the id of the access ltp of this connectivity.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="connectivity-selflink" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the link to get more information for this connectivity.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="cvlan" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the cvlan for this connectivity.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="operational-status" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the operational-status for this object.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="model-customization-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the model-customization-id for this object.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="model-invariant-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",visibility="deployment",requires="model-version-id",dbAlias="model-invariant-id-local")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="model-version-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="model-invariant-id",dbAlias="model-version-id-local",privateEdge="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="resource-version" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element ref="tns:relationship-list" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="connectivities"> + <xs:complexType> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Collection of connectivities")</annox:annotate> + </xs:appinfo> + </xs:annotation> + <xs:sequence> + <xs:element ref="tns:connectivity" minOccurs="0" maxOccurs="5000"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="dhcp-service"> + <xs:complexType> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Instance of a dhcp-service",indexedProps="dhcp-service-id,dhcp-service-type,domain-name,server-ipv4-address,server-ipv6-address",nameProps="domain-name",searchable="dhcp-service-id",uniqueProps="dhcp-service-id",container="dhcp-services",dependentOn="lan-port-config",namespace="network")</annox:annotate> + </xs:appinfo> + </xs:annotation> + <xs:sequence> + <xs:element name="dhcp-service-id" type="xs:string"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(isKey=true,description="Uniquely identifies this dhcp-service by id")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="server-ipv4-address" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the server-ip4-address of this dhcp-service.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="server-ipv6-address" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the server-ipv6-address of this dhcp-service.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="service-enable" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the service-enable of this dhcp-service.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="dhcp-service-type" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the dhcp-service-type of this dhcp-service.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="lease-time" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the lease-time of this dhcp-service.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="domain-name" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the domain-name of this dhcp-service.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="dns" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the dns of this dhcp-service.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="ntp-primary" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the ntp-primary of this dhcp-service.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="ntp-secondary" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the ntp-secondary of this dhcp-service.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="nbns" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the nbns of this dhcp-service.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="resource-version" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element ref="tns:relationship-list" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="dhcp-services"> + <xs:complexType> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Collection of dhcp-services")</annox:annotate> + </xs:appinfo> + </xs:annotation> + <xs:sequence> + <xs:element ref="tns:dhcp-service" minOccurs="0" maxOccurs="5000"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="lan-port-config"> + <xs:complexType> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Instance of a lan-port-config",indexedProps="lan-port-config-id,lan-port-config-name,device-id,port-id,ipv4-address,ipv6-address,vlan-tag",nameProps="lan-port-config-name",searchable="lan-port-config-id",uniqueProps="lan-port-config-id",container="lan-port-configs",namespace="network")</annox:annotate> + </xs:appinfo> + </xs:annotation> + <xs:sequence> + <xs:element name="lan-port-config-id" type="xs:string"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(isKey=true,description="Uniquely identifies this lan-port-config by id")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="lan-port-config-name" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the name of this lan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="description" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the description of this lan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="device-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the device-id of this lan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="port-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the port-id of this lan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="ipv4-address" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the ipv4-address of this lan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="ipv6-address" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the ipv6-address of this lan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="vlan-tag" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the vlan-tag of this lan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="input-bandwidth" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the input-bandwidth of this lan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="output-bandwidth" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the output-bandwidth of this lan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="resource-version" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element ref="tns:dhcp-services" minOccurs="0"/> + <xs:element ref="tns:relationship-list" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="lan-port-configs"> + <xs:complexType> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Collection of lan-port-configs")</annox:annotate> + </xs:appinfo> + </xs:annotation> + <xs:sequence> + <xs:element ref="tns:lan-port-config" minOccurs="0" maxOccurs="5000"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="network-resource"> + <xs:complexType> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Instance of a network-resource",indexedProps="network-id,provider-id,client-id,te-topo-id",nameProps="network-id",searchable="network-id",uniqueProps="network-id",container="network-resources",namespace="network")</annox:annotate> + </xs:appinfo> + </xs:annotation> + <xs:sequence> + <xs:element name="network-id" type="xs:string"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(isKey=true,description="Uniquely identifies this network-resource by id")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="provider-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the id of the provider of this network-resource.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="client-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the id of the client of this network-resource.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="te-topo-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the id of the te-topo of this network-resource.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="selflink" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the link to get more information for this object.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="resource-version" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element ref="tns:relationship-list" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="network-resources"> + <xs:complexType> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Collection of network-resources")</annox:annotate> + </xs:appinfo> + </xs:annotation> + <xs:sequence> + <xs:element ref="tns:network-resource" minOccurs="0" maxOccurs="5000"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="site-resource"> + <xs:complexType> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Instance of a site-resource",indexedProps="site-resource-id,site-resource-name,type,role,generated-site-id,operational-status",nameProps="site-resource-name",searchable="site-resource-id",uniqueProps="site-resource-id",container="site-resources",namespace="network")</annox:annotate> + </xs:appinfo> + </xs:annotation> + <xs:sequence> + <xs:element name="site-resource-id" type="xs:string"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(isKey=true,description="Uniquely identifies this site-resource by id")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="site-resource-name" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the name of this site-resource.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="description" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the description of this site-resource.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="type" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the type of this site-resource.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="role" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the role of this site-resource.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="generated-site-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the generated-site-id of this site-resource.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="selflink" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the link to get more information for this object.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="operational-status" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the operational-status for this object.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="model-customization-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the model-customization-id for this object.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="model-invariant-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",visibility="deployment",requires="model-version-id",dbAlias="model-invariant-id-local")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="model-version-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="model-invariant-id",dbAlias="model-version-id-local",privateEdge="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="resource-version" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element ref="tns:relationship-list" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="site-resources"> + <xs:complexType> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Collection of site-resources")</annox:annotate> + </xs:appinfo> + </xs:annotation> + <xs:sequence> + <xs:element ref="tns:site-resource" minOccurs="0" maxOccurs="5000"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="sdwan-vpn"> + <xs:complexType> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Instance of an sdwan-vpn",indexedProps="sdwan-vpn-id,sdwan-vpn-name,vxlan-id,topology,operational-status",nameProps="sdwan-vpn-name",searchable="sdwan-vpn-id",uniqueProps="sdwan-vpn-id",container="sdwan-vpns",namespace="network")</annox:annotate> + </xs:appinfo> + </xs:annotation> + <xs:sequence> + <xs:element name="sdwan-vpn-id" type="xs:string"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(isKey=true,description="Uniquely identifies this sdwan-vpn by id")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="sdwan-vpn-name" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the name of this sdwan-vpn.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="vxlan-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the vxlan-id of this sdwan-vpn.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="topology" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the topology of this sdwan-vpn.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="tenant-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the tenant-id of this sdwan-vpn.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="vpn-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the vpn-id of this sdwan-vpn.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="selflink" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the link to get more information for this object.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="operational-status" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the operational-status for this object.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="model-customization-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the model-customization-id for this object.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="model-invariant-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",visibility="deployment",requires="model-version-id",dbAlias="model-invariant-id-local")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="model-version-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="model-invariant-id",dbAlias="model-version-id-local",privateEdge="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="resource-version" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element ref="tns:relationship-list" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="sdwan-vpns"> + <xs:complexType> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Collection of sdwan-vpns")</annox:annotate> + </xs:appinfo> + </xs:annotation> + <xs:sequence> + <xs:element ref="tns:sdwan-vpn" minOccurs="0" maxOccurs="5000"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="device"> + <xs:complexType> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Instance of a device",indexedProps="device-id,device-name,esn,vendor,class,type,version,system-ip,operational-status",nameProps="device-name",searchable="device-id",uniqueProps="device-id",container="devices",namespace="network")</annox:annotate> + </xs:appinfo> + </xs:annotation> + <xs:sequence> + <xs:element name="device-id" type="xs:string"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(isKey=true,description="Uniquely identifies this device by id")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="esn" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the esn of this device.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="device-name" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the name of this device.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="description" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the description of this device.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="vendor" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the vendor of this device.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="class" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the class of this device.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="type" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the type of this device.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="version" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the version of this device.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="system-ip" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the system-ip of this device.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="selflink" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the link to get more information for this object.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="operational-status" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the operational-status for this object.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="model-customization-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the model-customization-id for this object.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="model-invariant-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",visibility="deployment",requires="model-version-id",dbAlias="model-invariant-id-local")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="model-version-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="model-invariant-id",dbAlias="model-version-id-local",privateEdge="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="resource-version" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element ref="tns:relationship-list" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="devices"> + <xs:complexType> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Collection of devices")</annox:annotate> + </xs:appinfo> + </xs:annotation> + <xs:sequence> + <xs:element ref="tns:device" minOccurs="0" maxOccurs="5000"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="wan-port-config"> + <xs:complexType> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Instance of a wan-port-config",indexedProps="wan-port-config-id,wan-port-config-name,device-id,ip-address,port-type,port-number,device-port-id,wan-port-id,operational-status",nameProps="wan-port-config-name",searchable="wan-port-config-id",uniqueProps="wan-port-config-id",container="wan-port-configs",namespace="network")</annox:annotate> + </xs:appinfo> + </xs:annotation> + <xs:sequence> + <xs:element name="wan-port-config-id" type="xs:string"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(isKey=true,description="Uniquely identifies this wan-port-config by id")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="wan-port-config-name" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the name of this wan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="device-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the id of the device of this wan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="vlan-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the id of the vlan of this wan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="ip-address" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the ip-address of this wan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="provider-ip-address" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the provider-ip-address of this wan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="input-bandwidth" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the input-bandwidth of this wan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="output-bandwidth" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the output-bandwidth of this wan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="description" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the description of this wan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="port-type" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the port-type of this wan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="port-number" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the port-number of this wan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="transport-network-name" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the transport-network-name of this wan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="device-port-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the device-port-id of this wan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="wan-port-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the wan-port-id of this wan-port-config.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="selflink" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the link to get more information for this object.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="operational-status" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the operational-status for this object.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="model-customization-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Store the model-customization-id for this object.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="model-invariant-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="the ASDC model id for this resource or service model.",visibility="deployment",requires="model-version-id",dbAlias="model-invariant-id-local")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="model-version-id" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="the ASDC model version for this resource or service model.",visibility="deployment",requires="model-invariant-id",dbAlias="model-version-id-local",privateEdge="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="resource-version" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element ref="tns:relationship-list" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="wan-port-configs"> + <xs:complexType> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Collection of wan-port-configs")</annox:annotate> + </xs:appinfo> + </xs:annotation> + <xs:sequence> + <xs:element ref="tns:wan-port-config" minOccurs="0" maxOccurs="5000"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="ext-aai-network"> + <xs:complexType> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Refer to an external AAI in another ONAP.",indexedProps="aai-id",searchable="aai-id",container="ext-aai-networks",namespace="network")</annox:annotate> + </xs:appinfo> + </xs:annotation> + <xs:sequence> + <xs:element name="aai-id" type="xs:string"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(isKey=true,description="Unique ID of the referenced AAI.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="schema-version" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Schema version of the referenced AAI.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="resource-version" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <annox:annotate target="field">@org.onap.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element ref="tns:esr-system-info" minOccurs="0"/> + <xs:element ref="tns:relationship-list" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="ext-aai-networks"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:ext-aai-network" minOccurs="0" maxOccurs="5000"/> + </xs:sequence> + </xs:complexType> + </xs:element> <xs:element name="network"> <xs:complexType> <xs:annotation> @@ -8422,6 +9433,14 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" <xs:element ref="tns:forwarding-paths" minOccurs="0"/> <xs:element ref="tns:collections" minOccurs="0"/> <xs:element ref="tns:vlan-tags" minOccurs="0"/> + <xs:element ref="tns:connectivities" minOccurs="0"/> + <xs:element ref="tns:lan-port-configs" minOccurs="0"/> + <xs:element ref="tns:network-resources" minOccurs="0"/> + <xs:element ref="tns:site-resources" minOccurs="0"/> + <xs:element ref="tns:sdwan-vpns" minOccurs="0"/> + <xs:element ref="tns:devices" minOccurs="0"/> + <xs:element ref="tns:wan-port-configs" minOccurs="0"/> + <xs:element ref="tns:ext-aai-networks" minOccurs="0"/> </xs:sequence> </xs:complexType> </xs:element> diff --git a/aai-schema/src/main/resources/onap/dbedgerules/v14/DbEdgeRules_ccvpn_v14.json b/aai-schema/src/main/resources/onap/dbedgerules/v14/DbEdgeRules_ccvpn_v14.json index 468e6a8d..a43c7566 100644 --- a/aai-schema/src/main/resources/onap/dbedgerules/v14/DbEdgeRules_ccvpn_v14.json +++ b/aai-schema/src/main/resources/onap/dbedgerules/v14/DbEdgeRules_ccvpn_v14.json @@ -23,6 +23,294 @@ "prevent-delete": "NONE", "default": "true", "description":"For CCVPN Usecase" + }, + { + "from": "connectivity", + "to": "service-instance", + "label": "org.onap.relationships.inventory.PartOf", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "connectivity", + "to": "vpn-binding", + "label": "org.onap.relationships.inventory.PartOf", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "lan-port-config", + "to": "service-instance", + "label": "org.onap.relationships.inventory.PartOf", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "lan-port-config", + "to": "dhcp-service", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "${direction}", + "delete-other-v": "${direction}", + "prevent-delete": "!${direction}", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "network-resource", + "to": "vpn-binding", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "pnf", + "to": "network-resource", + "label": "tosca.relationships.network.LinksTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "!${direction}", + "prevent-delete": "${direction}", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "site-resource", + "to": "service-instance", + "label": "org.onap.relationships.inventory.PartOf", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "site-resource", + "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":"For CCVPN Usecase" + }, + { + "from": "site-resource", + "to": "complex", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "sdwan-vpn", + "to": "service-instance", + "label": "org.onap.relationships.inventory.PartOf", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "device", + "to": "service-instance", + "label": "org.onap.relationships.inventory.PartOf", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "device", + "to": "generic-vnf", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "wan-port-config", + "to": "service-instance", + "label": "org.onap.relationships.inventory.PartOf", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "ext-aai-network", + "to": "esr-system-info", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "ONE2MANY", + "contains-other-v": "${direction}", + "delete-other-v": "${direction}", + "prevent-delete": "!${direction}", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "logical-link", + "to": "ext-aai-network", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "!${direction}", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "vpn-binding", + "to": "ext-aai-network", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "!${direction}", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "pnf", + "to": "ext-aai-network", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "!${direction}", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "connectivity", + "to": "ext-aai-network", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "!${direction}", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "lan-port-config", + "to": "ext-aai-network", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "!${direction}", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "network-resource", + "to": "ext-aai-network", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "!${direction}", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "site-resource", + "to": "ext-aai-network", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "!${direction}", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "sdwan-vpn", + "to": "ext-aai-network", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "!${direction}", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "device", + "to": "ext-aai-network", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "!${direction}", + "default": "true", + "description":"For CCVPN Usecase" + }, + { + "from": "wan-port-config", + "to": "ext-aai-network", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "prevent-delete": "!${direction}", + "default": "true", + "description":"For CCVPN Usecase" } ] } diff --git a/aai-schema/src/main/resources/onap/oxm/v14/aai_oxm_v14.xml b/aai-schema/src/main/resources/onap/oxm/v14/aai_oxm_v14.xml index a11298bf..15ef2770 100644 --- a/aai-schema/src/main/resources/onap/oxm/v14/aai_oxm_v14.xml +++ b/aai-schema/src/main/resources/onap/oxm/v14/aai_oxm_v14.xml @@ -465,7 +465,7 @@ <xml-property name="description" value="ftp passive mode or not." /> </xml-properties> </xml-element> - <xml-element java-attribute="remotepath" name="remote-path" type="java.lang.String"> + <xml-element java-attribute="remotePath" name="remote-path" type="java.lang.String"> <xml-properties> <xml-property name="description" value="resource or performance data file path." /> </xml-properties> @@ -487,7 +487,7 @@ <xml-property name="indexedProps" value="esr-system-info-id,system-name,system-type" /> <xml-property name="searchable" value="esr-system-info-id,system-name,system-type" /> <xml-property name="container" value="esr-system-info-list" /> - <xml-property name="dependentOn" value="cloud-region,esr-ems,esr-vnfm,esr-thirdparty-sdnc" /> + <xml-property name="dependentOn" value="cloud-region,esr-ems,esr-vnfm,esr-thirdparty-sdnc,ext-aai-network" /> </xml-properties> </java-type> @@ -3085,6 +3085,14 @@ <xml-element java-attribute="forwardingPaths" name="forwarding-paths" type="inventory.aai.onap.org.v14.ForwardingPaths"/> <xml-element java-attribute="collections" name="collections" type="inventory.aai.onap.org.v14.Collections"/> <xml-element java-attribute="vlanTags" name="vlan-tags" type="inventory.aai.onap.org.v14.VlanTags"/> + <xml-element java-attribute="connectivities" name="connectivities" type="inventory.aai.onap.org.v14.Connectivities" /> + <xml-element java-attribute="lanPortConfigs" name="lan-port-configs" type="inventory.aai.onap.org.v14.LanPortConfigs" /> + <xml-element java-attribute="networkResources" name="network-resources" type="inventory.aai.onap.org.v14.NetworkResources" /> + <xml-element java-attribute="siteResources" name="site-resources" type="inventory.aai.onap.org.v14.SiteResources" /> + <xml-element java-attribute="sdwanVpns" name="sdwan-vpns" type="inventory.aai.onap.org.v14.SdwanVpns" /> + <xml-element java-attribute="devices" name="devices" type="inventory.aai.onap.org.v14.Devices" /> + <xml-element java-attribute="wanPortConfigs" name="wan-port-configs" type="inventory.aai.onap.org.v14.WanPortConfigs" /> + <xml-element java-attribute="extAaiNetworks" name="ext-aai-networks" type="inventory.aai.onap.org.v14.ExtAaiNetworks" /> </java-attributes> </java-type> <java-type name="Configurations"> @@ -3594,14 +3602,21 @@ <xml-property name="description" value="Store the model-customization-id for this object." /> </xml-properties> </xml-element> - <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String"> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String"> <xml-properties> - <xml-property name="description" value="Store the model-version-id for this object." /> + <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="modelInvariantId" name="model-invariant-id" type="java.lang.String"> + <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String"> <xml-properties> - <xml-property name="description" value="Store the model-invariant-id for this object." /> + <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"> @@ -7342,6 +7357,11 @@ <xml-property name="description" value="Store the callsource of this sp-partner." /> </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.v14.RelationshipList" /> </java-attributes> <xml-properties> @@ -7365,5 +7385,844 @@ </java-attributes> </java-type> + <java-type name="Connectivity"> + <xml-root-element name="connectivity" /> + <java-attributes> + <xml-element java-attribute="connectivityId" name="connectivity-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Uniquely identifies this connectivity by id" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="bandwidthProfileName" name="bandwidth-profile-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the name of a bandwidth profile." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpnType" name="vpn-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the type of a bandwidth profile." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cir" name="cir" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the CIR of this connectivity." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="eir" name="eir" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the EIR of this connectivity." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cbs" name="cbs" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the CBS of this connectivity." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ebs" name="ebs" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the EBS of this connectivity." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="colorAware" name="color-aware" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the color-awareness of this connectivity." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="couplingFlag" name="coupling-flag" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the coupling flag of this connectivity." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ethtSvcName" name="etht-svc-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The ethernet service name for this connectivity." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="accessProviderId" name="access-provider-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the id of the access provider of this connectivity." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="accessClientId" name="access-client-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the id of the access client of this connectivity." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="accessTopologyId" name="access-topology-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the id of the access topology of this connectivity." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="accessNodeId" name="access-node-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the id of the access node of this connectivity." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="accessLtpId" name="access-ltp-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the id of the access ltp of this connectivity." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="connectivitySelflink" name="connectivity-selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the link to get more information for this connectivity." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cvlan" name="cvlan" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the cvlan for this connectivity." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the operational-status for this object." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelCustomizationId" name="model-customization-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the model-customization-id for this object." /> + </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="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.v14.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Instance of a connectivity" /> + <xml-property name="indexedProps" value="connectivity-id,etht-svc-name,bandwidth-profile-name,vpn-type,color-aware,coupling-flag,access-provider-id,access-client-id,access-topology-id,access-node-id,access-ltp-id,operational-status" /> + <xml-property name="nameProps" value="etht-svc-name" /> + <xml-property name="searchable" value="connectivity-id" /> + <xml-property name="uniqueProps" value="connectivity-id" /> + <xml-property name="container" value="connectivities" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="Connectivities"> + <xml-root-element name="connectivities" /> + <xml-properties> + <xml-property name="description" value="Collection of connectivities" /> + </xml-properties> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="connectivity" name="connectivity" type="inventory.aai.onap.org.v14.Connectivity" /> + </java-attributes> + </java-type> + + <java-type name="LanPortConfig"> + <xml-root-element name="lan-port-config" /> + <java-attributes> + <xml-element java-attribute="lanPortConfigId" name="lan-port-config-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Uniquely identifies this lan-port-config by id" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="lanPortConfigName" name="lan-port-config-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the name of this lan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="description" name="description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the description of this lan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="deviceId" name="device-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the device-id of this lan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="portId" name="port-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the port-id of this lan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4Address" name="ipv4-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the ipv4-address of this lan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv6Address" name="ipv6-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the ipv6-address of this lan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanTag" name="vlan-tag" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the vlan-tag of this lan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="inputBandwidth" name="input-bandwidth" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the input-bandwidth of this lan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="outputBandwidth" name="output-bandwidth" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the output-bandwidth of this lan-port-config." /> + </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="dhcpServices" name="dhcp-services" type="inventory.aai.onap.org.v14.DhcpServices" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v14.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Instance of a lan-port-config" /> + <xml-property name="indexedProps" value="lan-port-config-id,lan-port-config-name,device-id,port-id,ipv4-address,ipv6-address,vlan-tag" /> + <xml-property name="nameProps" value="lan-port-config-name" /> + <xml-property name="searchable" value="lan-port-config-id" /> + <xml-property name="uniqueProps" value="lan-port-config-id" /> + <xml-property name="container" value="lan-port-configs" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="LanPortConfigs"> + <xml-root-element name="lan-port-configs" /> + <xml-properties> + <xml-property name="description" value="Collection of lan-port-configs" /> + </xml-properties> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="lanPortConfig" name="lan-port-config" type="inventory.aai.onap.org.v14.LanPortConfig" /> + </java-attributes> + </java-type> + + <java-type name="DhcpService"> + <xml-root-element name="dhcp-service" /> + <java-attributes> + <xml-element java-attribute="dhcpServiceId" name="dhcp-service-id" type="java.lang.String" required="true" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Uniquely identifies this dhcp-service by id" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serverIpv4Address" name="server-ipv4-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the server-ip4-address of this dhcp-service." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serverIpv6Address" name="server-ipv6-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the server-ipv6-address of this dhcp-service." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceEnable" name="service-enable" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the service-enable of this dhcp-service." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="dhcpServiceType" name="dhcp-service-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the dhcp-service-type of this dhcp-service." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="leaseTime" name="lease-time" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the lease-time of this dhcp-service." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="domainName" name="domain-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the domain-name of this dhcp-service." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="dns" name="dns" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the dns of this dhcp-service." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ntpPrimary" name="ntp-primary" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the ntp-primary of this dhcp-service." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ntpSecondary" name="ntp-secondary" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the ntp-secondary of this dhcp-service." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="nbns" name="nbns" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the nbns of this dhcp-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="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v14.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Instance of a dhcp-service" /> + <xml-property name="indexedProps" value="dhcp-service-id,dhcp-service-type,domain-name,server-ipv4-address,server-ipv6-address" /> + <xml-property name="nameProps" value="domain-name" /> + <xml-property name="searchable" value="dhcp-service-id" /> + <xml-property name="uniqueProps" value="dhcp-service-id" /> + <xml-property name="container" value="dhcp-services" /> + <xml-property name="dependentOn" value="lan-port-config" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="DhcpServices"> + <xml-root-element name="dhcp-services" /> + <xml-properties> + <xml-property name="description" value="Collection of dhcp-services" /> + </xml-properties> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="dhcpService" name="dhcp-service" type="inventory.aai.onap.org.v14.DhcpService" /> + </java-attributes> + </java-type> + + <java-type name="NetworkResource"> + <xml-root-element name="network-resource" /> + <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="Uniquely identifies this network-resource by id" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="providerId" name="provider-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the id of the provider of this network-resource." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="clientId" name="client-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the id of the client of this network-resource." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="teTopoId" name="te-topo-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the id of the te-topo of this network-resource." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the link to get more information for this 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> + + <!-- Want to use pnf as sub-component, but workaround is to use COUSIN edge in relationship-list. + <xml-element java-attribute="pnfs" name="pnfs" type="inventory.aai.onap.org.v14.Pnfs" /> --> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v14.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Instance of a network-resource" /> + <xml-property name="indexedProps" value="network-id,provider-id,client-id,te-topo-id" /> + <xml-property name="nameProps" value="network-id" /> + <xml-property name="searchable" value="network-id" /> + <xml-property name="uniqueProps" value="network-id" /> + <xml-property name="container" value="network-resources" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="NetworkResources"> + <xml-root-element name="network-resources" /> + <xml-properties> + <xml-property name="description" value="Collection of network-resources" /> + </xml-properties> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="networkResource" name="network-resource" type="inventory.aai.onap.org.v14.NetworkResource" /> + </java-attributes> + </java-type> + + <java-type name="SiteResource"> + <xml-root-element name="site-resource" /> + <java-attributes> + <xml-element java-attribute="siteResourceId" name="site-resource-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Uniquely identifies this site-resource by id" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="siteResourceName" name="site-resource-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the name of this site-resource." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="description" name="description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the description of this site-resource." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="type" name="type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the type of this site-resource." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="role" name="role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the role of this site-resource." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="generatedSiteId" name="generated-site-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the generated-site-id of this site-resource." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the link to get more information for this object." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the operational-status for this object." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelCustomizationId" name="model-customization-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the model-customization-id for this object." /> + </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="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.v14.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Instance of a site-resource" /> + <xml-property name="indexedProps" value="site-resource-id,site-resource-name,type,role,generated-site-id,operational-status" /> + <xml-property name="nameProps" value="site-resource-name" /> + <xml-property name="searchable" value="site-resource-id" /> + <xml-property name="uniqueProps" value="site-resource-id" /> + <xml-property name="container" value="site-resources" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="SiteResources"> + <xml-root-element name="site-resources" /> + <xml-properties> + <xml-property name="description" value="Collection of site-resources" /> + </xml-properties> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="siteResource" name="site-resource" type="inventory.aai.onap.org.v14.SiteResource" /> + </java-attributes> + </java-type> + + <java-type name="SdwanVpns"> + <xml-root-element name="sdwan-vpns" /> + <xml-properties> + <xml-property name="description" value="Collection of sdwan-vpns" /> + </xml-properties> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="sdwanVpn" name="sdwan-vpn" type="inventory.aai.onap.org.v14.SdwanVpn" /> + </java-attributes> + </java-type> + <java-type name="SdwanVpn"> + <xml-root-element name="sdwan-vpn" /> + <java-attributes> + <xml-element java-attribute="sdwanVpnId" name="sdwan-vpn-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Uniquely identifies this sdwan-vpn by id" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="sdwanVpnName" name="sdwan-vpn-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the name of this sdwan-vpn." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vxlanId" name="vxlan-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the vxlan-id of this sdwan-vpn." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="topology" name="topology" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the topology of this sdwan-vpn." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="tenantId" name="tenant-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the tenant-id of this sdwan-vpn." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpnId" name="vpn-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the vpn-id of this sdwan-vpn." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the link to get more information for this object." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the operational-status for this object." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelCustomizationId" name="model-customization-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the model-customization-id for this object." /> + </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="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.v14.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Instance of an sdwan-vpn" /> + <xml-property name="indexedProps" value="sdwan-vpn-id,sdwan-vpn-name,vxlan-id,topology,operational-status" /> + <xml-property name="nameProps" value="sdwan-vpn-name" /> + <xml-property name="searchable" value="sdwan-vpn-id" /> + <xml-property name="uniqueProps" value="sdwan-vpn-id" /> + <xml-property name="container" value="sdwan-vpns" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="Devices"> + <xml-root-element name="devices" /> + <xml-properties> + <xml-property name="description" value="Collection of devices" /> + </xml-properties> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="device" name="device" type="inventory.aai.onap.org.v14.Device" /> + </java-attributes> + </java-type> + <java-type name="Device"> + <xml-root-element name="device" /> + <java-attributes> + <xml-element java-attribute="deviceId" name="device-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Uniquely identifies this device by id" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="esn" name="esn" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the esn of this device." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="deviceName" name="device-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the name of this device." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="description" name="description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the description of this device." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vendor" name="vendor" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the vendor of this device." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="class" name="class" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the class of this device." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="type" name="type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the type of this device." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="version" name="version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the version of this device." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="systemIp" name="system-ip" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the system-ip of this device." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the link to get more information for this object." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the operational-status for this object." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelCustomizationId" name="model-customization-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the model-customization-id for this object." /> + </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="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.v14.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Instance of a device" /> + <xml-property name="indexedProps" value="device-id,device-name,esn,vendor,class,type,version,system-ip,operational-status" /> + <xml-property name="nameProps" value="device-name" /> + <xml-property name="searchable" value="device-id" /> + <xml-property name="uniqueProps" value="device-id" /> + <xml-property name="container" value="devices" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="WanPortConfig"> + <xml-root-element name="wan-port-config" /> + <java-attributes> + <xml-element java-attribute="wanPortConfigId" name="wan-port-config-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Uniquely identifies this wan-port-config by id" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="wanPortConfigName" name="wan-port-config-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the name of this wan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="deviceId" name="device-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the id of the device of this wan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanId" name="vlan-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the id of the vlan of this wan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipAddress" name="ip-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the ip-address of this wan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="providerIpAddress" name="provider-ip-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the provider-ip-address of this wan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="inputBandwidth" name="input-bandwidth" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the input-bandwidth of this wan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="outputBandwidth" name="output-bandwidth" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the output-bandwidth of this wan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="description" name="description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the description of this wan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="portType" name="port-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the port-type of this wan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="portNumber" name="port-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the port-number of this wan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="transportNetworkName" name="transport-network-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the transport-network-name of this wan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="devicePortId" name="device-port-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the device-port-id of this wan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="wanPortId" name="wan-port-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the wan-port-id of this wan-port-config." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the link to get more information for this object." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the operational-status for this object." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelCustomizationId" name="model-customization-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Store the model-customization-id for this object." /> + </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="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.v14.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Instance of a wan-port-config" /> + <xml-property name="indexedProps" value="wan-port-config-id,wan-port-config-name,device-id,ip-address,port-type,port-number,device-port-id,wan-port-id,operational-status" /> + <xml-property name="nameProps" value="wan-port-config-name" /> + <xml-property name="searchable" value="wan-port-config-id" /> + <xml-property name="uniqueProps" value="wan-port-config-id" /> + <xml-property name="container" value="wan-port-configs" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="WanPortConfigs"> + <xml-root-element name="wan-port-configs" /> + <xml-properties> + <xml-property name="description" value="Collection of wan-port-configs" /> + </xml-properties> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="wanPortConfig" name="wan-port-config" type="inventory.aai.onap.org.v14.WanPortConfig" /> + </java-attributes> + </java-type> + + <java-type name="ExtAaiNetworks"> + <xml-root-element name="ext-aai-networks" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="extAaiNetwork" name="ext-aai-network" type="inventory.aai.onap.org.v14.ExtAaiNetwork" /> + </java-attributes> + </java-type> + <java-type name="ExtAaiNetwork"> + <xml-root-element name="ext-aai-network" /> + <java-attributes> + <xml-element java-attribute="aaiId" name="aai-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of the referenced AAI." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="schemaVersion" name="schema-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Schema version of the referenced AAI." /> + </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="esrSystemInfo" name="esr-system-info" type="inventory.aai.onap.org.v14.EsrSystemInfo" /> + + <!-- Want to use these as sub-components, but workaround is to use COUSIN edges in relationship-list. + <xml-element java-attribute="logicalLinks" name="logical-links" type="inventory.aai.onap.org.v14.LogicalLinks" /> + <xml-element java-attribute="vpnBindings" name="vpn-bindings" type="inventory.aai.onap.org.v14.VpnBindings" /> + <xml-element java-attribute="pnfs" name="pnfs" type="inventory.aai.onap.org.v14.Pnfs" /> + + <xml-element java-attribute="connectivities" name="connectivities" type="inventory.aai.onap.org.v14.Connectivities" /> + <xml-element java-attribute="lanPortConfigs" name="lan-port-configs" type="inventory.aai.onap.org.v14.LanPortConfigs" /> + <xml-element java-attribute="networkResources" name="network-resources" type="inventory.aai.onap.org.v14.NetworkResources" /> + <xml-element java-attribute="siteResources" name="site-resources" type="inventory.aai.onap.org.v14.SiteResources" /> + <xml-element java-attribute="sdwanVpns" name="sdwan-vpns" type="inventory.aai.onap.org.v14.SdwanVpns" /> + <xml-element java-attribute="devices" name="devices" type="inventory.aai.onap.org.v14.Devices" /> + <xml-element java-attribute="wanPortConfigs" name="wan-port-configs" type="inventory.aai.onap.org.v14.WanPortConfigs" /> --> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v14.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Refer to an external AAI in another ONAP." /> + <xml-property name="indexedProps" value="aai-id" /> + <xml-property name="searchable" value="aai-id" /> + <xml-property name="container" value="ext-aai-networks" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + </java-types> </xml-bindings> |