Skip to content

Commit 7c3e6e6

Browse files
author
Mika Scheer
committed
Add support for HAProxy Listens nodes_ids
1 parent 26af4cb commit 7c3e6e6

File tree

5 files changed

+26
-2
lines changed

5 files changed

+26
-2
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66
this package and not the Core API. See the changelog of the [Core API](https://core-api.cyberfusion.io/redoc#section/Changelog)
77
for detailed information.
88

9+
## [1.117.0]
10+
11+
### Added
12+
13+
- `nodes_ids` to HAProxy listens
14+
915
## [1.116.1]
1016

1117
### Fixed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Client for the [Cyberfusion Core API](https://core-api.cyberfusion.io/).
44

5-
This client was built for and tested on the **1.230.1** version of the API.
5+
This client was built for and tested on the **1.238.0** version of the API.
66

77
## Support
88

src/Client.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Client implements ClientContract
2020

2121
private const TIMEOUT = 180;
2222

23-
private const VERSION = '1.116.1';
23+
private const VERSION = '1.117.0';
2424

2525
private const USER_AGENT = 'cyberfusion-cluster-api-client/' . self::VERSION;
2626

src/Endpoints/HAProxyListens.php

+2
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public function create(HAProxyListen $haProxyListen): Response
6767
$this->validateRequired($haProxyListen, 'create', [
6868
'name',
6969
'nodes_group',
70+
'nodes_ids',
7071
'port',
7172
'socket_path',
7273
'destination_cluster_id',
@@ -80,6 +81,7 @@ public function create(HAProxyListen $haProxyListen): Response
8081
$this->filterFields($haProxyListen->toArray(), [
8182
'name',
8283
'nodes_group',
84+
'nodes_ids',
8385
'port',
8486
'socket_path',
8587
'destination_cluster_id',

src/Models/HAProxyListen.php

+16
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class HAProxyListen extends ClusterModel
1313

1414
private string $nodesGroup;
1515

16+
private ?array $nodesIds = null;
17+
1618
private ?int $port = null;
1719

1820
private ?string $socketPath = null;
@@ -61,6 +63,18 @@ public function setNodesGroup(string $nodesGroup): self
6163
return $this;
6264
}
6365

66+
public function getNodesIds(): ?array
67+
{
68+
return $this->nodesIds;
69+
}
70+
71+
public function setNodesIds(?array $nodesIds): self
72+
{
73+
$this->nodesIds = $nodesIds;
74+
75+
return $this;
76+
}
77+
6478
public function getPort(): ?int
6579
{
6680
return $this->port;
@@ -162,6 +176,7 @@ public function fromArray(array $data): self
162176
return $this
163177
->setName(Arr::get($data, 'name'))
164178
->setNodesGroup(Arr::get($data, 'nodes_group'))
179+
->setNodesIds(Arr::get($data, 'nodes_ids'))
165180
->setPort(Arr::get($data, 'port'))
166181
->setSocketPath(Arr::get($data, 'socket_path'))
167182
->setDestinationClusterId(Arr::get($data, 'destination_cluster_id'))
@@ -176,6 +191,7 @@ public function toArray(): array
176191
return [
177192
'name' => $this->getName(),
178193
'nodes_group' => $this->getNodesGroup(),
194+
'nodes_ids' => $this->getNodesIds(),
179195
'port' => $this->getPort(),
180196
'socket_path' => $this->getSocketPath(),
181197
'destination_cluster_id' => $this->getDestinationClusterId(),

0 commit comments

Comments
 (0)