Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accepting port ranges when creating firewall rules #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ApiCall/Firewall.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function setGroupDescription($groupId, $description)
* @param string $subnet IP address representing a subnet. The IP
* address format must match with the "ip_type" parameter value.
* @param integer $subnetSize IP prefix size in bits.
* @param integer $port (optional) TCP/UDP only. This field can be an
* @param integer|string $port (optional) TCP/UDP only. This field can be an
* integer value specifying a port or a colon separated port range.
* @param string $direction Direction of rule. Possible values: "in".
*
Expand Down Expand Up @@ -154,7 +154,7 @@ public function createRule(
];

if ($port !== null) {
$args['port'] = (int) $port;
$args['port'] = $port;
}

$rule = $this->adapter->post('firewall/rule_create', $args);
Expand Down