nodenetwork sequels
Thierry Parmentelat [Fri, 23 May 2008 12:27:51 +0000 (12:27 +0000)]
system/TestNode.py
system/selftest

index 7e822fd..5b38823 100644 (file)
@@ -81,7 +81,7 @@ class TestNode:
                     for (attribute,value) in interface['settings'].iteritems():
                         # locate node network
                         nn = server.GetInterfaces(userauth,{'ip':interface['network_fields']['ip']})[0]
-                        nnid=nn['nodenetwork_id']
+                        nnid=nn['interface_id']
                         # locate or create node network attribute type
                         try:
                             nnst = server.GetInterfaceSettingTypes(userauth,{'name':attribute})[0]
index 47f5d88..a14be16 100755 (executable)
@@ -133,8 +133,8 @@ DeleteSite("$TESTSITE")
 AddSite({"name":"$TESTNAME","url":"$TESTURL","max_slices":10,"login_base":"$TESTSITE","is_public":True,"abbreviated_name":"$TESTABR"})
 # create a test node for qemu
 AddNode("st",{"boot_state":"rins","model":"qemu/minhw","hostname":"$TESTHOST","version":"$TESTVERS"})
-# set up the nodenetwork setting for qemu
-AddNodeNetwork("$TESTHOST",{"network":"10.0.2.0","hostname":"$TESTHOST","is_primary":True,"dns1":"$SELF_IP","method":"static","type":"ipv4","netmask":"255.255.255.0","broadcast":"10.0.2.255","gateway":"10.0.2.2"})
+# set up the interface setting for qemu
+AddInterface("$TESTHOST",{"network":"10.0.2.0","hostname":"$TESTHOST","is_primary":True,"dns1":"$SELF_IP","method":"static","type":"ipv4","netmask":"255.255.255.0","broadcast":"10.0.2.255","gateway":"10.0.2.2"})
 # Download the node's boot cd iso
 GetBootMedium("$TESTHOST","node-floppy","$TESTCONF")
 EOF