Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Hardik Juneja
slapos
Commits
d53bca5e
Commit
d53bca5e
authored
May 26, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Helloworld recipe (example).
parent
72a01c3c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
102 additions
and
0 deletions
+102
-0
slapos/slapos.recipe.helloworld/CHANGES.txt
slapos/slapos.recipe.helloworld/CHANGES.txt
+6
-0
slapos/slapos.recipe.helloworld/MANIFEST.in
slapos/slapos.recipe.helloworld/MANIFEST.in
+1
-0
slapos/slapos.recipe.helloworld/README.txt
slapos/slapos.recipe.helloworld/README.txt
+1
-0
slapos/slapos.recipe.helloworld/setup.cfg
slapos/slapos.recipe.helloworld/setup.cfg
+3
-0
slapos/slapos.recipe.helloworld/setup.py
slapos/slapos.recipe.helloworld/setup.py
+35
-0
slapos/slapos.recipe.helloworld/src/slapos/__init__.py
slapos/slapos.recipe.helloworld/src/slapos/__init__.py
+6
-0
slapos/slapos.recipe.helloworld/src/slapos/recipe/__init__.py
...os/slapos.recipe.helloworld/src/slapos/recipe/__init__.py
+6
-0
slapos/slapos.recipe.helloworld/src/slapos/recipe/dummy/__init__.py
...pos.recipe.helloworld/src/slapos/recipe/dummy/__init__.py
+44
-0
No files found.
slapos/slapos.recipe.helloworld/CHANGES.txt
0 → 100644
View file @
d53bca5e
Changelog
=========
1.0 (unreleased)
----------------
slapos/slapos.recipe.helloworld/MANIFEST.in
0 → 100644
View file @
d53bca5e
include CHANGES.txt
slapos/slapos.recipe.helloworld/README.txt
0 → 100644
View file @
d53bca5e
The slapos.recipe.helloworld is used as a recipe to test slapos functionnalities. It only installs a dummy wrapper saying "Hello World!" and sends to the master an "HelloWorld" parameter.
slapos/slapos.recipe.helloworld/setup.cfg
0 → 100644
View file @
d53bca5e
[egg_info]
tag_build = .dev
tag_svn_revision = 1
slapos/slapos.recipe.helloworld/setup.py
0 → 100644
View file @
d53bca5e
from
setuptools
import
setup
,
find_packages
name
=
"slapos.recipe.helloworld"
version
=
'1.0'
def
read
(
name
):
return
open
(
name
).
read
()
long_description
=
(
read
(
'README.txt'
)
+
'
\
n
'
+
read
(
'CHANGES.txt'
)
)
setup
(
name
=
name
,
version
=
version
,
description
=
"ZC Buildout recipe for create an helloworld instance, for devel"
,
long_description
=
long_description
,
license
=
"GPLv3"
,
keywords
=
"buildout slapos"
,
classifiers
=
[
"Framework :: Buildout :: Recipe"
,
"Programming Language :: Python"
,
],
packages
=
find_packages
(
'src'
),
package_dir
=
{
''
:
'src'
},
include_package_data
=
True
,
install_requires
=
[
'zc.recipe.egg'
,
'setuptools'
,
'slapos.lib.recipe'
,
],
namespace_packages
=
[
'slapos'
,
'slapos.recipe'
],
entry_points
=
{
'zc.buildout'
:
[
'default = %s:Recipe'
%
name
]},
)
slapos/slapos.recipe.helloworld/src/slapos/__init__.py
0 → 100644
View file @
d53bca5e
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try
:
__import__
(
'pkg_resources'
).
declare_namespace
(
__name__
)
except
ImportError
:
from
pkgutil
import
extend_path
__path__
=
extend_path
(
__path__
,
__name__
)
slapos/slapos.recipe.helloworld/src/slapos/recipe/__init__.py
0 → 100644
View file @
d53bca5e
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try
:
__import__
(
'pkg_resources'
).
declare_namespace
(
__name__
)
except
ImportError
:
from
pkgutil
import
extend_path
__path__
=
extend_path
(
__path__
,
__name__
)
slapos/slapos.recipe.helloworld/src/slapos/recipe/dummy/__init__.py
0 → 100644
View file @
d53bca5e
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# 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 3
# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from
slapos.lib.recipe.BaseSlapRecipe
import
BaseSlapRecipe
class
Recipe
(
BaseSlapRecipe
):
def
_install
(
self
):
parameter_dict
=
self
.
computer_partition
.
getInstanceParameterDict
()
dummy_wrapper
=
self
.
createRunningWrapper
(
'dummy'
,
"""#!/bin/sh
while [ true ]
do
sleep 10
echo "Hello World!"
done"""
)
self
.
computer_partition
.
setConnectionDict
(
dict
(
hello_world
=
"Hello World!"
,
))
return
[
dummy_wrapper
]
\ No newline at end of file
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