File tree Expand file tree Collapse file tree 5 files changed +90
-0
lines changed
samples/compute/v2/servers
tests/integration/Compute/v2 Expand file tree Collapse file tree 5 files changed +90
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ require 'vendor/autoload.php ' ;
4
+
5
+ $ openstack = new OpenStack \OpenStack ([
6
+ 'authUrl ' => '{authUrl} ' ,
7
+ 'region ' => '{region} ' ,
8
+ 'user ' => [
9
+ 'id ' => '{userId} ' ,
10
+ 'password ' => '{password} '
11
+ ],
12
+ 'scope ' => ['project ' => ['id ' => '{projectId} ' ]]
13
+ ]);
14
+
15
+ $ compute = $ openstack ->computeV2 (['region ' => '{region} ' ]);
16
+
17
+ $ server = $ compute ->getServer (['id ' => '{serverId} ' ]);
18
+
19
+ $ console = $ server ->getRDPConsole ();
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ require 'vendor/autoload.php ' ;
4
+
5
+ $ openstack = new OpenStack \OpenStack ([
6
+ 'authUrl ' => '{authUrl} ' ,
7
+ 'region ' => '{region} ' ,
8
+ 'user ' => [
9
+ 'id ' => '{userId} ' ,
10
+ 'password ' => '{password} '
11
+ ],
12
+ 'scope ' => ['project ' => ['id ' => '{projectId} ' ]]
13
+ ]);
14
+
15
+ $ compute = $ openstack ->computeV2 (['region ' => '{region} ' ]);
16
+
17
+ $ server = $ compute ->getServer (['id ' => '{serverId} ' ]);
18
+
19
+ $ console = $ server ->getSerialConsole ();
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ require 'vendor/autoload.php ' ;
4
+
5
+ $ openstack = new OpenStack \OpenStack ([
6
+ 'authUrl ' => '{authUrl} ' ,
7
+ 'region ' => '{region} ' ,
8
+ 'user ' => [
9
+ 'id ' => '{userId} ' ,
10
+ 'password ' => '{password} '
11
+ ],
12
+ 'scope ' => ['project ' => ['id ' => '{projectId} ' ]]
13
+ ]);
14
+
15
+ $ compute = $ openstack ->computeV2 (['region ' => '{region} ' ]);
16
+
17
+ $ server = $ compute ->getServer (['id ' => '{serverId} ' ]);
18
+
19
+ $ console = $ server ->getSpiceConsole ();
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ require 'vendor/autoload.php ' ;
4
+
5
+ $ openstack = new OpenStack \OpenStack ([
6
+ 'authUrl ' => '{authUrl} ' ,
7
+ 'region ' => '{region} ' ,
8
+ 'user ' => [
9
+ 'id ' => '{userId} ' ,
10
+ 'password ' => '{password} '
11
+ ],
12
+ 'scope ' => ['project ' => ['id ' => '{projectId} ' ]]
13
+ ]);
14
+
15
+ $ compute = $ openstack ->computeV2 (['region ' => '{region} ' ]);
16
+
17
+ $ server = $ compute ->getServer (['id ' => '{serverId} ' ]);
18
+
19
+ $ console = $ server ->getVncConsole ();
Original file line number Diff line number Diff line change @@ -180,6 +180,9 @@ public function runTests()
180
180
// Limits
181
181
$ this ->getLimits ();
182
182
$ this ->getHypervisorsStatistics ();
183
+
184
+ // Console
185
+ $ this ->getVncConsole ();
183
186
} finally {
184
187
// Teardown
185
188
$ this ->deleteServer ();
@@ -647,4 +650,15 @@ private function detachVolumeFromServer()
647
650
648
651
$ this ->logStep ('Detached volume attachments for server {serverId} ' , $ replacements );
649
652
}
653
+
654
+ private function getVncConsole ()
655
+ {
656
+ $ replacements = [
657
+ '{serverId} ' => $ this ->serverId
658
+ ];
659
+
660
+ require_once $ this ->sampleFile ($ replacements , 'servers/get_server_vnc_console.php ' );
661
+
662
+ $ this ->logStep ('Get VNC console for server {serverId} ' , $ replacements );
663
+ }
650
664
}
You can’t perform that action at this time.
0 commit comments