Skip to content

Commit b283813

Browse files
Mika Lackmaniler
authored andcommitted
Added instructions for cloning server
1 parent b07e445 commit b283813

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,29 @@ server.start()
183183

184184
```
185185

186+
187+
### Clone a server
188+
189+
Cloning is done by giving existing storage uuid to storage_devices. Note that size of the storage
190+
must be defined and must be at least same size than storage being cloned.
191+
192+
```python
193+
clone = Server(
194+
core_number=1,
195+
memory_amount=512,
196+
hostname='cloned.server',
197+
zone=ZONE.Helsinki,
198+
storage_devices=[
199+
Storage(
200+
uuid='012bea57-0f70-4194-82d0-b3d25f4a018b',
201+
size=50 # size must be defined and it has to be at least same size than storage being cloned
202+
),
203+
]
204+
)
205+
206+
manager.create_server(clone)
207+
```
208+
186209
### Easy access to servers and their information:
187210

188211
New in 0.3.0.

0 commit comments

Comments
 (0)