Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-ganeti
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
snf-ganeti
Commits
663ed0ce
Commit
663ed0ce
authored
17 years ago
by
Michael Hanselmann
Browse files
Options
Downloads
Patches
Plain Diff
Implement sample hook.
Reviewed-by: schreiberal
parent
1672a0d1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
configure.ac
+1
-0
1 addition, 0 deletions
configure.ac
qa/Makefile.am
+1
-0
1 addition, 0 deletions
qa/Makefile.am
qa/hooks/Makefile.am
+2
-0
2 additions, 0 deletions
qa/hooks/Makefile.am
qa/hooks/datehook.py
+42
-0
42 additions, 0 deletions
qa/hooks/datehook.py
with
46 additions
and
0 deletions
configure.ac
+
1
−
0
View file @
663ed0ce
...
...
@@ -76,6 +76,7 @@ AC_CONFIG_FILES([
lib/Makefile
man/Makefile
qa/Makefile
qa/hooks/Makefile
scripts/Makefile
test/Makefile
tools/Makefile
...
...
This diff is collapsed.
Click to expand it.
qa/Makefile.am
+
1
−
0
View file @
663ed0ce
SUBDIRS
=
hooks
EXTRA_DIST
=
ganeti-qa.py qa-sample.yaml
\
qa_cluster.py
\
qa_config.py
\
...
...
This diff is collapsed.
Click to expand it.
qa/hooks/Makefile.am
0 → 100644
+
2
−
0
View file @
663ed0ce
EXTRA_DIST
=
datehook.py
CLEANFILES
=
*
.py[co]
This diff is collapsed.
Click to expand it.
qa/hooks/datehook.py
0 → 100644
+
42
−
0
View file @
663ed0ce
# Copyright (C) 2007 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
"""
Example QA hook.
"""
from
ganeti
import
utils
import
qa_utils
import
qa_config
from
qa_utils
import
AssertEqual
,
StartSSH
class
DateHook
:
def
run
(
self
,
ctx
):
if
ctx
.
name
==
'
cluster-init
'
and
ctx
.
phase
==
'
pre
'
:
self
.
_CallDate
(
ctx
)
def
_CallDate
(
self
,
ctx
):
for
node
in
qa_config
.
get
(
'
nodes
'
):
cmd
=
[
'
date
'
]
AssertEqual
(
StartSSH
(
node
[
'
primary
'
],
utils
.
ShellQuoteArgs
(
cmd
)).
wait
(),
0
)
hook
=
DateHook
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