Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type inconsistency when setting a connection's ingress/egress ports #63

Open
sajith opened this issue Oct 18, 2022 · 0 comments
Open

Type inconsistency when setting a connection's ingress/egress ports #63

sajith opened this issue Oct 18, 2022 · 0 comments
Assignees
Labels
bug Something isn't working ci/cd

Comments

@sajith
Copy link
Member

sajith commented Oct 18, 2022

Per set_ingress_port()'s docstring, the ingress_port argument is a Port. However, it is passed onto PortHandler.import_port_data() which seems to expect JSON.

#setter
def set_ingress_port(self, ingress_port):
"""Sets the ingress_port of this Connection.
:param ingress_port: The ingress_port of this Connection. # noqa: E501
:type: Port
"""
if ingress_port is None:
raise ValueError("Invalid value for `ingress_port`, must not be `None`") # noqa: E501
port_handler = PortHandler()
self._ingress_port = port_handler.import_port_data(ingress_port)
return self.ingress_port

It is similar for set_egress_port() too:

def set_egress_port(self, egress_port):
"""Sets the egress_port of this Connection.
:param egress_port: The egress_port of this Connection. # noqa: E501
:type: Port
"""
if egress_port is None:
raise ValueError("Invalid value for `egress_port`, must not be `None`") # noqa: E501
port_handler = PortHandler()
self._egress_port = port_handler.import_port_data(egress_port)
return self.egress_port

Related to #61, probably.

@sajith sajith added bug Something isn't working ci/cd labels Oct 18, 2022
@sajith sajith self-assigned this Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci/cd
Projects
Development

No branches or pull requests

1 participant