Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #45 from midokura/rossella/master
Browse files Browse the repository at this point in the history
Code modified to use the new Range object for Rule
  • Loading branch information
Tomoe Sugihara committed Jul 19, 2013
2 parents f6d7b01 + fed1e61 commit c1af564
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/midonet/nova/network/midonet_lib.py
Expand Up @@ -260,6 +260,8 @@ def create_for_sg(self, tenant_id, sg_id, sg_name, rule):
# set data for midonet rule
tp_src_start = tp_src_end = icmp_type
tp_dst_start = tp_dst_end = icmp_code
tp_src = {'start': tp_src_start, 'end': tp_src_end}
tp_dst = {'start': tp_dst_start, 'end': tp_dst_end}

# create an accept rule
properties = self._properties(rule['id'])
Expand All @@ -269,10 +271,8 @@ def create_for_sg(self, tenant_id, sg_id, sg_name, rule):
.nw_proto(nw_proto)\
.nw_src_address(nw_src_address)\
.nw_src_length(nw_src_length)\
.tp_src_start(tp_src_start)\
.tp_src_end(tp_src_end)\
.tp_dst_start(tp_dst_start)\
.tp_dst_end(tp_dst_end)\
.tp_src(tp_src)\
.tp_dst(tp_dst)\
.properties(properties)\
.create()

Expand Down

0 comments on commit c1af564

Please sign in to comment.