Skip to content

Commit e1792aa

Browse files
author
Elias Nygren
committed
Docs: upcloud -> upcloud_api
1 parent 19dfe63 commit e1792aa

File tree

5 files changed

+39
-39
lines changed

5 files changed

+39
-39
lines changed

docs/CloudManager.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ manager.get_account()
1313

1414
# Zone
1515

16-
Zones are already hardcoded as Enums in `upcloud.ZONE`. However, they can be queried from the API too.
16+
Zones are already hardcoded as Enums in `upcloud_api.ZONE`. However, they can be queried from the API too.
1717

1818
```python
1919

@@ -47,4 +47,4 @@ List the possible server CPU-ram configurations.
4747

4848
manager.get_server_sizes
4949

50-
```
50+
```

docs/Firewall.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
The code examples use the following:
22

33
```python
4-
import upcloud
5-
from upcloud import FirewallRule
4+
import upcloud_api
5+
from upcloud_api import FirewallRule
66

7-
manager = upcloud.CloudManager("username", "password")
7+
manager = upcloud_api.CloudManager("username", "password")
88
```
99

1010
# About

docs/Server.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
The examples use the following:
22
```python
3-
import upcloud
4-
from upcloud import Server
5-
from upcloud import Storage
6-
from upcloud import ZONE
3+
import upcloud_api
4+
from upcloud_api import Server
5+
from upcloud_api import Storage
6+
from upcloud_api import ZONE
77

8-
manager = upcloud.CloudManager("username", "password")
8+
manager = upcloud_api.CloudManager("username", "password")
99
```
1010

1111
# Start / Stop / Restart
1212

1313
```python
1414

15-
server.stop()
15+
server.stop()
1616
server.start()
1717
server.restart()
1818

@@ -24,7 +24,7 @@ server.populate()
2424
Please note that the server might not be stopped/started/restarted immediately when the API responds. The `.populate()` method updates the object's fields from the API and is thus useful for checking `server.state`.
2525

2626
```
27-
Server states:
27+
Server states:
2828
"started","stopped" -- server is shut down or running
2929
"maintenance" -- when shutting down or (re)starting
3030
"error" -- erronous state in UpCloud's backend
@@ -50,10 +50,10 @@ Creation of servers in the API is handled by the CloudManager. It accepts a Serv
5050
```python
5151

5252
server = Server(
53-
core_number = 1,
54-
memory_amount = 512,
55-
hostname = "web1.example.com",
56-
zone = ZONE.London,
53+
core_number = 1,
54+
memory_amount = 512,
55+
hostname = "web1.example.com",
56+
zone = ZONE.London,
5757
storage_devices = [
5858
Storage(os = "Ubuntu 14.04", size=10),
5959
Storage(size=10, tier="hdd")
@@ -66,11 +66,11 @@ manager.create_server( server )
6666
Currently available Storage operating systems are the following UpCloud public templates:
6767

6868
```python
69-
# upcloud/tools.py
69+
# upcloud_api/tools.py
7070

7171
Operating Systems:
72-
"CentOS 6.5", "CentOS 7.0",
73-
"Debian 7.8", "Ubuntu 12.04", "Ubuntu 14.04",
72+
"CentOS 6.5", "CentOS 7.0",
73+
"Debian 7.8", "Ubuntu 12.04", "Ubuntu 14.04",
7474
"Windows 2003", "Windows 2008", "Windows 2012"
7575

7676
```
@@ -93,11 +93,11 @@ server.save()
9393

9494
```
9595

96-
The following fields of Server instance may be updated, all other fields are read-only. Trying to assign values to other fields leads to an error.
97-
96+
The following fields of Server instance may be updated, all other fields are read-only. Trying to assign values to other fields leads to an error.
97+
9898
```python
99-
Updateable attributes:
100-
"boot_order", "core_number", "firewall", "hostname", "memory_amount",
99+
Updateable attributes:
100+
"boot_order", "core_number", "firewall", "hostname", "memory_amount",
101101
"nic_model", "title", "timezone", "video_model", "vnc", "vnc_password"
102102
```
103103

@@ -141,4 +141,4 @@ Destroys the Server instance and its IP-addresses. However, does not destroy the
141141

142142
server.destroy()
143143

144-
```
144+
```

docs/Storage.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
The code examples use the following:
22

33
```python
4-
import upcloud
5-
from upcloud import Storage
6-
from upcloud import ZONE
4+
import upcloud_api
5+
from upcloud_api import Storage
6+
from upcloud_api import ZONE
77

8-
manager = upcloud.CloudManager("username", "password")
8+
manager = upcloud_api.CloudManager("username", "password")
99
```
1010

1111
# About
@@ -40,7 +40,7 @@ manager.get_storage(storage.uuid)
4040
`get_storages()` accepts one of the following parameters to filter the query:
4141
```
4242
Storages list filters:
43-
"normal" (default), "public", "private",
43+
"normal" (default), "public", "private",
4444
"backup", "cdrom", "template", "favorite"
4545
```
4646

@@ -51,9 +51,9 @@ Storage can be created with the CloudManager's `.create_storage(size=10, tier="m
5151

5252
```python
5353

54-
storage1 = manager.create_storage( size=10,
55-
tier="maxiops",
56-
title="my storage disk",
54+
storage1 = manager.create_storage( size=10,
55+
tier="maxiops",
56+
title="my storage disk",
5757
zone=ZONE.Helsinki )
5858

5959
storage2 = manager.create_storage(100, zone=ZONE.Helsinki)
@@ -63,7 +63,7 @@ storage2 = manager.create_storage(100, zone=ZONE.Helsinki)
6363

6464
## Update
6565

66-
Only the size and title of a storage can be updated. Please note that size can not be reduced and that OS level actions are required to account for the increased size.
66+
Only the size and title of a storage can be updated. Please note that size can not be reduced and that OS level actions are required to account for the increased size.
6767

6868
```python
6969

@@ -80,4 +80,4 @@ Warning: data loss is permanent.
8080

8181
storage.destroy()
8282

83-
```
83+
```

docs/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ The documentation is divided into two parts. Usage describes the basic CRUD func
1313
The code examples use the following:
1414

1515
```python
16-
import upcloud
17-
from upcloud import Storage
18-
from upcloud import Server
19-
from upcloud import ZONE
16+
import upcloud_api
17+
from upcloud_api import Storage
18+
from upcloud_api import Server
19+
from upcloud_api import ZONE
2020

21-
manager = upcloud.CloudManager("username", "password")
21+
manager = upcloud_api.CloudManager("username", "password")
2222
```

0 commit comments

Comments
 (0)