Skip to content

Commit 086bc19

Browse files
committed
brk: param changes to POST /networking/ips and /linode/instances/:id/ips
- POST /networking/ips - now accepts "type":"ipv4" and "public":bool - POST /networking/ips - can do private ipv4 addresses - POST /linode/instances/:id/ips - now accepts "type":"ipv4" and "public":bool
1 parent 2ed1ede commit 086bc19

File tree

6 files changed

+125
-23
lines changed

6 files changed

+125
-23
lines changed

src/data/endpoints/linodes.yaml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -869,23 +869,27 @@ endpoints:
869869
money: true
870870
oauth: linodes:modify
871871
description: >
872-
Allocates a new IP Address for this Linode.
872+
Allocates a new IPv4 Address for this Linode.
873873
params:
874874
type:
875-
description: >
876-
The type of IP Address this is, can be one of "public" or "private".
877-
Public IP Addresses, over and above the one included with each Linode,
878-
incur an additional monthly charge. If you need an additional Public IP Address
879-
you must request one - please open a ticket.
880875
type: String
881-
value: private
876+
description: >
877+
The type of IP to allocate. Currently only "ipv4" is supported.
878+
value: ipv4
879+
public:
880+
type: Boolean
881+
description: >
882+
Whether this is a public or private IP address.
883+
Public IP Addresses, over and above the one included with each
884+
Linode, incur an additional monthly charge. If you need an
885+
additional Public IP Address you must request one - please
886+
open a ticket.
887+
value: true
882888
examples:
883889
curl: |
884890
curl -H "Content-Type: application/json" \
885891
-H "Authorization: Bearer $TOKEN" \
886-
-X POST -d '{
887-
"type": "private"
888-
}' \
892+
-X POST -d '{"type": "ipv4", "public":true}' \
889893
https://$api_root/$version/linode/instances/$linode_id/ips
890894
/linode/instances/$id/ips/$ip_address:
891895
group: IPs

src/data/endpoints/networking.yaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,36 @@ endpoints:
2222
curl -H "Authorization: Bearer $TOKEN" \
2323
https://$api_root/$version/networking/ips
2424
POST:
25+
response: ipaddress
2526
money: true
2627
oauth: ips:create
2728
description: >
28-
Create a new Public IPv4 Address.
29+
Create a new IPv4 Address.
2930
params:
3031
type:
3132
type: String
3233
description: >
33-
The type of IP to allocate. Currently only "ipv4" is supported.
34+
The type of IP to allocate. Currently only "ipv4" is supported.
35+
value: ipv4
36+
public:
37+
type: Boolean
38+
description: >
39+
Whether this is a public or private IP address.
40+
Public IP Addresses, over and above the one included with each
41+
Linode, incur an additional monthly charge. If you need an
42+
additional Public IP Address you must request one - please
43+
open a ticket.
44+
value: true
3445
linode_id:
46+
type: Integer
3547
description: >
3648
The Linode ID to assign this IP to.
37-
type: Integer
49+
value: 123
3850
examples:
3951
curl: |
4052
curl -H "Content-Type: application/json" \
4153
-H "Authorization: Bearer $TOKEN" \
42-
-X POST -d '{"type":"ipv4","linode":123}' \
54+
-X POST -d '{"type":"ipv4", "public":true, "linode":123}' \
4355
https://$api_root/$version/networking/ips
4456
/networking/ips/$address:
4557
group: IPs

src/data/objects/ipaddress.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: IP Address
22
description: >
3-
An IP Address
3+
An IPv4 Address
44
schema:
55
address:
66
type: String
@@ -26,16 +26,19 @@ schema:
2626
region:
2727
type: String
2828
value: us-east
29-
description: The region this IP is in.
29+
description: The Region this IP is in.
3030
subnet_mask:
3131
type: String
3232
value: 255.255.255.0
3333
description: The subnet mask.
34+
public:
35+
type: Boolean
36+
value: true
37+
description: Whether this is a public or private IP address.
3438
type:
35-
type: Enum
36-
subtype: IPAddressType
37-
value: public
38-
description: The type of IP Address, either public or private.
39+
type: String
40+
description: The type of IP Address.
41+
value: ipv4
3942
enums:
4043
IPAddressType:
4144
public: Public IP Address.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: IP Address
2+
description: >
3+
An IPv6 Address - link_local
4+
schema:
5+
address:
6+
type: String
7+
value: fe80::f03c:91ff:fe24:3a2f
8+
description: The IP Address.
9+
gateway:
10+
type: String
11+
value: fe80::1
12+
description: The default gateway.
13+
linode_id:
14+
type: Integer
15+
value: 42
16+
description: The Linode this IP is associated with.
17+
prefix:
18+
type: String
19+
value: 64
20+
description: The network prefix.
21+
rdns:
22+
editable: true
23+
type: String
24+
value: null
25+
description: Reverse DNS address for this IP Address. Null to reset.
26+
region:
27+
type: String
28+
value: us-east
29+
description: The Region this IP is in.
30+
subnet_mask:
31+
type: String
32+
value: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
33+
description: The subnet mask.
34+
public:
35+
type: Boolean
36+
value: false
37+
description: Whether this is a public or private IP address.
38+
type:
39+
type: String
40+
description: The type of IP Address.
41+
value: ipv6
42+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: IP Address
2+
description: >
3+
An IPv6 Address - slaac
4+
schema:
5+
address:
6+
type: String
7+
value: 2600:3c03::f03c:91ff:fe24:3a2f
8+
description: The IP Address.
9+
gateway:
10+
type: String
11+
value: fe80::1
12+
description: The default gateway.
13+
linode_id:
14+
type: Integer
15+
value: 42
16+
description: The Linode this IP is associated with.
17+
prefix:
18+
type: String
19+
value: 64
20+
description: The network prefix.
21+
rdns:
22+
editable: true
23+
type: String
24+
value: "example.org"
25+
description: Reverse DNS address for this IP Address. Null to reset.
26+
region:
27+
type: String
28+
value: us-east
29+
description: The Region this IP is in.
30+
subnet_mask:
31+
type: String
32+
value: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
33+
description: The subnet mask.
34+
public:
35+
type: Boolean
36+
value: true
37+
description: Whether this is a public or private IP address.
38+
type:
39+
type: String
40+
description: The type of IP Address.
41+
value: ipv6
42+

src/data/objects/linodenetworking.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@ schema:
1919
ipv6:
2020
description: The Linode's IPv6 networking data.
2121
slaac:
22-
type: ipaddress
22+
type: ipaddressv6slaac
2323
description: >
2424
This Linode's SLAAC range.
2525
link_local:
26-
type: String
27-
value: f300::f03c:91ff:fe96:46da
26+
type: ipaddressv6linklocal
2827
description: >
2928
This Linode's link-local range.
3029
global:

0 commit comments

Comments
 (0)