Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
vmdriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
24530205
authored
Jul 22, 2013
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding another testfile
parent
51b12acb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
test_nw.py
+33
-0
No files found.
test_nw.py
0 → 100755
View file @
24530205
#!/usr/bin/env python
import
networkdriver
import
vm
import
logging
import
vmdriver
logging
.
basicConfig
(
filename
=
'example.log'
,
level
=
logging
.
DEBUG
)
graphics
=
{
'type'
:
'vnc'
,
'listen'
:
'0.0.0.0'
,
'port'
:
'6300'
,
'passwd'
:
'asd'
}
a
=
vm
.
VMDisk
(
name
=
"ubuntu"
,
source
=
'/home/tarokkk/ubuntu.qcow'
)
b
=
vm
.
VMNetwork
(
name
=
"vm-88"
,
bridge
=
'cloud'
,
mac
=
"02:00:0a:09:01:8a"
,
ipv4
=
'10.9.1.138'
,
ipv6
=
'2001:738:2001:4031:9:1:138:0/112'
)
testvm
=
vm
.
VMInstance
(
name
=
"ubuntu"
,
vcpu
=
"1"
,
memory_max
=
"131072"
,
disk_list
=
[
a
],
network_list
=
[
b
],
graphics
=
graphics
)
#Creating vm
vm_driver
=
vmdriver
.
VMDriver
()
vm_driver
.
connect
()
#vm_driver.vm_create(testvm)
#Enabling network
network
=
networkdriver
.
NWDriver
()
#network.nw_create(testvm)
network
.
nw_delete
(
testvm
)
vm_driver
.
vm_delete
(
testvm
)
vm_driver
.
disconnect
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment