aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config/tests
AgeCommit message (Collapse)AuthorFilesLines
2015-01-14Add sample and cli test for simple interface configSteven Hardy1-0/+9
Adds a simple example showing how an individual interface can be configured, e.g outside of a bond etc. Change-Id: I05dcb4fabe718686e306bdc719b32f0fb40c1b5e
2014-09-18Update child_members to use a SetDan Prince1-2/+4
Updates the impl_ifcfg.child_members method so that it uses a set instead of an array (this avoids dups). Also fixes an issue with this method which would cause tests to fail intermittently due to ordering differences. Adding each member object regardless solves this (not sure why I had commented out the children.append before) Also fixes an issue in test_cli which causes tests to fail on Debian which doesn't yet support the add_bond method on its ENI provider. This fix was to explicitly set --provider=ifcfg on the failing tests. We should be able to remove these once ENI supports bonding properly. Closes-bug: #1370615 Change-Id: Id9cfa2b2eaab27c93113956f5956facfa2a2aeee
2014-08-25ifcfg: restart child interfaces on updatesDan Prince1-5/+55
If a top level bridge or bond is modified we also want to restart the child interfaces.
2014-08-22Fix a few pep8 issues...Dan Prince1-2/+0
2014-08-22Add support for ovs_extra.Dan Prince2-0/+47
Adds support for ovs_extra to the OVS Bridge and OVS bond objects.
2014-08-20Add support for parsing YAMLDan Prince1-0/+70
Adds new YAML examples. Also adds some new CLI test cases which compare --noop stdout (from the CLI) for the json and yaml examples to verify they generate the same things.
2014-08-20Add nic1, nic2 naming abstractionDan Prince3-0/+129
Implements a new active NIC abstraction and naming convention that allows nic1, nic2, etc. to be translated to actual (active) network device names like em1, em2 (or eth0, eth1). This includes some logic to map ordered active nics to the nic1, nic2 naming scheme. Embedded nics are always listed first (in sort order) followed by any other active Nics on the system. With the new code: {"type": "interface", "name": "nic1" } is automatically translated (internally) to: {"type": "interface", "name": "em1" } This works for all top level "interface" devices, vlans, bonds, and bridges alike. For vlans the 'device' name is translated instead of the device name per vlan object conventions.
2014-08-15ifcfg: Exclude ifcfg-lo from cleanupDan Prince1-1/+13
This interface should always exist... we don't want to clean it up.
2014-08-14Add --cleanup, and impl for ifcfgDan Prince1-0/+12
Adds a new cleanup option which can be used to ifdown and remove interfaces that exists but aren't specified in the object model (or JSON).
2014-08-14Use underscores for provider function names.Dan Prince2-37/+37
2014-08-12Set the MAC to the primary interfaceDan Prince3-0/+66
Adds support for a new 'primary' interface option exposed via the object model and JSON parsers which can be used to force the MAC address on a bridge. Only one interface on a given bridge (or bond) may be set as the primary interface. Also, update the ifcfg and eni providers so that they use OVS_EXTRA (or ovs_extra) to pin the mac accordingly.
2014-07-09Don't write 'None' to ifcfg route files.Dan Prince1-2/+6
Corrects an issue where 'None' got written into the ifcfg format route files instead of ''.
2014-07-07Add copyrights to files.Dan Prince5-14/+8
2014-07-03ENI: bring up bridges first on DebianDan Prince1-1/+1
We should bring up the interfaces on boot in the same order with which we bring them up in this tool.
2014-07-02ENI: enable 'auto' on bridges by defaultDan Prince1-1/+2
2014-07-02ifcfg: don't call set Interface for vlans...Dan Prince1-2/+0
Drop the 'set Interface $DEVICE external-ids:iface-id=...' config from ifcfg ovs vlans.
2014-07-02Add vlan support for the ENI implementation.Dan Prince1-2/+28
2014-07-02ENI fixes for v4/v6 ips. DHCP test fixes.Dan Prince1-26/+38
Updates the ENI format so it creates multiple config sections for a single os-net-config interface object if both v4 and v6 IP addresses are defined. Also, fixes several of the test so that DHCP is not enabled on OvsPorts. If an OVS port is part of a bridge that is itself using DHCP we don't also need to run DHCP on the OvsPort interface.
2014-07-01Implement object json parsing functions.Dan Prince1-0/+138
Adds a from_json static method to all objects. Also adds a top level object_from_json function that can be used for all the interface and bridge types. (everything except addresses and routes). This should be useful for wiring processing JSON from the CLI.
2014-06-26Add OvsBond object and impl for ifcfg format.Dan Prince1-1/+31
Supports the configuration of OVS bond interfaces. Also adds the ability to configure extra OVS_OPTIONS for both bonds and bridges (useful for some modes of operation)
2014-06-26Consolidate OVS_EXTRA for the vlan test.Dan Prince1-3/+4
Consolidates the test data into a single string block for the ovs vlan port test string.
2014-06-25Vlan object and support for ifcfg.Dan Prince2-4/+52
Add ifcfg configuration support for Vlans and Vlan OVS ports.
2014-06-24Initial commit for basic ENI Debian/Ubuntu network configmarios1-0/+162
This uses /etc/network/interfaces single file format. Includes basic tests
2014-06-11Add OvsBridge configuration supportDan Prince1-20/+77
Adds new object for OvsBridge. Also update the ifcfg network config class to support adding bridges. As part of the change both the bridge and interface classes extend a _BaseOpts base class.
2014-06-10Implement apply for ifcfg implementationDan Prince1-18/+63
Adds an apply function to the ifcfg implementation which: 1) Shuts down existing interfaces w/ ifdown 2) writes new interfaces config files (routes too) 3) Starts up new interfaces w/ ifup
2014-06-09Initial ifcfg implementation for interfaces/routesDan Prince2-0/+123
Ifcfg formatted persistence for interfaces and routes.
2014-06-09Add interface, address, and route objectsDan Prince3-3/+10
Add some initial objects for interfaces, routes and addresses.
2014-06-06Initial commitDan Prince3-0/+94
Initial commit of the project layout