From 72323045d3cdaf3444d9fcfd7ce2eed800088f6e Mon Sep 17 00:00:00 2001 From: Anders Ingemann Date: Tue, 8 Apr 2014 21:47:06 +0200 Subject: [PATCH] Delete metadata plugin. It serves a too limited purpose to be included. --- .../plugins/build_metadata/__init__.py | 5 ---- .../build_metadata/manifest-schema.json | 27 ------------------- bootstrapvz/plugins/build_metadata/tasks.py | 18 ------------- 3 files changed, 50 deletions(-) delete mode 100644 bootstrapvz/plugins/build_metadata/__init__.py delete mode 100644 bootstrapvz/plugins/build_metadata/manifest-schema.json delete mode 100644 bootstrapvz/plugins/build_metadata/tasks.py diff --git a/bootstrapvz/plugins/build_metadata/__init__.py b/bootstrapvz/plugins/build_metadata/__init__.py deleted file mode 100644 index a4abefe..0000000 --- a/bootstrapvz/plugins/build_metadata/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ - - -def resolve_tasks(taskset, manifest): - from tasks import WriteMetadata - taskset.add(WriteMetadata) diff --git a/bootstrapvz/plugins/build_metadata/manifest-schema.json b/bootstrapvz/plugins/build_metadata/manifest-schema.json deleted file mode 100644 index 3f47471..0000000 --- a/bootstrapvz/plugins/build_metadata/manifest-schema.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Build metadata plugin manifest", - "type": "object", - "properties": { - "provider": { - "type": "string", - "enum": ["ec2"] - }, - "plugins": { - "type": "object", - "properties": { - "build_metadata": { - "type": "object", - "properties": { - "path": { - "type": "string" - } - }, - "required": ["path"] - } - }, - "required": ["build_metadata"] - } - }, - "required": ["plugins"] -} diff --git a/bootstrapvz/plugins/build_metadata/tasks.py b/bootstrapvz/plugins/build_metadata/tasks.py deleted file mode 100644 index d459721..0000000 --- a/bootstrapvz/plugins/build_metadata/tasks.py +++ /dev/null @@ -1,18 +0,0 @@ -from bootstrapvz.base import Task -from bootstrapvz.common import phases - - -class WriteMetadata(Task): - description = 'Writing bootstrap metadata to file' - phase = phases.cleaning - - @classmethod - def run(cls, info): - metadata_path = info.manifest.plugins['build_metadata']['path'] - with open(metadata_path, 'w') as metadata: - metadata.write(('AMI_ID={ami_id}\n' - 'AMI_NAME={ami_name}' - 'SNAPSHOT_ID={snapshot_id}' - .format(ami_id=info.image, - ami_name=info.ami_name, - snapshot_id=info.snapshot.id)))