Skip to content

Commit cb7ce75

Browse files
authored
Merge pull request #51 from UpCloudLtd/feature-memory-update
update memory values from deprecated "odd" numbers to 1024.
2 parents a305b96 + 9d63633 commit cb7ce75

File tree

11 files changed

+17
-19
lines changed

11 files changed

+17
-19
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ login_user = login_user_block(
9090
cluster = {
9191
'web1': Server(
9292
core_number=1, # CPU cores
93-
memory_amount=512, # RAM in MB
93+
memory_amount=1024, # RAM in MB
9494
hostname='web1.example.com',
9595
zone=ZONE.London, # ZONE.Helsinki and ZONE.Chicago available also
9696
storage_devices=[
@@ -104,7 +104,7 @@ cluster = {
104104
),
105105
'web2': Server(
106106
core_number=1,
107-
memory_amount=512,
107+
memory_amount=1024,
108108
hostname='web2.example.com',
109109
zone=ZONE.London,
110110
storage_devices=[
@@ -192,7 +192,7 @@ must be defined and must be at least same size than storage being cloned.
192192
```python
193193
clone = Server(
194194
core_number=1,
195-
memory_amount=512,
195+
memory_amount=1024,
196196
hostname='cloned.server',
197197
zone=ZONE.Helsinki,
198198
storage_devices=[

docs/Server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Creation of servers in the API is handled by the CloudManager. It accepts a Serv
5151

5252
server = Server(
5353
core_number = 1,
54-
memory_amount = 512,
54+
memory_amount = 1024,
5555
hostname = "web1.example.com",
5656
zone = ZONE.London,
5757
storage_devices = [

docs/server-mixin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def create_server(self, server):
4141
4242
Example:
4343
server1 = Server( core_number = 1,
44-
memory_amount = 512,
44+
memory_amount = 1024,
4545
hostname = "my.example.1",
4646
zone = ZONE.London,
4747
storage_devices = [

test/helpers/infra.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
CLUSTER = {
1111
'web1': Server(
1212
core_number=1,
13-
memory_amount=512,
13+
memory_amount=1024,
1414
hostname='web1.example.com',
1515
zone=ZONE.London,
1616
password_delivery='none',
@@ -21,7 +21,7 @@
2121

2222
'web2': Server(
2323
core_number=1,
24-
memory_amount=512,
24+
memory_amount=1024,
2525
hostname='web2.example.com',
2626
zone=ZONE.London,
2727
password_delivery='none',
@@ -35,7 +35,7 @@
3535

3636
'db': Server(
3737
core_number=1,
38-
memory_amount=512,
38+
memory_amount=1024,
3939
hostname='db.example.com',
4040
zone=ZONE.London,
4141
password_delivery='none',

test/json_data/server.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"core_number" : "0",
88
"title" : "Helsinki server",
99
"hostname" : "fi.example.com",
10-
"memory_amount" : "512",
10+
"memory_amount" : "1024",
1111
"uuid" : "00798b85-efdc-41ca-8021-f6ef457b8531",
1212
"state" : "started",
1313
"tags": {
@@ -22,7 +22,7 @@
2222
"core_number" : "0",
2323
"title" : "London server",
2424
"hostname" : "uk.example.com",
25-
"memory_amount" : "512",
25+
"memory_amount" : "1024",
2626
"uuid" : "009d64ef-31d1-4684-a26b-c86c955cbf46",
2727
"state" : "stopped",
2828
"tags": {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
]
2020
},
2121
"license" : 0,
22-
"memory_amount" : "512",
22+
"memory_amount" : "1024",
2323
"nic_model" : "e1000",
2424
"state" : "started",
2525
"storage_devices" : {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
]
1818
},
1919
"license" : 0,
20-
"memory_amount" : "512",
20+
"memory_amount" : "1024",
2121
"nic_model" : "e1000",
2222
"state" : "stopped",
2323
"storage_devices" : {

test/json_data/storage_attach.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
]
1818
},
1919
"license" : 0,
20-
"memory_amount" : "512",
20+
"memory_amount" : "1024",
2121
"nic_model" : "e1000",
2222
"state" : "started",
2323
"storage_devices" : {

test/json_data/storage_detach.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
]
1818
},
1919
"license" : 0,
20-
"memory_amount" : "512",
20+
"memory_amount" : "1024",
2121
"nic_model" : "e1000",
2222
"state" : "started",
2323
"storage_devices" : {

test/test_integration/test_integration_test.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,15 @@ def destroy_server(server):
3636
"""Destroy a server and it's storages."""
3737
server.stop_and_destroy()
3838

39+
3940
def delete_tag(tag):
4041
"""Destroy a tag (only works if the tag is not in use)."""
4142
tag.destroy()
4243

4344

4445
@integration_test
4546
def teardown_module(module):
46-
manager = CloudManager(USERNAME, PASSWORD, timeout=120)
47+
manager = CloudManager(USERNAME, PASSWORD, timeout=160)
4748

4849
# if we are at CIRCLECI, clean up everything
4950
if os.environ.get('CIRCLECI', False):
@@ -84,7 +85,6 @@ def test_infra_ops():
8485
server.populate()
8586
cluster_servers.append(server)
8687

87-
8888
CREATED_SERVERS = cluster_servers
8989

9090
# assert all_servers contain cluster_servers
@@ -107,8 +107,6 @@ def test_infra_ops():
107107
assert len(web2.ip_addresses) == 1
108108
assert web2.ip_addresses[0].family == 'IPv6'
109109

110-
111-
112110
test_server = CLUSTER['web1']
113111

114112
test_server.populate()

0 commit comments

Comments
 (0)