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

Missing compliance tests / nomenclature violations #52

Open
mat128 opened this issue Jan 12, 2016 · 2 comments
Open

Missing compliance tests / nomenclature violations #52

mat128 opened this issue Jan 12, 2016 · 2 comments

Comments

@mat128
Copy link
Contributor

mat128 commented Jan 12, 2016

The following methods have been identified as violating the nomenclature guidelines. Proper compliance tests for those would help us move forward.

$ grep 'TODO' -A1 netman/core/objects/switch_base.py
    # TODO(mmitchell): Should be called unset_access_vlan
    def remove_access_vlan(self, interface_id):
--
    # TODO(mmitchell): Should be called set_interface_state
    def shutdown_interface(self, interface_id):
--
    # TODO(mmitchell): Should be part of set_interface_state
    def openup_interface(self, interface_id):
--
    # TODO(mmitchell): Should be called set_native_vlan
    def configure_native_vlan(self, interface_id, vlan):
--
    # TODO(mmitchell): Should be called unset_native_vlan
    def remove_native_vlan(self, interface_id):
--
    # TODO(mmitchell): Should be called unset_vlan_access_group
    def remove_vlan_access_group(self, vlan_number, direction):
--
    # TODO(mmitchell): Should be called unset_vlan_vrf
    def remove_vlan_vrf(self, vlan_number):
--
    # TODO(mmitchell): Should be called unset_interface_description
    def remove_interface_description(self, interface_id):
--
    # TODO(mmitchell): Should be called set_interface_spanning_tree_state
    def edit_interface_spanning_tree(self, interface_id, edge=None):
--
    # TODO(mmitchell): Should be called unset_bond_description
    def remove_bond_description(self, number):
--
    # TODO(mmitchell): Should be called set_bond_native_vlan
    def configure_bond_native_vlan(self, number, vlan):
--
    # TODO(mmitchell): Should be called unset_bond_native_vlan
    def remove_bond_native_vlan(self, number):
--
    # TODO(mmitchell): Should be called set_bond_interface_spanning_tree_state
    def edit_bond_spanning_tree(self, number, edge=None):
--
    # TODO(mmitchell): Should be called set_interface_lldp_state
    def enable_lldp(self, interface_id, enabled):
@emmurd
Copy link
Contributor

emmurd commented Feb 1, 2016

# TODO(mmitchell): Should be called set_interface_state
def shutdown_interface(self, interface_id):

# TODO(mmitchell): Should be part of set_interface_state
def openup_interface(self, interface_id):

So these two methods should be merge together and a second parameter define the action to perform?

@emmurd
Copy link
Contributor

emmurd commented Feb 5, 2016

There's only two methods left to refactorate due to responsability issue :

# TODO(mmitchell): Should be called set_interface_spanning_tree_state
def edit_interface_spanning_tree(self, interface_id, edge=None):

# TODO(mmitchell): Should be called set_bond_interface_spanning_tree_state
def edit_bond_spanning_tree(self, number, edge=None):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants