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
Commit
ecfb7753
authored
Sep 11, 2014
by
Csók Tamás
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client: more debianic layout
parent
2a687b20
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
70 additions
and
48 deletions
+70
-48
CIRCLE Client.desktop
+5
-5
cloud
+57
-28
cloud2
+0
-10
cloud_connect_from_linux
+0
-0
debian/changelog
+1
-1
debian/control
+4
-3
setup.py
+3
-1
No files found.
cloud
.desktop
→
CIRCLE Client
.desktop
View file @
ecfb7753
[Desktop Entry]
[Desktop Entry]
Encoding=UTF-8
Encoding=UTF-8
Version=0.
2
Version=0.
1
Type=Application
Type=Application
Name=C
loud GUI
Name=C
IRCLE Client
Comment=Tool to
use IK
Cloud
Comment=Tool to
enhance the use of the CIRCLE
Cloud
Exec=cloud
2
%u
Exec=cloud %u
Icon=
/usr/share/icons/cloud.svg
Icon=
cloud
Terminal=true
Terminal=true
MimeType=x-scheme-handler/circle;
MimeType=x-scheme-handler/circle;
Categories=Utility;Application;
Categories=Utility;Application;
cloud
.py
→
cloud
View file @
ecfb7753
...
@@ -8,6 +8,8 @@ The Client job is to help the ease of use of the cloud system.
...
@@ -8,6 +8,8 @@ The Client job is to help the ease of use of the cloud system.
import
platform
import
platform
import
argparse
import
argparse
import
imp
import
os
try
:
try
:
from
selenium
import
webdriver
from
selenium
import
webdriver
from
selenium.webdriver.common.by
import
By
from
selenium.webdriver.common.by
import
By
...
@@ -32,31 +34,6 @@ class Struct:
...
@@ -32,31 +34,6 @@ class Struct:
pass
pass
def
parse_arguments
():
"""
Argument parser, based on the argparse module
Keyword arguments:
@return args -- arguments given by console
"""
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"uri"
,
type
=
str
,
help
=
"Specific schema handler"
,
nargs
=
'?'
,
default
=
None
)
parser
.
add_argument
(
"-u"
,
"--username"
,
type
=
str
)
parser
.
add_argument
(
"-p"
,
"--password"
,
type
=
str
)
parser
.
add_argument
(
"-d"
,
"--driver"
,
help
=
(
"Select webdriver. Aside from Firefox, you have to install "
"first the proper driver."
),
type
=
str
,
choices
=
[
'firefox'
,
'chrome'
,
'ie'
,
'opera'
],
default
=
"firefox"
)
args
=
parser
.
parse_args
()
return
args
class
Browser
:
class
Browser
:
"""
"""
Browser initialisation
Browser initialisation
...
@@ -135,6 +112,57 @@ class Browser:
...
@@ -135,6 +112,57 @@ class Browser:
return
vm
return
vm
def
load_from_file
(
uri
,
absl
=
False
):
if
not
absl
:
uri
=
os
.
path
.
normpath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
uri
))
path
,
fname
=
os
.
path
.
split
(
uri
)
mname
,
ext
=
os
.
path
.
splitext
(
fname
)
no_ext
=
os
.
path
.
join
(
path
,
mname
)
if
os
.
path
.
exists
(
no_ext
+
'.pyc'
):
try
:
return
imp
.
load_compiled
(
mname
,
no_ext
+
'.pyc'
)
except
:
pass
elif
os
.
path
.
exists
(
no_ext
+
'.py'
):
try
:
return
imp
.
load_source
(
mname
,
no_ext
+
'.py'
)
except
:
pass
elif
os
.
path
.
exists
(
no_ext
):
try
:
return
imp
.
load_source
(
mname
,
no_ext
)
except
:
try
:
return
imp
.
load_compiled
(
mname
,
no_ext
)
except
:
pass
def
parse_arguments
():
"""
Argument parser, based on the argparse module
Keyword arguments:
@return args -- arguments given by console
"""
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"uri"
,
type
=
str
,
help
=
"Specific schema handler"
,
nargs
=
'?'
,
default
=
None
)
parser
.
add_argument
(
"-u"
,
"--username"
,
type
=
str
)
parser
.
add_argument
(
"-p"
,
"--password"
,
type
=
str
)
parser
.
add_argument
(
"-d"
,
"--driver"
,
help
=
(
"Select webdriver. Aside from Firefox, you have to install "
"first the proper driver."
),
type
=
str
,
choices
=
[
'firefox'
,
'chrome'
,
'ie'
,
'opera'
],
default
=
"firefox"
)
args
=
parser
.
parse_args
()
return
args
def
main
():
def
main
():
"""
"""
Main program
Main program
...
@@ -151,12 +179,13 @@ def main():
...
@@ -151,12 +179,13 @@ def main():
browser
=
Browser
(
args
)
browser
=
Browser
(
args
)
vm
=
browser
.
main
()
vm
=
browser
.
main
()
browser
.
driver
.
quit
()
browser
.
driver
.
quit
()
if
platform
.
system
()
==
"Linux"
:
if
platform
.
system
()
==
"Linux"
:
from
cloud_connect_from_linux
import
connect
connect
=
load_from_file
(
"cloud_connect_from_linux"
)
elif
platform
.
system
()
==
"Windows"
:
elif
platform
.
system
()
==
"Windows"
:
from
cloud_connect_from_windows
import
connect
connect
=
load_from_file
(
"cloud_connect_from_windows"
)
if
vm
.
state
.
upper
()[:
3
]
in
(
"FUT"
,
"RUN"
):
if
vm
.
state
.
upper
()[:
3
]
in
(
"FUT"
,
"RUN"
):
connect
(
vm
)
connect
.
connect
(
vm
)
except
:
except
:
print
"Unknown error occurred! Please contact the developers!"
print
"Unknown error occurred! Please contact the developers!"
...
...
cloud2
deleted
100644 → 0
View file @
2a687b20
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import
cloud
if
__name__
==
'__main__'
:
try
:
cloud
.
main
()
finally
:
pass
cloud_connect_from_linux
.py
→
cloud_connect_from_linux
View file @
ecfb7753
File moved
debian/changelog
View file @
ecfb7753
circle-client (0.1) trusty; urgency=medium
circle-client (0.1) trusty; urgency=medium
* Initial release.
(Closes: #XXXXXX)
* Initial release.
-- Csók Tamás <godhak@gmail.com> Wed, 10 Sep 2014 15:57:26 +0200
-- Csók Tamás <godhak@gmail.com> Wed, 10 Sep 2014 15:57:26 +0200
debian/control
View file @
ecfb7753
...
@@ -2,13 +2,14 @@ Source: circle-client
...
@@ -2,13 +2,14 @@ Source: circle-client
Section: embedded
Section: embedded
Priority: optional
Priority: optional
Maintainer: Csók Tamás <godhak@gmail.com>
Maintainer: Csók Tamás <godhak@gmail.com>
Build-Depends: debhelper (>= 9.20~), python (>= 2.7~), python-support (>= 1.0.15~), cdbs (>= 0.4.122~), python-all-dev, libglib2.0-dev (>=2.40~), libgtk2.0-dev (>=2.24.23~), libgcrypt11-dev (>= 1.5.3~), python-dev (>= 2.7
.5
~)
Build-Depends: debhelper (>= 9.20~), python (>= 2.7~), python-support (>= 1.0.15~), cdbs (>= 0.4.122~), python-all-dev, libglib2.0-dev (>=2.40~), libgtk2.0-dev (>=2.24.23~), libgcrypt11-dev (>= 1.5.3~), python-dev (>= 2.7~)
Standards-Version: 3.9.5
Standards-Version: 3.9.5
Package: circle-client
Package: circle-client
Architecture: all
Architecture: any
Multi-Arch: foreign
Homepage: http://circlecloud.org/
Homepage: http://circlecloud.org/
Depends: ${misc:Depends}, ${python:Depends}, sshpass (>= 1.05~), remmina (>=1.0.0~), remmina-plugin-nx (>= 1.0.0~), remmina-plugin-rdp (>= 1.0.0~), python (>= 2.7~)
Depends: ${misc:Depends}, ${python:Depends},
${shlibs:Depends},
sshpass (>= 1.05~), remmina (>=1.0.0~), remmina-plugin-nx (>= 1.0.0~), remmina-plugin-rdp (>= 1.0.0~), python (>= 2.7~)
Description: Connectivity helper for CIRCLE cloud system
Description: Connectivity helper for CIRCLE cloud system
Tool to enhance ease of use of the CIRCLE Cloud by the
Tool to enhance ease of use of the CIRCLE Cloud by the
use of third party connetcion handler programs. These
use of third party connetcion handler programs. These
...
...
setup.py
View file @
ecfb7753
...
@@ -48,6 +48,8 @@ setup(name='CIRCLE Client',
...
@@ -48,6 +48,8 @@ setup(name='CIRCLE Client',
platforms
=
[
platforms
=
[
'linux2'
,
'linux2'
,
'posix'
],
'posix'
],
data_files
=
[(
'/usr/share/icons'
,
[
'cloud.svg'
]),
(
'/usr/share/applications'
,
[
'CIRCLE Client.desktop'
])],
description
=
'Connectivity helper for CIRCLE cloud system'
,
description
=
'Connectivity helper for CIRCLE cloud system'
,
long_description
=
(
long_description
=
(
'Tool to enhance ease of use of the CIRCLE by '
'Tool to enhance ease of use of the CIRCLE by '
...
@@ -59,7 +61,7 @@ setup(name='CIRCLE Client',
...
@@ -59,7 +61,7 @@ setup(name='CIRCLE Client',
maintainer
=
'BME IK'
,
maintainer
=
'BME IK'
,
maintainer_email
=
'cloud@ik.bme.hu'
,
maintainer_email
=
'cloud@ik.bme.hu'
,
url
=
'http://circlecloud.org/'
,
url
=
'http://circlecloud.org/'
,
scripts
=
[
'cloud
.py'
,
'cloud2'
,
'cloud_connect_from_linux.py
'
],
scripts
=
[
'cloud
'
,
'cloud_connect_from_linux
'
],
classifiers
=
[
classifiers
=
[
'Development Status :: 4 - Beta'
,
'Development Status :: 4 - Beta'
,
'Environment :: Web Environment'
,
'Environment :: Web Environment'
,
...
...
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