Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Wiki
Snippets
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
9334dd45
authored
Sep 04, 2014
by
Csók Tamás
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client: changed some strings
parent
af39cb57
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
14 deletions
+28
-14
dist/cloud.py
+5
-3
dist/cloud_connect_from_linux.py
+9
-4
src/python/cloud.py
+5
-3
src/python/cloud_connect_from_linux.py
+9
-4
No files found.
dist/cloud.py
View file @
9334dd45
...
@@ -46,9 +46,11 @@ def parse_arguments():
...
@@ -46,9 +46,11 @@ def parse_arguments():
parser
.
add_argument
(
"-u"
,
"--username"
,
type
=
str
)
parser
.
add_argument
(
"-u"
,
"--username"
,
type
=
str
)
parser
.
add_argument
(
"-p"
,
"--password"
,
type
=
str
)
parser
.
add_argument
(
"-p"
,
"--password"
,
type
=
str
)
parser
.
add_argument
(
parser
.
add_argument
(
"-d"
,
"--driver"
,
"-d"
,
help
=
"Select webdriver. Aside from Firefox, you have to install "
"--driver"
,
+
"first the proper driver."
,
type
=
str
,
help
=
(
"Select webdriver. Aside from Firefox, you have to install "
"first the proper driver."
),
type
=
str
,
choices
=
[
'firefox'
,
'chrome'
,
'ie'
,
'opera'
],
choices
=
[
'firefox'
,
'chrome'
,
'ie'
,
'opera'
],
default
=
"firefox"
)
default
=
"firefox"
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
...
...
dist/cloud_connect_from_linux.py
View file @
9334dd45
...
@@ -27,7 +27,7 @@ def connect(vm):
...
@@ -27,7 +27,7 @@ def connect(vm):
"""
"""
if
vm
.
protocol
==
"SSH"
:
if
vm
.
protocol
==
"SSH"
:
command
=
(
"sshpass -p
%
s ssh -p
%
s"
%
(
vm
.
password
,
vm
.
port
)
command
=
(
"sshpass -p
%
s ssh -p
%
s"
%
(
vm
.
password
,
vm
.
port
)
+
" -o StrictHostKeyChecking=no
%
s@
%
s"
%
(
vm
.
user
,
vm
.
host
))
" -o StrictHostKeyChecking=no
%
s@
%
s"
%
(
vm
.
user
,
vm
.
host
))
subprocess
.
call
(
command
,
shell
=
True
)
subprocess
.
call
(
command
,
shell
=
True
)
elif
vm
.
protocol
in
(
"NX"
,
"RDP"
):
elif
vm
.
protocol
in
(
"NX"
,
"RDP"
):
server
=
"
%
s:
%
s"
%
(
vm
.
host
,
vm
.
port
)
server
=
"
%
s:
%
s"
%
(
vm
.
host
,
vm
.
port
)
...
@@ -48,9 +48,14 @@ def connect(vm):
...
@@ -48,9 +48,14 @@ def connect(vm):
f
.
write
(
NX_template
)
f
.
write
(
NX_template
)
else
:
else
:
f
.
write
(
RDP_template
)
f
.
write
(
RDP_template
)
f
.
write
(
"name=
%
s:
%
s
\n
"
%
(
vm
.
protocol
,
server
)
f
.
write
(
"name=
%(protocol)
s:
%(server)
s
\n
protocol=
%(protocol)
s
\n
"
+
"protocol=
%
s
\n
server=
%
s
\n
"
%
(
vm
.
protocol
,
server
)
"server=
%(server)
s
\n
username=
%(username)
s
\n
"
+
"username=
%
s
\n
password=
%
s
\n
"
%
(
vm
.
user
,
password
))
"password=
%(password)
s
\n
"
%
{
'protocol'
:
vm
.
protocol
,
'server'
:
server
,
'username'
:
vm
.
user
,
'password'
:
vm
.
password
})
f
.
close
()
f
.
close
()
subprocess
.
call
([
"remmina"
,
"-c"
,
config_file
])
subprocess
.
call
([
"remmina"
,
"-c"
,
config_file
])
...
...
src/python/cloud.py
View file @
9334dd45
...
@@ -46,9 +46,11 @@ def parse_arguments():
...
@@ -46,9 +46,11 @@ def parse_arguments():
parser
.
add_argument
(
"-u"
,
"--username"
,
type
=
str
)
parser
.
add_argument
(
"-u"
,
"--username"
,
type
=
str
)
parser
.
add_argument
(
"-p"
,
"--password"
,
type
=
str
)
parser
.
add_argument
(
"-p"
,
"--password"
,
type
=
str
)
parser
.
add_argument
(
parser
.
add_argument
(
"-d"
,
"--driver"
,
"-d"
,
help
=
"Select webdriver. Aside from Firefox, you have to install "
"--driver"
,
+
"first the proper driver."
,
type
=
str
,
help
=
(
"Select webdriver. Aside from Firefox, you have to install "
"first the proper driver."
),
type
=
str
,
choices
=
[
'firefox'
,
'chrome'
,
'ie'
,
'opera'
],
choices
=
[
'firefox'
,
'chrome'
,
'ie'
,
'opera'
],
default
=
"firefox"
)
default
=
"firefox"
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
...
...
src/python/cloud_connect_from_linux.py
View file @
9334dd45
...
@@ -27,7 +27,7 @@ def connect(vm):
...
@@ -27,7 +27,7 @@ def connect(vm):
"""
"""
if
vm
.
protocol
==
"SSH"
:
if
vm
.
protocol
==
"SSH"
:
command
=
(
"sshpass -p
%
s ssh -p
%
s"
%
(
vm
.
password
,
vm
.
port
)
command
=
(
"sshpass -p
%
s ssh -p
%
s"
%
(
vm
.
password
,
vm
.
port
)
+
" -o StrictHostKeyChecking=no
%
s@
%
s"
%
(
vm
.
user
,
vm
.
host
))
" -o StrictHostKeyChecking=no
%
s@
%
s"
%
(
vm
.
user
,
vm
.
host
))
subprocess
.
call
(
command
,
shell
=
True
)
subprocess
.
call
(
command
,
shell
=
True
)
elif
vm
.
protocol
in
(
"NX"
,
"RDP"
):
elif
vm
.
protocol
in
(
"NX"
,
"RDP"
):
server
=
"
%
s:
%
s"
%
(
vm
.
host
,
vm
.
port
)
server
=
"
%
s:
%
s"
%
(
vm
.
host
,
vm
.
port
)
...
@@ -48,9 +48,14 @@ def connect(vm):
...
@@ -48,9 +48,14 @@ def connect(vm):
f
.
write
(
NX_template
)
f
.
write
(
NX_template
)
else
:
else
:
f
.
write
(
RDP_template
)
f
.
write
(
RDP_template
)
f
.
write
(
"name=
%
s:
%
s
\n
"
%
(
vm
.
protocol
,
server
)
f
.
write
(
"name=
%(protocol)
s:
%(server)
s
\n
protocol=
%(protocol)
s
\n
"
+
"protocol=
%
s
\n
server=
%
s
\n
"
%
(
vm
.
protocol
,
server
)
"server=
%(server)
s
\n
username=
%(username)
s
\n
"
+
"username=
%
s
\n
password=
%
s
\n
"
%
(
vm
.
user
,
password
))
"password=
%(password)
s
\n
"
%
{
'protocol'
:
vm
.
protocol
,
'server'
:
server
,
'username'
:
vm
.
user
,
'password'
:
vm
.
password
})
f
.
close
()
f
.
close
()
subprocess
.
call
([
"remmina"
,
"-c"
,
config_file
])
subprocess
.
call
([
"remmina"
,
"-c"
,
config_file
])
...
...
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