]> xenbits.xensource.com Git - people/iwj/colo-for-testing.git/commitdiff
convert-cabinet-layout: mkpxedir
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 12 Mar 2015 18:53:31 +0000 (18:53 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 12 Mar 2015 18:53:31 +0000 (18:53 +0000)
convert-cabinet-layout

index 0d1572df008995fc801006600a96ed7f213481e4..4a1b68b6d1fc71e19f369e9782433f3b05aaf8e2 100755 (executable)
@@ -89,9 +89,9 @@ our %dests;
 our %outfor;
 our $ndests=0;
 
-sub outfor ($$) {
-    my ($dest,$s) = @_;
-    $dests{$dest} //= $ndests++;
+sub outfor ($$;$) {
+    my ($dest,$s,$pri) = @_;
+    $dests{$dest} //= ($pri // $ndests++);
     $outfor{$dest} .= $s;
 }
 
@@ -213,8 +213,19 @@ while (my $row = csv_row()) {
 }
 
 if (defined $createlike) {
-    outfor "mg-hosts",
-    "./mg-hosts create-like $createlike ".(join ",", @machines)."\n";
+    outfor "create",
+    "./mg-hosts create-like $createlike ".(join ",", @machines)."\n",
+    -1;
+
+    outfor "mkpxe",
+    "./mg-allocate @machines\n",
+    100;
+
+    outfor "mkpxe",
+    "./mg-hosts mkpxedir @machines\n";
+
+    outfor "mkpxe",
+    "./mg-allocate ".(join " ", map { "!$_" } @machines)."\n";
 }
 
 if (@flags) {