summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-03-25 19:50:46 +0200
committerLars Wirzenius <liw@liw.fi>2017-03-25 19:50:46 +0200
commitd284bce73f238526f0455b9c52f730187f211ec6 (patch)
tree717179f03d211e316b210667b649e832cd1184f1
parentd9362bb5c2b1460318f33a7b6257f233fbf443cc (diff)
downloadvmdb2-d284bce73f238526f0455b9c52f730187f211ec6.tar.gz
Add placeholder class for "state" of image building
I'll populate the state when actual steps require it.
-rw-r--r--vmdb/__init__.py1
-rw-r--r--vmdb/app.py3
-rw-r--r--vmdb/state.py21
-rw-r--r--without-tests1
4 files changed, 24 insertions, 2 deletions
diff --git a/vmdb/__init__.py b/vmdb/__init__.py
index ea0d94f..b55fcdc 100644
--- a/vmdb/__init__.py
+++ b/vmdb/__init__.py
@@ -17,6 +17,7 @@
from .version import __version__, __version_info__
+from .state import State
from .step_list import (
StepRunnerList,
StepRunnerInterface,
diff --git a/vmdb/app.py b/vmdb/app.py
index ee1c45e..2bd4f08 100644
--- a/vmdb/app.py
+++ b/vmdb/app.py
@@ -41,9 +41,8 @@ class Vmdb2(cliapp.Application):
def process_args(self, args):
spec = self.load_spec_file(args[0])
- state = None
-
steps = spec['steps']
+ state = vmdb.State()
steps_taken, core_meltdown = self.run_steps(steps, state)
self.run_teardowns(steps_taken, state)
diff --git a/vmdb/state.py b/vmdb/state.py
new file mode 100644
index 0000000..d522b3c
--- /dev/null
+++ b/vmdb/state.py
@@ -0,0 +1,21 @@
+# Copyright 2017 Lars Wirzenius
+#
+# 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, see <http://www.gnu.org/licenses/>.
+#
+# =*= License: GPL-3+ =*=
+
+
+class State(object):
+
+ pass
diff --git a/without-tests b/without-tests
index dd21432..83c6bed 100644
--- a/without-tests
+++ b/without-tests
@@ -1,6 +1,7 @@
yarns/lib.py
vmdb/__init__.py
vmdb/app.py
+vmdb/state.py
vmdb/version.py
vmdb/plugins/error_plugin.py
vmdb/plugins/echo_plugin.py