python-openflow icon indicating copy to clipboard operation
python-openflow copied to clipboard

Remove parameter value from pack and get_size

Open beraldoleal opened this issue 9 years ago • 3 comments

In an ideal world is not necessary to do object.pack(another_object) or obj.get_size(something).

beraldoleal avatar Oct 06 '16 18:10 beraldoleal

If the 'work_or_pass' logic is accepted https://github.com/kytos/python-openflow/commit/a4c1f0535d9e1a796c85785e525278a0e4490943, removing the 'value' parameter becomes very natural. (there are almost no calls to pack with a value parameter left).

If a different value needs to be packed, it should be done initializing a new instance with the value, and then calling the corresponding pack function.

erickvermot avatar Jul 18 '17 16:07 erickvermot

@erickvermot, if you had to do it based on master branch, without any other pending PR, what would be the simplest solution?

cemsbr avatar Jul 18 '17 17:07 cemsbr

I'd do the changes in https://github.com/kytos/python-openflow/commit/a4c1f0535d9e1a796c85785e525278a0e4490943, without the need to implement the work_or_pass function.

It is a very simple solution. Why, this commit is not planned to be accepted?

erickvermot avatar Jul 18 '17 17:07 erickvermot