File tree Expand file tree Collapse file tree 7 files changed +20
-32
lines changed Expand file tree Collapse file tree 7 files changed +20
-32
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,14 @@ public function iops()
84
84
return (new IopsClient ($ this ->httpClient ))->auth ($ this ->token );
85
85
}
86
86
87
+ /**
88
+ * @return BaseClient
89
+ */
90
+ public function ipAddresses ()
91
+ {
92
+ return (new IpAddressesClient ($ this ->httpClient ))->auth ($ this ->token );
93
+ }
94
+
87
95
/**
88
96
* @return BaseClient
89
97
*/
@@ -92,7 +100,6 @@ public function appliances()
92
100
return (new ApplianceClient ($ this ->httpClient ))->auth ($ this ->token );
93
101
}
94
102
95
-
96
103
/**
97
104
* eCloud v2
98
105
*/
@@ -313,14 +320,6 @@ public function loadBalancerSpecs()
313
320
return (new LoadBalancerSpecClient ($ this ->httpClient ))->auth ($ this ->token );
314
321
}
315
322
316
- /**
317
- * @return BaseClient
318
- */
319
- public function loadBalancerNetworks ()
320
- {
321
- return (new LoadBalancerNetworkClient ($ this ->httpClient ))->auth ($ this ->token );
322
- }
323
-
324
323
/**
325
324
* @return BaseClient
326
325
*/
Original file line number Diff line number Diff line change 7
7
/**
8
8
* @property string $id
9
9
* @property string $name
10
- * @property string $loadBalancerId
10
+ * @property string $ipAddress
11
11
* @property string $networkId
12
- * @property string $sync
13
12
* @property string $createdAt
14
13
* @property string $updatedAt
15
14
*/
16
- class LoadBalancerNetwork extends Entity
15
+ class IpAddress extends Entity
17
16
{
18
17
protected $ dates = ['createdAt ' , 'updatedAt ' ];
19
18
}
Original file line number Diff line number Diff line change 9
9
* @property string $name
10
10
* @property string $vpcId
11
11
* @property string $availabilityZoneId
12
+ * @property string $networkId
12
13
* @property string $specId
13
14
* @property int $configId
14
15
* @property string $sync
Original file line number Diff line number Diff line change 7
7
/**
8
8
* @property string $id
9
9
* @property string $name
10
- * @property string $loadBalancerNetworkId
10
+ * @property string $loadBalancerId
11
11
* @property string $ipAddressId
12
12
* @property integer $configId
13
13
* @property string $sync
Original file line number Diff line number Diff line change 3
3
namespace UKFast \SDK \eCloud ;
4
4
5
5
use UKFast \SDK \Entities \ClientEntityInterface ;
6
+
7
+ use UKFast \SDK \eCloud \Entities \IpAddress ;
6
8
use UKFast \SDK \Traits \PageItems ;
7
- use UKFast \SDK \eCloud \Entities \LoadBalancerNetwork ;
8
9
9
- class LoadBalancerNetworkClient extends Client implements ClientEntityInterface
10
+ class IpAddressesClient extends Client implements ClientEntityInterface
10
11
{
11
12
use PageItems;
12
13
13
- protected $ collectionPath = ' v2/load-balancer-networks ' ;
14
+ private $ collectionPath = " v2/ip-addresses " ;
14
15
15
16
public function getEntityMap ()
16
17
{
17
18
return [
18
19
'id ' => 'id ' ,
19
20
'name ' => 'name ' ,
20
- 'load_balancer_id ' => 'loadBalancerId ' ,
21
+ 'ip_address ' => 'ipAddress ' ,
21
22
'network_id ' => 'networkId ' ,
22
- 'sync ' => 'sync ' ,
23
23
'created_at ' => 'createdAt ' ,
24
24
'updated_at ' => 'updatedAt ' ,
25
25
];
26
26
}
27
27
28
28
public function loadEntity ($ data )
29
29
{
30
- return new LoadBalancerNetwork (
30
+ return new IpAddress (
31
31
$ this ->apiToFriendly ($ data , $ this ->getEntityMap ())
32
32
);
33
33
}
34
-
35
- public function getAllByLoadBalancerId ($ id )
36
- {
37
- return $ this ->getAll ([
38
- 'load_balancer_id ' => $ id
39
- ]);
40
- }
41
34
}
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ public function getEntityMap()
19
19
'name ' => 'name ' ,
20
20
'vpc_id ' => 'vpcId ' ,
21
21
'availability_zone_id ' => 'availabilityZoneId ' ,
22
+ 'network_id ' => 'networkId ' ,
22
23
'load_balancer_spec_id ' => 'specId ' ,
23
24
'config_id ' => 'configId ' ,
24
25
'sync ' => 'sync ' ,
@@ -33,9 +34,4 @@ public function loadEntity($data)
33
34
$ this ->apiToFriendly ($ data , $ this ->getEntityMap ())
34
35
);
35
36
}
36
-
37
- public function getNetworks ($ id )
38
- {
39
- return $ this ->loadBalancerNetworks ()->getAllByLoadBalancerId ($ id );
40
- }
41
37
}
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public function getEntityMap()
17
17
return [
18
18
'id ' => 'id ' ,
19
19
'name ' => 'name ' ,
20
- 'load_balancer_network_id ' => 'loadBalancerNetworkId ' ,
20
+ 'load_balancer_id ' => 'loadBalancerId ' ,
21
21
'ip_address_id ' => 'ipAddressId ' ,
22
22
'config_id ' => 'configId ' ,
23
23
'sync ' => 'sync ' ,
You can’t perform that action at this time.
0 commit comments