Age | Commit message (Collapse) | Author |
|
Add a new NotFoundError exception for use internally, so we can track
specific failure cases.
Also add a new Error class as a central place to store our error
numbers consistently.
In the API protocol, add a "NOTFOUND" error string alongside "ERROR"
to help the admin interface and other callers distinguish error cases
better.
In the admin interface, actually return distinct non-zero errors in
failure cases. Previously, almost all failures would have returned
suceesfully to the calling shell.
Change-Id: Ie382b737a80b7cd41c551e3a4a2a7e0827260bdc
|
|
Calls would have worked, but reported failure by falling through
Change-Id: Ia262caf55ab121c1dd5ee4c4fc44e65ad2975a10
|
|
Change-Id: Ie4c201b50803ef0e32cef19459088a215b95ed2d
|
|
Add a new table which will have one record, simply containing the
last-modified-time of the database as a whole. Will be useful for
caching in the visualisation layer.
Create the table at startup in the main VLANd process if it doesn't
exist, and create the record too.
Add code to update the record on all other changes to the database.
Add code to report it through the daemon.status() API call.
Change-Id: I503c4371c04accb2c3f91adecc3e8a8a8614ea90
|
|
Set the default to CRITICAL only, to simplify code. Add check for the
specified logging level, and a unit test for that.
Change-Id: I3ffa467f001dfdfb840f312bf0df8265aac58299
|
|
Catch and log InputError()
Catch and log ValueError() and report back to the API user
Change-Id: I1d7414baa4a84106439c37ad36be3578356a3371
|
|
Change-Id: I436319311192cc4ee8b29935b3acb69e0ba613e1
|
|
Change-Id: I2657a311d7ffe4e6e8110f60d3bc9b474672cd1a
|
|
Change-Id: Ia2af415eaf5146d81f5b7158af2db3bd68b0ffd1
|
|
Change-Id: Ie7faefef06aa0cf02b125b9ea7019b9647c5a6dd
|
|
Previous fix was buggy and rushed.
Change-Id: Ied61a46973135908e26ce8324c06a51fa64dcfa9
|
|
Don't attempt to add the trunk to the default VLAN; it's already going
to be there.
Change-Id: Id06ddf000eae7d6e5f9725a251dd057a150f9ca6
|
|
To help with visualisation, add trunks - containers to describe
inter-switch connections in the database.
This entails:
* a new table in the database called 'trunk' that contains nothing
but creation time and the trunk_id field.
* new trunk_id field in the port table, so that ports can either
belong to one trunk or to trunk # -1 (aka none)
Creating a trunk then entails:
* Creating a new entry in the trunk table
* Moving both ports to be attached to that trunk_id
Also added helper functions and admin functions to match.
Also plumbed through --lookup_ports_by_switch,
--lookup_ports_by_current_vlan, --lookup_ports_by_base_vlan.
Change-Id: I97f7aa9a14eecbfab9a57f5e776ad21c5944b369
|
|
Change-Id: Ie4d96828dfb2d6d09ce3123154cc586b6d15e97e
|
|
Change-Id: I3464f1fad1bd3d5c421dfa2db69ddce3b95f2603
|
|
Added in several places:
* database creation code
* port addition code
Change-Id: Id4e2bd2704d5b9660df8baad34abda0f613ba4f2
|
|
Change-Id: Ibabf1c88ec33aa382d3d35b5af468aeb3ee708a8
|
|
Change-Id: I85c7d98b0b717163ddefea35a2a022ce7c9c1973
|
|
If we find a switch reporting a port mode that's neither trunk nor
access, don't bail out. Instead, configure the port to be "access" and
treat it accordingly.
For our purposes, access ports are much more common so that's why I've
made this choice.
Change-Id: I8ab275aa24889ce4e5bb4253370cb74317eebce1
|
|
Change-Id: I18331ce5ec118b3aa3dc9a040771350221217f45
|
|
Change-Id: I07f0020d9d66a2fe763fd17215c2f08d86e2ed65
|
|
If we're at the point where we've found a major problem and think that
we need to reset the switches, actually write an error message to the
log first...
Change-Id: I1eed6691dd4331c6ced95ace80ffbf4a4f938417
|
|
Change-Id: I49ec436c97e09a72f820d6b46f1b7d9ee34d8a3e
|
|
Change-Id: Ie6ed4574ca8cb534feb3943905ac4e446d5dc999
|
|
Broken indentation -> broken behaviour. I hate python sometimes...
Change-Id: I164fdc87a5a04a333dcdeee0dae53ae51699bd2e
|
|
Change-Id: I9112ab123943a81e60d2c6bf096bc125e8e042b7
|
|
Change-Id: Iada53658d4fc2b936da79ccae16d95b6b218e7f0
|
|
Change-Id: Ib431d4858c24e1cd90248b9afc1fd1ebb482828c
|
|
Change-Id: I643aaf5f67ea0c85371d686cc8f703a5773efc7f
|
|
Switch from print to logging.X() where sensible
Change-Id: Ic691c64c581f6c20b7b8a1d46d25783782dd762e
|
|
Change-Id: Ia8b80a40735404e076b912e0a68b0cd9dda988a3
|
|
Change-Id: Idf1207a4460b4cfb114d4ca811ecf43742c49a9a
|
|
Save time and effort - keep track of the VLANs already set on a
switch's trunk ports and don't try to add them again later.
Change-Id: Ibeb76f568dac0b1a7eb67c1648cbd15e5680bf06
|
|
Change-Id: Idb2060dbd2829d6d399c1c1b45cf1641e1619eee
|
|
Change-Id: Idf4c5b51eee433f5af7721b5c63c4d4f0792983d
|
|
Change-Id: I137a67cab9ffef7616af78e7c089398ddb94dbaa
|
|
Change-Id: I9cef69af28264d62b0c175e97cb76b769b343c1d
|
|
It won't work, and causes errors.
Change-Id: Ie66630a825a247ecdd5f1620ce0be8fda3e2755e
|
|
"is not" doesn't work here. :-(
Change-Id: I6e9db2ab64a7b7468a705bc6a534a9ada209bd95
|
|
Change-Id: I3b48a4bbd33fe46dfebae9994ca1a1035edf7a3c
|
|
Make sure we clean up properly and close connections.
Change-Id: Iec3fede61615d4f9e4a5561006c182e7785c1977
|
|
Change-Id: If9c24c84fd8034fc7211717edeed4c4f2d9a9144
|
|
Change-Id: Ib1ff816ad5cbc6876e5dc500817444150d335bcd
|
|
Change-Id: Ic98e802fae172d1af202e0e09f67c548cb307d6a
|
|
More debug on the daemon side
Cope with different VLAN setups for trunk ports
We can't use set_port_mode() - add trunk ports by hand here
Change-Id: Id8e001f5cf5f8a40cb4e4f88a9f1241aaf77f323
|
|
from switch to switch...
Change-Id: I7df9c821b48bd71e9211cf3065b179b481486909
|
|
Change-Id: Id8930e6827dfd88a848e10c5c0507813f90e7660
|
|
Change-Id: I25953be83ede4e9edea7c5c97266420b965b10d9
|
|
Change-Id: I761f62cfc2b08ba348c76137a3f658121b115739
|
|
Change-Id: I7c45429b08e26f8e1aaf55b5e2364be28b8f8b19
|