Skip to content

Commit e4e1176

Browse files
author
Antti Myyrä
committed
chore(tests): Testing for labels & server groups, version 2.5.0
1 parent baaee31 commit e4e1176

22 files changed

+273
-46
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515

1616
----
1717

18+
## [2.5.0] - 2023-07-31
19+
20+
### Added
21+
22+
- Server group support
23+
- Support for labels in servers, storages and server groups
24+
25+
## [2.0.1] - 2023-03-22
26+
27+
### Added
28+
29+
Support for metadata in server objects and server creation.
30+
1831
## [2.0.0] - 2021-05-05
1932

2033
Python 2 is no longer supported. This is a maintenance release without

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Alternatively, if you want the newest (possibly not yet released) stuff, clone t
2222
python setup.py install
2323
```
2424

25-
### Supported Python versions in API v2.0.1
25+
### Supported Python versions in API v2.5.0
2626

2727
- Python 3.7
2828
- Python 3.8
@@ -31,7 +31,7 @@ python setup.py install
3131

3232
**Python 2 has been deprecated**
3333

34-
- Python 2.7 is supported in older API versions (< v2.0.0), still available in [PyPI](https://pypi.org/project/upcloud-api/1.0.1/).
34+
- Python 2.7 is no longer supported, but available in older API versions (< v2.0.0).
3535

3636
## Changelog
3737

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"server_group": {
3+
"anti_affinity": "yes",
4+
"anti_affinity_status": [
5+
{
6+
"uuid": "0016dadf-eba4-4331-bd34-a361841f7af1",
7+
"status": "met"
8+
},
9+
{
10+
"uuid": "00c77bbe-fc0e-436f-a753-37f5b5b76270",
11+
"status": "met"
12+
}
13+
],
14+
"labels": {
15+
"label": [
16+
{
17+
"key": "foo",
18+
"value": "bar"
19+
}
20+
]
21+
},
22+
"servers": {
23+
"server": [
24+
"0016dadf-eba4-4331-bd34-a361841f7af2",
25+
"00c77bbe-fc0e-436f-a753-37f5b5b76271"
26+
]
27+
},
28+
"title": "test group",
29+
"uuid": "0b5169fc-23aa-4ba7-aaab-f38868ce99cd"
30+
}
31+
}

test/json_data/server-group_post.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"server_group": {
3+
"anti_affinity": "yes",
4+
"labels": {
5+
"label": [
6+
{
7+
"key": "foo",
8+
"value": "bar"
9+
}
10+
]
11+
},
12+
"title": "foo",
13+
"uuid": "0b5169fc-23aa-4ba7-aaab-f38868ce99cd"
14+
}
15+
}

test/json_data/server.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
"core_number" : "0",
88
"title" : "Helsinki server",
99
"hostname" : "fi.example.com",
10+
"labels": {
11+
"label": [
12+
{
13+
"key": "test",
14+
"value": "example"
15+
}
16+
]
17+
},
1018
"memory_amount" : "1024",
1119
"uuid" : "00798b85-efdc-41ca-8021-f6ef457b8531",
1220
"state" : "started",
@@ -22,6 +30,9 @@
2230
"core_number" : "0",
2331
"title" : "London server",
2432
"hostname" : "uk.example.com",
33+
"labels": {
34+
"label": []
35+
},
2536
"memory_amount" : "1024",
2637
"uuid" : "009d64ef-31d1-4684-a26b-c86c955cbf46",
2738
"state" : "stopped",

test/json_data/server_00798b85-efdc-41ca-8021-f6ef457b8531.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
}
1919
]
2020
},
21+
"labels": {
22+
"label": [
23+
{
24+
"key": "test",
25+
"value": "example"
26+
}
27+
]
28+
},
2129
"license" : 0,
2230
"memory_amount" : "1024",
2331
"nic_model" : "e1000",

test/json_data/server_00798b85-efdc-41ca-8021-f6ef457b8531_cdrom_eject_post.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
}
1919
]
2020
},
21+
"labels": {
22+
"label": [
23+
{
24+
"key": "test",
25+
"value": "example"
26+
}
27+
]
28+
},
2129
"license" : 0,
2230
"memory_amount" : "1024",
2331
"nic_model" : "e1000",

test/json_data/server_00798b85-efdc-41ca-8021-f6ef457b8531_cdrom_load_post.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
}
1919
]
2020
},
21+
"labels": {
22+
"label": [
23+
{
24+
"key": "test",
25+
"value": "example"
26+
}
27+
]
28+
},
2129
"license" : 0,
2230
"memory_amount" : "1024",
2331
"nic_model" : "e1000",

test/json_data/server_009d64ef-31d1-4684-a26b-c86c955cbf46.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
}
1717
]
1818
},
19+
"labels": {
20+
"label": [
21+
{
22+
"key": "test",
23+
"value": "example"
24+
}
25+
]
26+
},
1927
"license" : 0,
2028
"memory_amount" : "1024",
2129
"nic_model" : "e1000",

test/json_data/server_create.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
}
1717
]
1818
},
19+
"labels": {
20+
"label": [
21+
{
22+
"key": "test",
23+
"value": "example"
24+
}
25+
]
26+
},
1927
"license" : 0,
2028
"memory_amount" : "1024",
2129
"nic_model" : "virtio",

0 commit comments

Comments
 (0)