aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-12-21Add get_vlan_tag_by_id()Steve McIntyre
Change-Id: I314f7fcdbf19b7f4fdcc5466236a3e8305291a2a
2014-12-19Implemented the backend for delete_vlan()Steve McIntyre
Change-Id: Ie70408c6ce52e8a520df86c77194a96ae196ef89
2014-12-19Fix syntax errorSteve McIntyre
Change-Id: Ia8819e00c7fc58f5bea87a24ed1d3485442c6219
2014-12-19Clarify commentsSteve McIntyre
Change-Id: I3f5ba2d3f0add1018733d656cccd769d0c212dd3
2014-12-19Add error-handling to create_vlanSteve McIntyre
Re-order slightly, and work out roll-back support If all changes worked ok on all switches, then *and only then* save config on all of them. Otherwise, we'll restart all the switches that *did* work after a failure, to reset their configurations back to that before we started. It's a nuclear and slow path, but it should work. Change-Id: Ic6008ae9cf65482671be2c40cc8d33b6b346c16c
2014-12-19Fix up self-test codeSteve McIntyre
switch_restart closes the connection itself Change-Id: I6eb045a211ea06be99064eafec497c891a0770cf
2014-12-19Added switch_restart method - use to force config rollbackSteve McIntyre
This will be horrendous to use, as it's a very slow operation. But AFAICS it's the only safe way to force a switch to revert config Used by error paths in complex API calls Change-Id: Ib042dacfcf026d754398dfb1f40d31f6e2a4f1cc
2014-12-19Add the backend for the create_vlan() APISteve McIntyre
Change-Id: I26995ed803e5dd42a56de07a8e5070dc10b41554
2014-12-19Add more synonmys for True and FalseSteve McIntyre
Change-Id: I0fe6d6fd11a4649f29be77895ed4f4de1fbc4277
2014-12-18Trivial changes suggested by pylintSteve McIntyre
Change-Id: I313d2838c292fa5791816102fcf57eb2641da99f
2014-12-18Minor re-flowSteve McIntyre
Change-Id: Iabcd3c18dd41fde973ad8a5ecd5a1040a498409e
2014-12-18Fix create_vlan argsSteve McIntyre
Change-Id: Ibbec0235d1428ea888c5bc3a53721129c8741f3d
2014-12-18Remove un-needed semicolonsSteve McIntyre
Change-Id: Ide7da425b457f609a58723bc618744cfc866e2c4
2014-12-18Remove un-needed importsSteve McIntyre
Change-Id: I06e9271df04d5791b0f44a88de709e13faafa129
2014-12-18Add JSON helper for serialising datetime objectsSteve McIntyre
Change-Id: I6454ba941d56a542df5433186a99fb1c0618b542
2014-12-18Typo fixSteve McIntyre
Change-Id: Iec74004b5fedecfeb6c4d8c8478e3b402df7c83d
2014-12-17Fix indenting after uncommenting. Ugh, python...Steve McIntyre
Change-Id: I65d2a3b6c28f7b1d6f62a1bb8539e4ba1dc554e5
2014-12-17Add _get_multi_elements2() and get_trunk_port_names_by_switch()Steve McIntyre
Sounds like a complicated lookup, but it's not! Change-Id: I4285ca4d4e7dfcc203f35e0bb719c27cff59006e
2014-12-17Add perform_vlan_update()Steve McIntyre
This is a very simple function, with almost no inline code. All the calls here are more complex, so have extra functions defined to do the work. Much neater Change-Id: I487863013de26457ec5f55050696eb52ceb0ea09
2014-12-17Clarify error messages and commentsSteve McIntyre
Change-Id: I0016b323de4c41fa2face877852b056f8eb562f2
2014-12-17Move debug code from vland to a helper function hereSteve McIntyre
Change-Id: I16b16cd5bc9be7c3ec42d56ebf95975d2fa504ce
2014-12-17Add vlan_update and vland_api callsSteve McIntyre
Change-Id: I4152360fe84b7d5746ef1e7a3f31b0b1e5f0f62e
2014-12-17Clarify comment about util calls slightlySteve McIntyre
Change-Id: Ic60cbcfd51706f362428d3fa72c2ab23ebe2c14b
2014-12-17Remove dead code for nowSteve McIntyre
Change-Id: I97c75b1199ce60ba97b9957812225d6530a11d45
2014-12-17Clarify help message slightlySteve McIntyre
Change-Id: I544ea4bbcfad3b977c9e737e068f0c3e0f0309d8
2014-12-17Reflow codeSteve McIntyre
Change-Id: Ifcfaff5328e797d5a7dfdfd18014bea6f09e7f26
2014-12-17Move the remaining admin DB calls to use vland_callSteve McIntyre
Change-Id: I961c401730c7eb2484a3a9422857ec9b5950ea22
2014-12-17Reflow code slightlySteve McIntyre
Change-Id: I93464065e8c5881727a976043058b1c7accf8b79
2014-12-17Move more of the admin calls to use call_vlandSteve McIntyre
admin.py will no longer have any direct calls to the database. All calls are now via IPC to the main process Change-Id: I5fec80137f942fd81db12ac4d4a2dc8b9b9d423c
2014-12-17Add the perform_db_update helper functionSteve McIntyre
Change-Id: I3e2e2ea21c053aa26efea673b077b3b9fe556edb
2014-12-17Pass InputErrors straight upSteve McIntyre
Change-Id: I35500c9fcf8675684b64103415bee435df415da4
2014-12-17Bug fix: call the right database method!Steve McIntyre
Change-Id: Ia582d8d21f1fd0710b3e57e5966dd9d9199e05ad
2014-12-17db is now passed in the state structureSteve McIntyre
Change-Id: I8f51d57cf841b9e0da8dbf2b535d54ce4e35c016
2014-12-17Add db_update call - APIs that only change database stateSteve McIntyre
Change-Id: I13b0191407e7d79981ada2ed3de3a5a444b3a472
2014-12-17Pass state to all the helper functions nowSteve McIntyre
Change-Id: I16cb5af6b31b1edf2638de59e5a8b95b077ba0ab
2014-12-17Move the database connection and default_vlan_id into stateSteve McIntyre
Change-Id: I13d8fc54b1c8af1d211552a1c82a102e245c6708
2014-12-16Add new admin CLI for daemon queriesSteve McIntyre
Change-Id: I07fffa6c0919934d1c447adbfa5d3fb50c06d574
2014-12-16Rename "query" to "db_query" in vland, so we can add "daemon_query"Steve McIntyre
Change-Id: I15479939062c8f6b68aa2567a983b3938cd9816e
2014-12-16Add a top-level state class to keep global state neaterSteve McIntyre
Change-Id: I22c6a63f73e8e3f96f0666a2b2309e746a3d64fa
2014-12-16Add perform_daemon_query() helper functionSteve McIntyre
Change-Id: I289456c0043938c70a77249aff93cd9aa3b7186b
2014-12-16Split up IPC queries betterSteve McIntyre
"query" is now "db_query", ready to add "daemon_query" Change-Id: I763f55ddf310d51a8be964971f3264fabf9774ca
2014-12-16Sea change in how admin code calls the database layerSteve McIntyre
Add IPC to VLANd All read-only admin DB query calls are now routed to the core VLANd process via IPC, and responses come back from there. Part-way to removing direct DB calls from admin.py, next is the DB calls that make changes. They're more involved. Change-Id: I6a993cd4c7b4e85c2a489ac96f9f0f58f087ca1d
2014-12-16More imports for admin codeSteve McIntyre
Change-Id: Ie041becb3c0882d239395d5943082f2b8a72f975
2014-12-16Lose the timestamp in the database, easier not to have itSteve McIntyre
Change-Id: Ia3804f36de28333177b4d3c992347678d7fa9f57
2014-12-15Make sure we can use the errors we've defined!Steve McIntyre
Change-Id: Ida2f02353bf08933f66e58d4a3e0af69b684d0f3
2014-12-15Minor updates to --statusSteve McIntyre
Move config stuff here Cosmetic tweaks Change-Id: I9e22ab89cde45b8af97559015f44bb4970b94994
2014-12-15Cosmetic change to output textSteve McIntyre
Change-Id: I6492657076acd85522945c830575ea567c8b1189
2014-12-15default_vlan_tag is now a config varSteve McIntyre
Change-Id: Iddd251ff031fd63fdb09e6b0a4a7ffd81833e0f8
2014-12-15Move initialisation of the default VLAN to vland mainSteve McIntyre
Change-Id: Iba1d9d3a6d1d56bfe4d45119e289f8a26d7dc9ee
2014-12-12Initial README contentsSteve McIntyre
Change-Id: Idea2ada9cb81c092f5e4d841267a5a08e85ea195