Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
S
scom
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
scom
Commits
c5916418
Kaydet (Commit)
c5916418
authored
Nis 15, 2008
tarafından
Bahadır Kandemir
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
* Don't crash if profile data is corrupt
* Ask for authentication type after remote scan
üst
13f25d02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
16 deletions
+24
-16
network.py
mudur/bin/network.py
+24
-16
No files found.
mudur/bin/network.py
Dosyayı görüntüle @
c5916418
...
...
@@ -164,9 +164,12 @@ def listProfiles(bus, args):
profile_info
=
Profile
(
script
,
profile
)
profile_info
.
parse
(
profile_details
)
device
=
profile_details
[
"device_id"
]
.
split
(
"_"
)[
-
1
]
state
=
profile_info
.
get_state
()
address
=
profile_info
.
get_address
()
try
:
device
=
profile_details
[
"device_id"
]
.
split
(
"_"
)[
-
1
]
state
=
profile_info
.
get_state
()
address
=
profile_info
.
get_address
()
except
KeyError
:
continue
profiles
.
append
((
script
,
profile
,
device
,
state
,
address
,
))
except
dbus
.
DBusException
,
e
:
...
...
@@ -350,7 +353,7 @@ def createWizard(bus, args):
print
print
_
(
"
%
s:"
)
%
script_info
[
"remote_name"
]
else
:
print
_
(
"No remote
APs found.
"
)
print
_
(
"No remote
access points found
"
)
print
print
_
(
"
%
s:"
)
%
script_info
[
"remote_name"
]
else
:
...
...
@@ -363,7 +366,8 @@ def createWizard(bus, args):
# Authentication settings
if
auth_modes
:
if
selected_auth_type
:
chosen_mode
=
None
if
selected_auth_type
and
selected_auth_type
!=
"none"
:
chosen_mode
=
AuthenticationMode
(
"
%
s,pass,
%
s"
%
(
selected_auth_type
,
selected_auth_type
))
else
:
index
=
1
...
...
@@ -377,17 +381,18 @@ def createWizard(bus, args):
mode_no
=
input_number
(
"Authentication"
,
1
,
index
+
1
)
if
(
mode_no
!=
index
)
:
chosen_mode
=
AuthenticationMode
(
auth_modes
[
mode_no
-
1
])
if
(
chosen_mode
.
type
==
"pass"
):
print
user_name
=
""
password
=
input_text
(
_
(
"Password"
))
elif
(
chosen_mode
.
type
==
"login"
)
:
print
user_name
=
input_text
(
_
(
"Username"
))
password
=
input_text
(
_
(
"Password"
))
if
chosen_mode
:
if
(
chosen_mode
.
type
==
"pass"
):
print
user_name
=
""
password
=
input_text
(
_
(
"Password"
))
elif
(
chosen_mode
.
type
==
"login"
)
:
print
user_name
=
input_text
(
_
(
"Username"
))
password
=
input_text
(
_
(
"Password"
))
obj
=
bus
.
get_object
(
"tr.org.pardus.comar"
,
"/package/
%
s"
%
script
,
introspect
=
False
)
obj
.
setAuthentication
(
profile
,
chosen_mode
.
identifier
,
user_name
,
password
,
dbus_interface
=
"tr.org.pardus.comar.Net.Link"
)
obj
=
bus
.
get_object
(
"tr.org.pardus.comar"
,
"/package/
%
s"
%
script
,
introspect
=
False
)
obj
.
setAuthentication
(
profile
,
chosen_mode
.
identifier
,
user_name
,
password
,
dbus_interface
=
"tr.org.pardus.comar.Net.Link"
)
# Network settings
if
"net"
in
modes
:
...
...
@@ -424,7 +429,10 @@ def deleteWizard(bus, args):
scripts
[
script
]
=
getScriptDetails
(
bus
,
script
)[
"name"
]
for
profile
in
getProfiles
(
bus
,
script
):
profile_details
=
getConnectionDetails
(
bus
,
script
,
profile
)
device
=
profile_details
[
"device_id"
]
.
split
(
"_"
)[
-
1
]
try
:
device
=
profile_details
[
"device_id"
]
.
split
(
"_"
)[
-
1
]
except
KeyError
:
continue
profiles
.
append
((
script
,
profile
,
device
,
))
except
dbus
.
DBusException
,
e
:
print
_
(
"Error:
%
s"
)
%
str
(
e
)
...
...
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