6
6
7
7
class Api extends AbstractApi
8
8
{
9
+ private $ pathPrefix = '/v2.0/ ' ;
10
+
9
11
public function __construct ()
10
12
{
11
13
$ this ->params = new Params ();
@@ -21,7 +23,7 @@ public function getSecurityGroups()
21
23
{
22
24
return [
23
25
'method ' => 'GET ' ,
24
- 'path ' => 'security-groups ' ,
26
+ 'path ' => $ this -> pathPrefix . 'security-groups ' ,
25
27
'params ' => [],
26
28
];
27
29
}
@@ -35,7 +37,7 @@ public function postSecurityGroups()
35
37
{
36
38
return [
37
39
'method ' => 'POST ' ,
38
- 'path ' => 'security-groups ' ,
40
+ 'path ' => $ this -> pathPrefix . 'security-groups ' ,
39
41
'jsonKey ' => 'security_group ' ,
40
42
'params ' => [
41
43
'description ' => $ this ->params ->descriptionJson (),
@@ -54,7 +56,7 @@ public function getSecurityGroup()
54
56
{
55
57
return [
56
58
'method ' => 'GET ' ,
57
- 'path ' => 'security-groups/{id} ' ,
59
+ 'path ' => $ this -> pathPrefix . 'security-groups/{id} ' ,
58
60
'params ' => [
59
61
'id ' => $ this ->params ->idPath (),
60
62
],
@@ -71,7 +73,7 @@ public function deleteSecurityGroup()
71
73
{
72
74
return [
73
75
'method ' => 'DELETE ' ,
74
- 'path ' => 'security-groups/{id} ' ,
76
+ 'path ' => $ this -> pathPrefix . 'security-groups/{id} ' ,
75
77
'params ' => [
76
78
'id ' => $ this ->params ->idPath (),
77
79
],
@@ -87,7 +89,7 @@ public function getSecurityRules()
87
89
{
88
90
return [
89
91
'method ' => 'GET ' ,
90
- 'path ' => 'security-group-rules ' ,
92
+ 'path ' => $ this -> pathPrefix . 'security-group-rules ' ,
91
93
'params ' => [],
92
94
];
93
95
}
@@ -101,7 +103,7 @@ public function postSecurityRules()
101
103
{
102
104
return [
103
105
'method ' => 'POST ' ,
104
- 'path ' => 'security-group-rules ' ,
106
+ 'path ' => $ this -> pathPrefix . 'security-group-rules ' ,
105
107
'jsonKey ' => 'security_group_rule ' ,
106
108
'params ' => [
107
109
'direction ' => $ this ->params ->directionJson (),
@@ -126,7 +128,7 @@ public function deleteSecurityRule()
126
128
{
127
129
return [
128
130
'method ' => 'DELETE ' ,
129
- 'path ' => 'security-group-rules/{id} ' ,
131
+ 'path ' => $ this -> pathPrefix . 'security-group-rules/{id} ' ,
130
132
'params ' => [
131
133
'id ' => $ this ->params ->idPath (),
132
134
],
@@ -143,7 +145,7 @@ public function getSecurityRule()
143
145
{
144
146
return [
145
147
'method ' => 'GET ' ,
146
- 'path ' => 'security-group-rules/{id} ' ,
148
+ 'path ' => $ this -> pathPrefix . 'security-group-rules/{id} ' ,
147
149
'params ' => [
148
150
'id ' => $ this ->params ->idPath (),
149
151
],
0 commit comments