Add PIF.currently_attached to the list of fields used by interface-reconfigure
authorIan Campbell <ian.campbell@citrix.com>
Wed, 9 Sep 2009 17:09:01 +0000 (18:09 +0100)
committerBen Pfaff <blp@nicira.com>
Wed, 9 Sep 2009 17:41:41 +0000 (10:41 -0700)
xenserver/opt_xensource_libexec_interface-reconfigure

index f4afc9f31f277427eb07d7de3424c27c9aa45dd4..fdb91abe5595172f1d27cc3e30e7a2a0e416de0c 100755 (executable)
@@ -370,6 +370,12 @@ PIF_ATTRS = { 'uuid': (str_to_xml,str_from_xml),
               'MAC': (str_to_xml,str_from_xml),
               'other_config': (lambda x, p, t, v: otherconfig_to_xml(x, p, v, PIF_OTHERCONFIG_ATTRS),
                                lambda n: otherconfig_from_xml(n, PIF_OTHERCONFIG_ATTRS)),
+              
+              # Special case: We write the current value
+              # PIF.currently-attached to the cache but since it will
+              # not be valid when we come to use the cache later
+              # (i.e. after a reboot) we always read it as False.
+              'currently_attached': (bool_to_xml, lambda n: False),
             }
 
 PIF_OTHERCONFIG_ATTRS = [ 'domain', 'peerdns', 'defaultroute', 'mtu', 'static-routes' ] + \