forked from ungleich-public/cdist
move out banner, fail at emulator
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
cf920ca3e9
commit
16d58dcac7
5 changed files with 139 additions and 121 deletions
|
|
@ -19,6 +19,9 @@
|
|||
#
|
||||
#
|
||||
|
||||
TYPE_PREFIX = "__"
|
||||
VERSION = "2.0.2"
|
||||
|
||||
class Error(Exception):
|
||||
"""Base exception class for this project"""
|
||||
pass
|
||||
|
|
|
|||
46
lib/cdist/banner.py
Normal file
46
lib/cdist/banner.py
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# 2011 Nico Schottelius (nico-cdist at schottelius.org)
|
||||
#
|
||||
# This file is part of cdist.
|
||||
#
|
||||
# cdist 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.
|
||||
#
|
||||
# cdist 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 cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#
|
||||
|
||||
import logging
|
||||
import sys
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
BANNER = """
|
||||
.. . .x+=:. s
|
||||
dF @88> z` ^% :8
|
||||
'88bu. %8P . <k .88
|
||||
. '*88888bu . .@8Ned8" :888ooo
|
||||
.udR88N ^"*8888N .@88u .@^%8888" -*8888888
|
||||
<888'888k beWE "888L ''888E` x88: `)8b. 8888
|
||||
9888 'Y" 888E 888E 888E 8888N=*8888 8888
|
||||
9888 888E 888E 888E %8" R88 8888
|
||||
9888 888E 888F 888E @8Wou 9% .8888Lu=
|
||||
?8888u../ .888N..888 888& .888888P` ^%888*
|
||||
"8888P' `"888*"" R888" ` ^"F 'Y"
|
||||
"P' "" ""
|
||||
"""
|
||||
|
||||
|
||||
def banner(args):
|
||||
"""Guess what :-)"""
|
||||
print(BANNER)
|
||||
sys.exit(0)
|
||||
|
|
@ -33,7 +33,6 @@ REMOTE_GLOBAL_EXPLORER_DIR = os.path.join(REMOTE_CONF_DIR, "explorer")
|
|||
|
||||
CODE_HEADER = "#!/bin/sh -e\n"
|
||||
DOT_CDIST = ".cdist"
|
||||
TYPE_PREFIX = "__"
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
|
@ -58,7 +57,7 @@ class Path:
|
|||
|
||||
def __init__(self, target_host,
|
||||
initial_manifest=False, remote_user="root",
|
||||
base_dir=None, debug=False):
|
||||
remote_prefix=False, base_dir=None, debug=False):
|
||||
|
||||
# Base and Temp Base
|
||||
if base_dir:
|
||||
|
|
@ -70,7 +69,10 @@ class Path:
|
|||
self.target_host = target_host
|
||||
|
||||
self.remote_user = remote_user
|
||||
self.remote_prefix = ["ssh", self.remote_user + "@" + self.target_host]
|
||||
if remote_prefix:
|
||||
self.remote_prefix = remote_prefix
|
||||
else:
|
||||
self.remote_prefix = ["ssh", self.remote_user + "@" + self.target_host]
|
||||
|
||||
self.conf_dir = os.path.join(self.base_dir, "conf")
|
||||
self.cache_base_dir = os.path.join(self.base_dir, "cache")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue