File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -45,9 +45,7 @@ You must take this into account in your automations.
4545
4646``` python
4747import upcloud
48- import upcloud.Server
49- import upcloud.Storage
50- import upcloud.ZONE
48+ from upcloud import Server, Storage, ZONE
5149
5250manager = upcloud.CloudManager(" api_user" , " password" )
5351manager.authenticate() # test credentials
@@ -56,7 +54,7 @@ cluster = {
5654 " web1" : Server( core_number = 1 , # CPU cores
5755 memory_amount = 512 , # RAM in MB
5856 hostname = " web1.example.com" ,
59- zone = ZONE .London, # Zone .Helsinki and Zone .Chicago available also
57+ zone = ZONE .London, # ZONE .Helsinki and ZONE .Chicago available also
6058 storage_devices = [
6159 # OS: Ubuntu 14.04 from template
6260 # default tier: maxIOPS, the 100k IOPS storage backend
@@ -93,7 +91,7 @@ cluster = {
9391}
9492
9593for server in cluster:
96- manager.create_server( server ) # automatically populates the Server objects with data from API
94+ manager.create_server( cluster[ server] ) # automatically populates the Server objects with data from API
9795
9896```
9997
You can’t perform that action at this time.
0 commit comments