Advertisement
mbuil

ODL Rest API working sfc_one_

Apr 13th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.42 KB | None | 0 0
  1. root@controller00-neutron-server-container-65096b03:~# curl -u admin:admin -H 'Content-type: application/json' -X GET http://127.0.0.1:8181/restconf/config/neutron:neutron/sfc-flow-classifiers | python -m json.tool
  2. % Total % Received % Xferd Average Speed Time Time Time Current
  3. Dload Upload Total Spent Left Speed
  4. 100 421 0 421 0 0 25022 0 --:--:-- --:--:-- --:--:-- 26312
  5. {
  6. "sfc-flow-classifiers": {
  7. "sfc-flow-classifier": [
  8. {
  9. "destination-port-range-max": 80,
  10. "destination-port-range-min": 80,
  11. "ethertype": "neutron-constants:ethertype-v4",
  12. "logical-source-port": "95c3c665-9cad-47fb-8479-899625e14292",
  13. "name": "",
  14. "project-id": "86a51e8f11614d43b574d4fe24ad6367",
  15. "protocol": "neutron-constants:protocol-tcp",
  16. "tenant-id": "86a51e8f-1161-4d43-b574-d4fe24ad6367",
  17. "uuid": "00cb97f8-8513-45c0-89ec-155bb6995694"
  18. }
  19. ]
  20. }
  21. }
  22. root@controller00-neutron-server-container-65096b03:~# curl -u admin:admin -H 'Content-type: application/json' -X GET http://127.0.0.1:8181/restconf/config/ietf-access-control-list:access-lists/ | python -m json.tool
  23. % Total % Received % Xferd Average Speed Time Time Time Current
  24. Dload Upload Total Spent Left Speed
  25. 100 4051 0 4051 0 0 330k 0 --:--:-- --:--:-- --:--:-- 359k
  26. {
  27. "access-lists": {
  28. "acl": [
  29. {
  30. "access-list-entries": {
  31. "ace": [
  32. {
  33. "aclservice:direction": "aclservice:direction-egress",
  34. "actions": {
  35. "permit": [
  36. null
  37. ]
  38. },
  39. "matches": {
  40. "destination-ipv6-network": "::/0",
  41. "source-ipv6-network": "::/0"
  42. },
  43. "rule-name": "6e4f5552-80ae-400f-a48f-427252af1f08"
  44. },
  45. {
  46. "aclservice:direction": "aclservice:direction-ingress",
  47. "aclservice:remote-group-id": "a637b4b3-9ecb-431f-8c30-30df3d0020f6",
  48. "actions": {
  49. "permit": [
  50. null
  51. ]
  52. },
  53. "matches": {
  54. "destination-ipv4-network": "0.0.0.0/0",
  55. "source-ipv4-network": "0.0.0.0/0"
  56. },
  57. "rule-name": "b8b1d5bf-9501-4d19-b094-b0b68fe5a086"
  58. },
  59. {
  60. "aclservice:direction": "aclservice:direction-egress",
  61. "actions": {
  62. "permit": [
  63. null
  64. ]
  65. },
  66. "matches": {
  67. "destination-ipv4-network": "0.0.0.0/0",
  68. "source-ipv4-network": "0.0.0.0/0"
  69. },
  70. "rule-name": "f1a85b6e-e42c-4a53-9269-791edffbe202"
  71. },
  72. {
  73. "aclservice:direction": "aclservice:direction-ingress",
  74. "aclservice:remote-group-id": "a637b4b3-9ecb-431f-8c30-30df3d0020f6",
  75. "actions": {
  76. "permit": [
  77. null
  78. ]
  79. },
  80. "matches": {
  81. "destination-ipv6-network": "::/0",
  82. "source-ipv6-network": "::/0"
  83. },
  84. "rule-name": "f57406ba-417e-4e08-bb74-406515de20b3"
  85. }
  86. ]
  87. },
  88. "acl-name": "a637b4b3-9ecb-431f-8c30-30df3d0020f6",
  89. "acl-type": "ietf-access-control-list:ipv4-acl"
  90. },
  91. {
  92. "access-list-entries": {
  93. "ace": [
  94. {
  95. "aclservice:direction": "aclservice:direction-ingress",
  96. "aclservice:remote-group-id": "48246ee0-f425-4864-a4e5-f4a2ee8ae5a6",
  97. "actions": {
  98. "permit": [
  99. null
  100. ]
  101. },
  102. "matches": {
  103. "destination-ipv4-network": "0.0.0.0/0",
  104. "source-ipv4-network": "0.0.0.0/0"
  105. },
  106. "rule-name": "210477b1-1d0c-4369-bc67-95224150e465"
  107. },
  108. {
  109. "aclservice:direction": "aclservice:direction-egress",
  110. "actions": {
  111. "permit": [
  112. null
  113. ]
  114. },
  115. "matches": {
  116. "destination-ipv4-network": "0.0.0.0/0",
  117. "source-ipv4-network": "0.0.0.0/0"
  118. },
  119. "rule-name": "3daa2ec3-f775-4209-a985-15e7e75a4cfa"
  120. },
  121. {
  122. "aclservice:direction": "aclservice:direction-egress",
  123. "actions": {
  124. "permit": [
  125. null
  126. ]
  127. },
  128. "matches": {
  129. "destination-ipv6-network": "::/0",
  130. "source-ipv6-network": "::/0"
  131. },
  132. "rule-name": "45588ad1-e451-4d64-aa19-da4ca3b64a39"
  133. },
  134. {
  135. "aclservice:direction": "aclservice:direction-ingress",
  136. "aclservice:remote-group-id": "48246ee0-f425-4864-a4e5-f4a2ee8ae5a6",
  137. "actions": {
  138. "permit": [
  139. null
  140. ]
  141. },
  142. "matches": {
  143. "destination-ipv6-network": "::/0",
  144. "source-ipv6-network": "::/0"
  145. },
  146. "rule-name": "6848cdf5-5d1f-44dc-8fac-3453147cb1f2"
  147. }
  148. ]
  149. },
  150. "acl-name": "48246ee0-f425-4864-a4e5-f4a2ee8ae5a6",
  151. "acl-type": "ietf-access-control-list:ipv4-acl"
  152. },
  153. {
  154. "access-list-entries": {
  155. "ace": [
  156. {
  157. "actions": {
  158. "netvirt-sfc-acl:sfp-name": "Path-red_http-port-chain"
  159. },
  160. "matches": {
  161. "destination-port-range": {
  162. "lower-port": 80
  163. },
  164. "netvirt-sfc-acl:source-port-uuid": "95c3c665-9cad-47fb-8479-899625e14292",
  165. "protocol": 6
  166. },
  167. "rule-name": "00cb97f8-8513-45c0-89ec-155bb6995694__rule"
  168. }
  169. ]
  170. },
  171. "acl-name": "00cb97f8-8513-45c0-89ec-155bb6995694_",
  172. "acl-type": "ietf-access-control-list:ipv4-acl"
  173. },
  174. {
  175. "access-list-entries": {
  176. "ace": [
  177. {
  178. "aclservice:direction": "aclservice:direction-egress",
  179. "actions": {
  180. "permit": [
  181. null
  182. ]
  183. },
  184. "matches": {
  185. "destination-ipv4-network": "0.0.0.0/0",
  186. "source-ipv4-network": "0.0.0.0/0"
  187. },
  188. "rule-name": "33e28655-5b4d-4784-b0b3-00365a1d0ab1"
  189. },
  190. {
  191. "aclservice:direction": "aclservice:direction-egress",
  192. "actions": {
  193. "permit": [
  194. null
  195. ]
  196. },
  197. "matches": {
  198. "destination-ipv6-network": "::/0",
  199. "source-ipv6-network": "::/0"
  200. },
  201. "rule-name": "81e73b7f-f02c-4b94-8298-9979dcf5cbb8"
  202. },
  203. {
  204. "aclservice:direction": "aclservice:direction-ingress",
  205. "actions": {
  206. "permit": [
  207. null
  208. ]
  209. },
  210. "matches": {
  211. "destination-ipv4-network": "0.0.0.0/0",
  212. "protocol": 1,
  213. "source-ipv4-network": "0.0.0.0/0"
  214. },
  215. "rule-name": "167ce86b-6a78-406c-9d99-ac3de85ccdac"
  216. },
  217. {
  218. "aclservice:direction": "aclservice:direction-ingress",
  219. "actions": {
  220. "permit": [
  221. null
  222. ]
  223. },
  224. "matches": {
  225. "destination-ipv4-network": "0.0.0.0/0",
  226. "destination-port-range": {
  227. "lower-port": 22,
  228. "upper-port": 22
  229. },
  230. "protocol": 6,
  231. "source-ipv4-network": "0.0.0.0/0"
  232. },
  233. "rule-name": "19939d25-ce89-45f5-9f70-c6870ddf2a4d"
  234. },
  235. {
  236. "aclservice:direction": "aclservice:direction-ingress",
  237. "actions": {
  238. "permit": [
  239. null
  240. ]
  241. },
  242. "matches": {
  243. "destination-ipv4-network": "0.0.0.0/0",
  244. "destination-port-range": {
  245. "lower-port": 80,
  246. "upper-port": 80
  247. },
  248. "protocol": 6,
  249. "source-ipv4-network": "0.0.0.0/0"
  250. },
  251. "rule-name": "c4473f5f-6b14-4e87-9c1e-813bc4568ad4"
  252. }
  253. ]
  254. },
  255. "acl-name": "c57b65ae-505a-4bdf-b436-cd5391b48628",
  256. "acl-type": "ietf-access-control-list:ipv4-acl"
  257. }
  258. ]
  259. }
  260. }
  261. root@controller00-neutron-server-container-65096b03:~# curl -H "Content-Type: application/json" -X GET --user admin:admin http://127.0.0.1:8181/restconf/config/service-function-forwarder:service-function-forwarders/ | python -m json.tool
  262. % Total % Received % Xferd Average Speed Time Time Time Current
  263. Dload Upload Total Spent Left Speed
  264. 100 1536 0 1536 0 0 89908 0 --:--:-- --:--:-- --:--:-- 96000
  265. {
  266. "service-function-forwarders": {
  267. "service-function-forwarder": [
  268. {
  269. "name": "Netvirt-Logical-SFF",
  270. "service-function-dictionary": [
  271. {
  272. "name": "testVNF2-connection-points",
  273. "sff-sf-data-plane-locator": {
  274. "sf-forward-dpl-name": "testVNF2-connection-points-ingress",
  275. "sf-reverse-dpl-name": "testVNF2-connection-points-egress",
  276. "sff-forward-dpl-name": "testVNF2-connection-points-ingress",
  277. "sff-reverse-dpl-name": "testVNF2-connection-points-egress"
  278. }
  279. },
  280. {
  281. "name": "testVNF1-connection-points",
  282. "sff-sf-data-plane-locator": {
  283. "sf-forward-dpl-name": "testVNF1-connection-points-ingress",
  284. "sf-reverse-dpl-name": "testVNF1-connection-points-egress",
  285. "sff-forward-dpl-name": "testVNF1-connection-points-ingress",
  286. "sff-reverse-dpl-name": "testVNF1-connection-points-egress"
  287. }
  288. }
  289. ],
  290. "sff-data-plane-locator": [
  291. {
  292. "data-plane-locator": {
  293. "service-function-forwarder-logical:interface-name": "8df74e00-e721-4df9-9513-9c1ed6023aa3",
  294. "transport": "service-locator:mac"
  295. },
  296. "name": "testVNF1-connection-points-egress"
  297. },
  298. {
  299. "data-plane-locator": {
  300. "service-function-forwarder-logical:interface-name": "220d6e7b-0a16-42db-be4c-ff5362fc3b37",
  301. "transport": "service-locator:mac"
  302. },
  303. "name": "testVNF2-connection-points-egress"
  304. },
  305. {
  306. "data-plane-locator": {
  307. "service-function-forwarder-logical:interface-name": "220d6e7b-0a16-42db-be4c-ff5362fc3b37",
  308. "transport": "service-locator:mac"
  309. },
  310. "name": "testVNF2-connection-points-ingress"
  311. },
  312. {
  313. "data-plane-locator": {
  314. "service-function-forwarder-logical:interface-name": "8df74e00-e721-4df9-9513-9c1ed6023aa3",
  315. "transport": "service-locator:mac"
  316. },
  317. "name": "testVNF1-connection-points-ingress"
  318. }
  319. ]
  320. }
  321. ]
  322. }
  323. }
  324. root@controller00-neutron-server-container-65096b03:~# curl -u admin:admin -H 'Content-type: application/json' -X GET http://127.0.0.1:8181/restconf/operational/rendered-service-path:rendered-service-paths/ | python -m json.tool
  325. % Total % Received % Xferd Average Speed Time Time Time Current
  326. Dload Upload Total Spent Left Speed
  327. 100 773 0 773 0 0 136k 0 --:--:-- --:--:-- --:--:-- 150k
  328. {
  329. "rendered-service-paths": {
  330. "rendered-service-path": [
  331. {
  332. "name": "Path-red_http-port-chain-Path-32",
  333. "parent-service-function-path": "Path-red_http-port-chain",
  334. "path-id": 32,
  335. "rendered-service-path-hop": [
  336. {
  337. "hop-number": 0,
  338. "service-function-forwarder": "Netvirt-Logical-SFF",
  339. "service-function-forwarder-logical:dpn-id": 154082732417954,
  340. "service-function-name": "testVNF2-connection-points",
  341. "service-index": 255
  342. },
  343. {
  344. "hop-number": 1,
  345. "service-function-forwarder": "Netvirt-Logical-SFF",
  346. "service-function-forwarder-logical:dpn-id": 154082732417954,
  347. "service-function-name": "testVNF1-connection-points",
  348. "service-index": 254
  349. }
  350. ],
  351. "reverse-path": false,
  352. "service-chain-name": "red_http-port-chain",
  353. "sfc-encapsulation": "service-locator:nsh",
  354. "starting-index": 255,
  355. "transport-type": "service-locator:vxlan-gpe"
  356. }
  357. ]
  358. }
  359. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement