CCI-MOC / hil

Hardware Isolation Layer, formerly Hardware as a Service
Apache License 2.0
24 stars 54 forks source link

Implement method to shut off a port #1063

Closed naved001 closed 3 years ago

naved001 commented 3 years ago

Doing this prevents the switchport from sitting on default VLAN 1.

The switchport is only turned on only when we need to configure a vlan.

Closes: https://github.com/CCI-MOC/hil/issues/970

I think it's safer to turn off the switchport entirely than fiddle with trunk-no-native-vlan mode which depends on the NOS version.

naved001 commented 3 years ago

I'll run the deployment tests before merging this just to be sure everything works (and that the other methods work without having to turn on the switchport).

naved001 commented 3 years ago

With the new commit the deployment tests pass.

(.venv) naved-work::~/hil-all/brocade-default-vlan-fix$py.test tests/deployment/*networks.py
=========================================================== test session starts ============================================================
platform linux2 -- Python 2.7.15rc1, pytest-3.5.1, py-1.7.0, pluggy-0.6.0
rootdir: /home/naved/hil-all/brocade-default-vlan-fix, inifile: setup.cfg
plugins: requests-mock-1.5.2, xdist-1.24.1, forked-1.0.1, cov-2.6.0
collected 3 items                                                                                                                          

tests/deployment/multi_networks.py .                                                                                                 [  0%]
tests/deployment/native_networks.py .                                                                                                [  0%]
tests/deployment/vlan_networks.py .

======================================================== 3 passed in 119.12 seconds ========================================================
knikolla commented 3 years ago

Is the travis-ci broken?

naved001 commented 3 years ago

not sure why it's not starting on cci-moc/hil, but on my fork I see this: https://travis-ci.org/github/naved001/hil/jobs/743249119 we haven't been maintaining this repository for a while now and things have become outdated.

knikolla commented 3 years ago

Do you think it is worth investigating? I am okay with merging this without a proper CI if you have run the tests locally.

naved001 commented 3 years ago

I am gonna go ahead and merge then since the failures are unrelated to the changes I made.

I did run the deployment tests locally from an old virtualenv so I didn't run into the issues that travis-ci is having.

I am gonna open an issue to know that the CI needs to be fixed, in case we ever come back to HIL.