Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
synnefo
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
itminedu
synnefo
Commits
fd72bf6e
Commit
fd72bf6e
authored
12 years ago
by
Giorgos Korfiatis
Browse files
Options
Downloads
Plain Diff
Adapt for new version of kamaki command().
parents
bd505644
04b23e44
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
commissioning/lib/kamaki/cli.py
+5
-1
5 additions, 1 deletion
commissioning/lib/kamaki/cli.py
quotaholder/clients/kamaki/cli.py
+1
-0
1 addition, 0 deletions
quotaholder/clients/kamaki/cli.py
with
6 additions
and
1 deletion
commissioning/lib/kamaki/cli.py
+
5
−
1
View file @
fd72bf6e
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
from
kamaki.cli.commands
import
_command_init
from
kamaki.cli.commands
import
_command_init
from
kamaki.cli
import
command
from
kamaki.cli
import
command
from
kamaki.cli.command_tree
import
CommandTree
from
kamaki.cli.errors
import
CLIError
from
kamaki.cli.errors
import
CLIError
class
cli_generator
(
object
):
class
cli_generator
(
object
):
...
@@ -10,15 +11,18 @@ class cli_generator(object):
...
@@ -10,15 +11,18 @@ class cli_generator(object):
appname
=
None
appname
=
None
plugin
=
None
plugin
=
None
add_context
=
False
add_context
=
False
ctree
=
None
description
=
None
def
__init__
(
self
):
def
__init__
(
self
):
self
.
api_spec
=
self
.
plugin
.
api_spec
self
.
api_spec
=
self
.
plugin
.
api_spec
self
.
appname
=
self
.
plugin
.
appname
self
.
appname
=
self
.
plugin
.
appname
self
.
ctree
=
CommandTree
(
self
.
appname
,
self
.
description
)
def
generate_all
(
self
):
def
generate_all
(
self
):
for
f
in
self
.
api_spec
.
call_names
():
for
f
in
self
.
api_spec
.
call_names
():
c
=
self
.
mkClass
(
f
)
c
=
self
.
mkClass
(
f
)
command
()(
c
)
command
(
self
.
ctree
)(
c
)
def
mkClass
(
self
,
method
):
def
mkClass
(
self
,
method
):
class
C
(
_command_init
):
class
C
(
_command_init
):
...
...
This diff is collapsed.
Click to expand it.
quotaholder/clients/kamaki/cli.py
+
1
−
0
View file @
fd72bf6e
...
@@ -7,4 +7,5 @@ class quotaholder_cli(cli_generator):
...
@@ -7,4 +7,5 @@ class quotaholder_cli(cli_generator):
def
__init__
(
self
):
def
__init__
(
self
):
self
.
plugin
=
quotaholder_plugin
self
.
plugin
=
quotaholder_plugin
self
.
add_context
=
True
self
.
add_context
=
True
self
.
description
=
'
Quotaholder description
'
super
(
self
.
__class__
,
self
).
__init__
()
super
(
self
.
__class__
,
self
).
__init__
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment