Closed naved001 closed 6 years ago
This comment by @zenhack
In short, if we wanted to deploy HIL in an environment without disturbing the pre-existing configuration; this patch would always remove the old config and start afresh.
But now that I think of it, if there's some pre-existing configuration then we would want HIL to have it in its database; so are we expecting HIL admins to manually edit the database? because I can't think of any other way of syncing a switchport status with HIL database. cc @zenhack
Okay, yeah, I want to think more carefully about the details of retrofitting HIL onto an existing setup before we put some option to try to support it. Will mull it over.
because I can't think of any other way of syncing a switchport status with HIL database
get_port_networks()
gets half the info. We would still need to create networks in HIL (network label with a net id). And what if the networks on the switch fall outside the range of HIL allocation pool? do they become admin networks then?
@SahilTikale @zenhack any thoughts?
I'm tempted to suggest that we ignore that use case entirely for now, and deal with it separately. We're not really breaking anything, since you'd have to do some careful mucking with things (bordering on black magic) to get this to work as-is.
@SahilTikale @zenhack got rid of the config file changes, and rebased this PR.
I just gotta fix the plethora of failed tests, sigh.
Fixing the unit tests requires some work. So everywhere we do port_connect_nic()
we need to follow it with deferred.apply_networking()
. Is there a smart way of doing this, or do I go about changing all files?
Some of the tests fail locally for postgres but they don't stall like travis ci. :/c
@SahilTikale @zenhack ping
closing this, we'll implement something like this in the CLI then.
Issue #761
This puts the switchport in a state HIL expects* it to be. So admins don't have to worry about clearing the switchport before registration
Update the deployment tests and the sample config files to work with it.
If this seems reasonable I'll add some unit tests for this.
Again, should probably rebase this one once/if my other 2 PRs are merged (just to be safe).