Committed by
Gerrit Code Review
[ONOS-4712] inter jar file linker unit test case.
Change-Id: I566b9ce59cb37e664914f99263c597ead7ce5e11
Showing
8 changed files
with
344 additions
and
1 deletions
| ... | @@ -32,6 +32,7 @@ import java.util.List; | ... | @@ -32,6 +32,7 @@ import java.util.List; |
| 32 | import java.util.Set; | 32 | import java.util.Set; |
| 33 | import java.util.jar.JarEntry; | 33 | import java.util.jar.JarEntry; |
| 34 | import java.util.jar.JarFile; | 34 | import java.util.jar.JarFile; |
| 35 | + | ||
| 35 | import org.apache.maven.artifact.repository.ArtifactRepository; | 36 | import org.apache.maven.artifact.repository.ArtifactRepository; |
| 36 | import org.apache.maven.model.Dependency; | 37 | import org.apache.maven.model.Dependency; |
| 37 | import org.apache.maven.model.Resource; | 38 | import org.apache.maven.model.Resource; |
| ... | @@ -192,8 +193,9 @@ public final class YangPluginUtils { | ... | @@ -192,8 +193,9 @@ public final class YangPluginUtils { |
| 192 | 193 | ||
| 193 | StringBuilder path = new StringBuilder(); | 194 | StringBuilder path = new StringBuilder(); |
| 194 | List<String> jarPaths = new ArrayList<>(); | 195 | List<String> jarPaths = new ArrayList<>(); |
| 195 | - for (Dependency dependency : project.getDependencies()) { | 196 | + for (Object obj : project.getDependencies()) { |
| 196 | 197 | ||
| 198 | + Dependency dependency = (Dependency) obj; | ||
| 197 | path.append(localRepository.getBasedir()); | 199 | path.append(localRepository.getBasedir()); |
| 198 | path.append(SLASH); | 200 | path.append(SLASH); |
| 199 | path.append(getPackageDirPathFromJavaJPackage(dependency.getGroupId())); | 201 | path.append(getPackageDirPathFromJavaJPackage(dependency.getGroupId())); | ... | ... |
This diff is collapsed. Click to expand it.
No preview for this file type
No preview for this file type
No preview for this file type
utils/yangutils/plugin/src/test/resources/interJarFileLinking/yangFiles/flowclassifier.yang
0 → 100644
| 1 | +module flow-classifier { | ||
| 2 | + | ||
| 3 | + yang-version 1; | ||
| 4 | + | ||
| 5 | + namespace "sfc.flowclassifier"; | ||
| 6 | + | ||
| 7 | + prefix "flow-classifier"; | ||
| 8 | + | ||
| 9 | + import "port-pair" { | ||
| 10 | + prefix "port-pair"; | ||
| 11 | + } | ||
| 12 | + | ||
| 13 | + organization "ON-LAB"; | ||
| 14 | + | ||
| 15 | + description "This submodule defines for flow classifier."; | ||
| 16 | + | ||
| 17 | + revision "2016-05-24" { | ||
| 18 | + description "Initial revision."; | ||
| 19 | + } | ||
| 20 | + | ||
| 21 | + typedef flow-classifier-id { | ||
| 22 | + type port-pair:uuid; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + typedef IpPrefix { | ||
| 26 | + type string; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + typedef VirtualPortId { | ||
| 30 | + type string; | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + grouping flow-classifier { | ||
| 34 | + container flow-classifier { | ||
| 35 | + leaf id { | ||
| 36 | + type flow-classifier-id; | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + leaf tenant-id { | ||
| 40 | + type port-pair:tenant-id; | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + leaf name { | ||
| 44 | + type string; | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + leaf description { | ||
| 48 | + type string; | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + leaf etherType { | ||
| 52 | + type string; | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + leaf protocol { | ||
| 56 | + type string; | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + leaf priority { | ||
| 60 | + type int32; | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + leaf minSrcPortRange { | ||
| 64 | + type int32; | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + leaf maxSrcPortRange { | ||
| 68 | + type int32; | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + leaf minDstPortRange { | ||
| 72 | + type int32; | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + leaf maxDstPortRange { | ||
| 76 | + type int32; | ||
| 77 | + } | ||
| 78 | + | ||
| 79 | + leaf srcIpPrefix { | ||
| 80 | + type IpPrefix; | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + leaf dstIpPrefix { | ||
| 84 | + type IpPrefix; | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + leaf srcPort { | ||
| 88 | + type VirtualPortId; | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + leaf dstPort { | ||
| 92 | + type VirtualPortId; | ||
| 93 | + } | ||
| 94 | + } | ||
| 95 | + } | ||
| 96 | + rpc exists { | ||
| 97 | + input { | ||
| 98 | + leaf id { | ||
| 99 | + type flow-classifier-id; | ||
| 100 | + } | ||
| 101 | + } | ||
| 102 | + output { | ||
| 103 | + leaf is-present { | ||
| 104 | + type boolean; | ||
| 105 | + } | ||
| 106 | + } | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + rpc get-flow-classifier-count { | ||
| 110 | + | ||
| 111 | + output { | ||
| 112 | + leaf count { | ||
| 113 | + type int32; | ||
| 114 | + } | ||
| 115 | + } | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + rpc get-flow-classifier { | ||
| 119 | + input { | ||
| 120 | + leaf id { | ||
| 121 | + type flow-classifier-id; | ||
| 122 | + } | ||
| 123 | + } | ||
| 124 | + output { | ||
| 125 | + uses flow-classifier; | ||
| 126 | + } | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | + rpc create-flow-classifier { | ||
| 130 | + input { | ||
| 131 | + uses flow-classifier; | ||
| 132 | + } | ||
| 133 | + output { | ||
| 134 | + leaf is-created { | ||
| 135 | + type boolean; | ||
| 136 | + } | ||
| 137 | + } | ||
| 138 | + } | ||
| 139 | + | ||
| 140 | + rpc update-flow-classifier { | ||
| 141 | + input { | ||
| 142 | + uses flow-classifier; | ||
| 143 | + } | ||
| 144 | + output { | ||
| 145 | + leaf is-updated { | ||
| 146 | + type boolean; | ||
| 147 | + } | ||
| 148 | + } | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + rpc remove-flow-classifier { | ||
| 152 | + input { | ||
| 153 | + leaf id { | ||
| 154 | + type flow-classifier-id; | ||
| 155 | + } | ||
| 156 | + } | ||
| 157 | + output { | ||
| 158 | + leaf is-removed { | ||
| 159 | + type boolean; | ||
| 160 | + } | ||
| 161 | + } | ||
| 162 | + } | ||
| 163 | + | ||
| 164 | + notification Flow-Classifier-Put { | ||
| 165 | + uses flow-classifier; | ||
| 166 | + } | ||
| 167 | + | ||
| 168 | + notification Flow-Classifier-Delete { | ||
| 169 | + uses flow-classifier; | ||
| 170 | + } | ||
| 171 | + | ||
| 172 | + notification Flow-Classifier-Update { | ||
| 173 | + uses flow-classifier; | ||
| 174 | + } | ||
| 175 | +} |
| 1 | +module port-pair { | ||
| 2 | + | ||
| 3 | + yang-version 1; | ||
| 4 | + | ||
| 5 | + namespace "sfc.portpair"; | ||
| 6 | + | ||
| 7 | + prefix "port-pair"; | ||
| 8 | + | ||
| 9 | + organization "Huawei india pvt. ltd.."; | ||
| 10 | + | ||
| 11 | + description "This submodule defines for port pair."; | ||
| 12 | + | ||
| 13 | + revision "2016-05-24" { | ||
| 14 | + description "Initial revision."; | ||
| 15 | + } | ||
| 16 | + | ||
| 17 | + typedef uuid { | ||
| 18 | + type string; | ||
| 19 | + } | ||
| 20 | + | ||
| 21 | + typedef port-pair-id { | ||
| 22 | + type uuid; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + typedef tenant-id { | ||
| 26 | + type uuid; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + grouping port-pair { | ||
| 30 | + container port-pair { | ||
| 31 | + | ||
| 32 | + leaf name { | ||
| 33 | + type string; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + leaf id { | ||
| 37 | + type port-pair-id; | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + leaf tenantIdentifier { | ||
| 41 | + type tenant-id; | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + leaf description { | ||
| 45 | + type string; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + leaf ingress { | ||
| 49 | + type uuid; | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + leaf egress { | ||
| 53 | + type uuid; | ||
| 54 | + } | ||
| 55 | + } | ||
| 56 | + } | ||
| 57 | + rpc exists { | ||
| 58 | + input { | ||
| 59 | + leaf id { | ||
| 60 | + type port-pair-id; | ||
| 61 | + } | ||
| 62 | + } | ||
| 63 | + output { | ||
| 64 | + leaf is-present { | ||
| 65 | + type boolean; | ||
| 66 | + } | ||
| 67 | + } | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + rpc get-port-pair-count { | ||
| 71 | + | ||
| 72 | + output { | ||
| 73 | + leaf count { | ||
| 74 | + type int32; | ||
| 75 | + } | ||
| 76 | + } | ||
| 77 | + } | ||
| 78 | + | ||
| 79 | + rpc get-port-pair { | ||
| 80 | + input { | ||
| 81 | + leaf id { | ||
| 82 | + type port-pair-id; | ||
| 83 | + } | ||
| 84 | + } | ||
| 85 | + output { | ||
| 86 | + uses port-pair; | ||
| 87 | + } | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + rpc create-port-pair { | ||
| 91 | + input { | ||
| 92 | + uses port-pair; | ||
| 93 | + } | ||
| 94 | + output { | ||
| 95 | + leaf is-created { | ||
| 96 | + type boolean; | ||
| 97 | + } | ||
| 98 | + } | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + rpc update-port-pair { | ||
| 102 | + input { | ||
| 103 | + uses port-pair; | ||
| 104 | + } | ||
| 105 | + output { | ||
| 106 | + leaf is-updated { | ||
| 107 | + type boolean; | ||
| 108 | + } | ||
| 109 | + } | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + rpc remove-port-pair { | ||
| 113 | + input { | ||
| 114 | + leaf id { | ||
| 115 | + type port-pair-id; | ||
| 116 | + } | ||
| 117 | + } | ||
| 118 | + output { | ||
| 119 | + leaf is-removed { | ||
| 120 | + type boolean; | ||
| 121 | + } | ||
| 122 | + } | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | + | ||
| 126 | + notification port-pair-put { | ||
| 127 | + uses port-pair; | ||
| 128 | + } | ||
| 129 | + | ||
| 130 | + notification port-pair-Delete { | ||
| 131 | + uses port-pair; | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + notification port-pair-Update { | ||
| 135 | + uses port-pair; | ||
| 136 | + } | ||
| 137 | +} |
| 1 | +module Test { | ||
| 2 | + yang-version 1; | ||
| 3 | + namespace http://huawei.com; | ||
| 4 | + prefix Ant; | ||
| 5 | + container valid { | ||
| 6 | + leaf invalid-interval { | ||
| 7 | + type "uint16"; | ||
| 8 | + units "seconds"; | ||
| 9 | + status current; | ||
| 10 | + reference "RFC 6020"; | ||
| 11 | + } | ||
| 12 | + } | ||
| 13 | + container invalid { | ||
| 14 | + leaf invalid-interval { | ||
| 15 | + type "uint16"; | ||
| 16 | + units "seconds"; | ||
| 17 | + status current; | ||
| 18 | + reference "RFC 6020"; | ||
| 19 | + } | ||
| 20 | + } | ||
| 21 | + container valid2 { | ||
| 22 | + leaf invalid-interval { | ||
| 23 | + type "uint16"; | ||
| 24 | + units "seconds"; | ||
| 25 | + status current; | ||
| 26 | + reference "RFC 6020"; | ||
| 27 | + } | ||
| 28 | + } | ||
| 29 | +} |
-
Please register or login to post a comment