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
1dcf6d3f
Kaydet (Commit)
1dcf6d3f
authored
Eyl 26, 2017
tarafından
Suleyman Poyraz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Now run scom
üst
6e616ca1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
Core.xml
scom/models/Core.xml
+2
-2
core.py
scom/modules/core.py
+5
-5
No files found.
scom/models/Core.xml
Dosyayı görüntüle @
1dcf6d3f
<scomModel>
<scomModel>
<interface
name=
"Core"
>
<interface
name=
"Core"
>
<method
name=
"register"
action_id=
"
tr.org.sulin.scom.register
"
>
<method
name=
"register"
action_id=
""
>
<arg
name=
"model"
type=
"s"
direction=
"in"
/>
<arg
name=
"model"
type=
"s"
direction=
"in"
/>
<arg
name=
"package"
type=
"s"
direction=
"in"
/>
<arg
name=
"package"
type=
"s"
direction=
"in"
/>
<arg
name=
"script"
type=
"s"
direction=
"in"
/>
<arg
name=
"script"
type=
"s"
direction=
"in"
/>
<annotation
name=
"org.freedesktop.DBus.Method.NoReply"
value=
"true"
/>
<annotation
name=
"org.freedesktop.DBus.Method.NoReply"
value=
"true"
/>
</method>
</method>
<method
name=
"remove"
action_id=
"
tr.org.sulin.scom.remove
"
>
<method
name=
"remove"
action_id=
""
>
<arg
name=
"package"
type=
"s"
direction=
"in"
/>
<arg
name=
"package"
type=
"s"
direction=
"in"
/>
<annotation
name=
"org.freedesktop.DBus.Method.NoReply"
value=
"true"
/>
<annotation
name=
"org.freedesktop.DBus.Method.NoReply"
value=
"true"
/>
</method>
</method>
...
...
scom/modules/core.py
Dosyayı görüntüle @
1dcf6d3f
...
@@ -25,7 +25,7 @@ def listApplicationModels(app):
...
@@ -25,7 +25,7 @@ def listApplicationModels(app):
return
models
return
models
def
register
(
app
,
model
,
filename
):
def
register
(
app
,
model
,
filename
):
scriptDir
=
os
.
path
.
join
(
'/var/db/
comar
3/'
,
"scripts"
,
model
)
scriptDir
=
os
.
path
.
join
(
'/var/db/
scom
3/'
,
"scripts"
,
model
)
scriptFile
=
os
.
path
.
join
(
scriptDir
,
"
%
s.py"
%
app
)
scriptFile
=
os
.
path
.
join
(
scriptDir
,
"
%
s.py"
%
app
)
try
:
try
:
os
.
mkdir
(
scriptDir
)
os
.
mkdir
(
scriptDir
)
...
@@ -33,26 +33,26 @@ def register(app, model, filename):
...
@@ -33,26 +33,26 @@ def register(app, model, filename):
pass
pass
shutil
.
copy
(
filename
,
scriptFile
)
shutil
.
copy
(
filename
,
scriptFile
)
scriptDir
=
os
.
path
.
join
(
'/var/db/
comar
3/'
,
"apps"
,
app
)
scriptDir
=
os
.
path
.
join
(
'/var/db/
scom
3/'
,
"apps"
,
app
)
scriptFile
=
os
.
path
.
join
(
scriptDir
,
model
)
scriptFile
=
os
.
path
.
join
(
scriptDir
,
model
)
try
:
try
:
os
.
mkdir
(
scriptDir
)
os
.
mkdir
(
scriptDir
)
except
:
except
:
pass
pass
try
:
try
:
file
(
scriptFile
,
"w"
)
.
write
(
""
)
open
(
scriptFile
,
"w"
)
.
write
(
""
)
except
:
except
:
pass
pass
return
True
return
True
def
remove
(
app
):
def
remove
(
app
):
scriptDir
=
os
.
path
.
join
(
'/var/db/
comar
3/'
,
"apps"
,
app
)
scriptDir
=
os
.
path
.
join
(
'/var/db/
scom
3/'
,
"apps"
,
app
)
if
not
os
.
path
.
exists
(
scriptDir
):
if
not
os
.
path
.
exists
(
scriptDir
):
return
return
for
i
in
os
.
listdir
(
scriptDir
):
for
i
in
os
.
listdir
(
scriptDir
):
if
not
i
.
startswith
(
"."
):
if
not
i
.
startswith
(
"."
):
scriptFile
=
os
.
path
.
join
(
'/var/db/
comar
3/'
,
"scripts"
,
i
,
"
%
s.py"
%
app
)
scriptFile
=
os
.
path
.
join
(
'/var/db/
scom
3/'
,
"scripts"
,
i
,
"
%
s.py"
%
app
)
try
:
try
:
os
.
unlink
(
scriptFile
)
os
.
unlink
(
scriptFile
)
except
:
except
:
...
...
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