Пример #1
0
 def configure_network(self, **kwargs):
     dhcp = kwargs.get("dhcp", False)
     utils.mount_nics(self.c_resources)
     # TODO(msimonin): run dhcp if asked
     if dhcp:
         utils.dhcp_interfaces(self.c_resources)
     return self.c_resources
Пример #2
0
 def test_primary(self, mock__mount_secondary_nics,
                  mock_get_cluster_interfaces):
     utils.mount_nics(self.c_resources)
     self.assertCountEqual([("en0", ["n1", "n2"])],
                           self.c_resources["machines"][0]["_c_nics"])
Пример #3
0
 def configure_network(self):
     dhcp = self.configuration.get("dhcp", False)
     utils.mount_nics(self.c_resources)
     if dhcp:
         utils.dhcp_interfaces(self.c_resources)
     return self.c_resources