Ask Your Question
0

Unable to create SFC - ACL

asked 2016-03-21 02:26:38 -0700

srik1782 gravatar image

Hi, I am using Opendaylight – Beryllium release. When I try to create ACL with the below JSON data, ACL not creating:

Request URL http://<odl-ip>:8181/restconf/config/ietf-access-control-list:access-lists/

NOT WORKING JSON Data:

{ 'acl': [ { 'acl-name': u'myclass', 'access-list-entries': { 'ace': [ {'matches': { 'destination-port-range': {'lower-port': 80, 'upper-port': 80}, 'protocol': 6}, 'actions': {'netvirt-sfc-acl:rsp-name': u'Path-mychain-Path-24'}, 'rule-name': u'myclass'} ] } } ] }

But, If I give ‘matches’ key value to ‘{}’, ACL is creating.

WORKING JSON Data:

{ 'acl': [ { 'acl-name': u'myclass', 'access-list-entries': { 'ace': [ {'matches': {}, 'actions': {'netvirt-sfc-acl:rsp-name': u'Path-mychain-Path-24'}, 'rule-name': u'myclass'} ] } } ] }

Can anyone let me know the correct JSON data format for ‘matches’?

Regards, Srikanth.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2016-03-21 10:26:30 -0700

srik1782 gravatar image

ODL API is expecting 'source-port-range' also in the JSON body. So, the JSON format should be the following:

{ 'acl': [ { 'acl-name': u'myclass', 'access-list-entries': { 'ace': [ {'matches': { 'destination-port-range': {'lower-port': 80, 'upper-port': 80, 'source-port-range': {'lower-port': 80, 'upper-port': 80}, 'protocol': 6}, 'actions': {'netvirt-sfc-acl:rsp-name': u'Path-mychain-Path-24'}, 'rule-name': u'myclass'} ] } } ] }

It seems, it is a bug in ODL Berrylium.

Regards, Srikanth.

edit flag offensive delete publish link more

Comments

You may use https://bugs.opendaylight.org/ to file a bug on this. thanks, George

gzhao ( 2016-03-24 14:59:13 -0700 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2016-03-21 02:26:38 -0700

Seen: 118 times

Last updated: Mar 21 '16