File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ public function Create($params = array())
135135
136136 $ this ->debug (Lang::translate ('Server::Create() [%s] ' ), $ this ->name );
137137
138- $ create = $ this ->CreateJson ();
138+ $ create = $ this ->CreateJson ($ params );
139139
140140 $ response = $ this ->Service ()->Request (
141141 $ this ->Service ()->Url (), 'POST ' , array (), $ create );
@@ -528,14 +528,16 @@ public function Console($type='novnc') {
528528 * create {rebuild ...} by changing this parameter
529529 * @return json
530530 */
531- protected function CreateJson ()
531+ protected function CreateJson (array $ params = array () )
532532 {
533533 // create a blank object
534534 $ obj = new \stdClass ();
535535
536536 // set a bunch of properties
537537 $ obj ->server = new \stdClass ();
538538
539+ foreach ($ params as $ key => $ ignore )
540+ $ obj ->server ->$ key = $ this ->$ key ;
539541 $ obj ->server ->imageRef = $ this ->imageRef ;
540542 $ obj ->server ->name = $ this ->name ;
541543 $ obj ->server ->flavorRef = $ this ->flavorRef ;
Original file line number Diff line number Diff line change 6767// create it
6868print ("Creating server... " );
6969$ server ->Create (array (
70+ 'OS-DCF:diskConfig ' => 'MANUAL ' ,
7071 'image ' => $ myimage ,
7172 'flavor ' => $ myflavor ));
7273print ("requested, now waiting... \n" );
You can’t perform that action at this time.
0 commit comments