Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kasra Jamshidi
slapos.package
Commits
82e354fa
Commit
82e354fa
authored
May 29, 2013
by
Jondy Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move software.cfg to slapos.git
Move netdrive_usage.xsd to slapos.core.git
parent
a4dcb123
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
104 deletions
+10
-104
windows/netreport/software/instance.cfg.in
windows/netreport/software/instance.cfg.in
+0
-42
windows/netreport/software/software.cfg
windows/netreport/software/software.cfg
+0
-25
windows/netreport/src/netdrive_usage.xsd
windows/netreport/src/netdrive_usage.xsd
+0
-37
windows/netreport/src/tests.py
windows/netreport/src/tests.py
+10
-0
No files found.
windows/netreport/software/instance.cfg.in
deleted
100644 → 0
View file @
a4dcb123
[buildout]
parts =
directory
reporter
publish-connection-parameter
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[instance-parameter]
recipe = slapos.cookbook:slapconfiguration
computer = $${slap_connection:computer_id}
partition = $${slap_connection:partition_id}
url = $${slap_connection:server_url}
key = $${slap_connection:key_file}
cert = $${slap_connection:cert_file}
configuration.name = anonymous
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
script = $${:etc}/run
service = $${:etc}/service
promise = $${:etc}/promise
[main]
recipe = slapos.cookbook:wrapper
command-line = ${buildout:bin-directory}/netdrive_reporter
--master-url=$${instance-parameter:url}
--computer-id=$${instance-parameter:computer}
--cert-file=$${instance-parameter:cert}
--key-file=$${instance-parameter:key}
--report-interval=300
--data-file=$${directory:etc}/data
wrapper-path = $${directory:service}/netdrive-reporter
[publish-connection-parameter]
recipe = slapos.cookbook:publish
name = Net Drive Usage Report -- $${instance-parameter:configuration.name}!
windows/netreport/software/software.cfg
deleted
100644 → 0
View file @
a4dcb123
[buildout]
extends =
../../stack/slapos.cfg
parts =
slapos-cookbook
netdrive-usage-report
instance-template
[netdrive-usage-report]
recipe = z3c.recipe.scripts
eggs =
slapos.core
lxml
netdrive.report
# control scripts generation in order to avoid reinstalling bin/buildout
scripts =
netdrive_reporter = netreport:main
[instance-template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
mode = 0644
windows/netreport/src/netdrive_usage.xsd
deleted
100644 → 0
View file @
a4dcb123
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
elementFormDefault=
"qualified"
>
<xs:element
name=
"report"
>
<xs:complexType>
<xs:sequence>
<xs:element
ref=
"item"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element
name=
"item"
>
<xs:complexType>
<xs:sequence>
<xs:element
name=
"computer"
type=
"xs:string"
/>
<xs:element
name=
"account"
type=
"xs:string"
/>
<xs:element
name=
"date"
type=
"xs:date"
/>
<xs:element
name=
"usage"
type=
"xs:decimal"
/>
<xs:element
ref=
"details"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element
name=
"details"
>
<xs:complexType>
<xs:element
ref=
"line"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
</xs:complexType>
</xs:element>
<xs:element
name=
"line"
>
<xs:complexType>
<xs:all>
<xs:element
name=
"drive"
type=
"xs:string"
/>
<xs:element
name=
"remote"
type=
"xs:string"
/>
<xs:element
name=
"start"
type=
"xs:time"
/>
<xs:element
name=
"duration"
type=
"xs:integer"
/>
<xs:element
name=
"bytes"
type=
"xs:integer"
/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
windows/netreport/src/tests.py
View file @
82e354fa
...
...
@@ -42,6 +42,16 @@ class NetUsageTests(BaseTestCase):
self
.
assertEquals
(
len
(
r
),
0
)
self
.
assertEquals
(
r
,
[])
def
test_usage_report_one_share_folder_to_many_drive
(
self
):
r
=
netuse
.
usageReport
(
None
)
self
.
assertEquals
(
len
(
r
),
0
)
self
.
assertEquals
(
r
,
[])
def
test_usage_report_share_subfolder
(
self
):
r
=
netuse
.
usageReport
(
None
)
self
.
assertEquals
(
len
(
r
),
0
)
self
.
assertEquals
(
r
,
[])
if
__name__
==
"__main__"
:
# unittest.main()
loader
=
unittest
.
TestLoader
()
...
...
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