Enabling iwhd to use a variable setting for the network.
diff -uNr iwhd-1.5/dc-rhev-image.c iwhd-1.5.network/dc-rhev-image.c --- iwhd-1.5/dc-rhev-image.c 2012-01-06 12:40:26.000000000 -0200 +++ iwhd-1.5.network/dc-rhev-image.c 2013-01-24 21:23:37.420097269 -0200 @@ -95,6 +95,7 @@ char *nfsdir; time_t import_timeout; char *cluster; + char *network_name; };
struct http_uri { @@ -1805,7 +1806,7 @@ if (rc < 0) goto err_xml;
rc = xmlTextWriterWriteElement(writer, - BAD_CAST "rasd:Caption", BAD_CAST "Ethernet 0 rhevm"); + BAD_CAST "rasd:Caption", BAD_CAST "Ethernet 0"); if (rc < 0) goto err_xml; rc = xmlTextWriterWriteElement(writer, BAD_CAST "rasd:InstanceId", BAD_CAST "3"); @@ -1818,7 +1819,7 @@ BAD_CAST "rasd:ResourceSubType", BAD_CAST "3"); if (rc < 0) goto err_xml; rc = xmlTextWriterWriteElement(writer, - BAD_CAST "rasd:Connection", BAD_CAST "rhevm"); + BAD_CAST "rasd:Connection", BAD_CAST cfg->network_name); if (rc < 0) goto err_xml; rc = xmlTextWriterWriteElement(writer, BAD_CAST "rasd:Name", BAD_CAST "eth0"); @@ -2559,6 +2560,8 @@
cfg_veripick(&cfg.cluster, cfgname, jcfg, "cluster");
+ cfg_veripick(&cfg.network_name, cfgname, jcfg, "network_name"); + json_decref(jcfg); jcfg = NULL;
-- Vagner Farias vfarias@redhat.com
aeolus-devel@lists.fedorahosted.org