Skip to content

Commit

Permalink
Revert "Add config-2.0.json"
Browse files Browse the repository at this point in the history
This reverts commit 1c1872c
  • Loading branch information
davidlatwe committed Oct 5, 2020
1 parent a07e283 commit b6429f5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 104 deletions.
20 changes: 1 addition & 19 deletions avalon/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ def save(name, config, inventory):

handlers = {
"avalon-core:inventory-1.0": _save_inventory_1_0,
"avalon-core:config-1.0": _save_config_1_0,
"avalon-core:config-2.0": _save_config_2_0,
"avalon-core:config-1.0": _save_config_1_0
}

for data in (inventory, config):
Expand Down Expand Up @@ -341,23 +340,6 @@ def _save_config_1_0(project_name, data):
io.replace_one(_filter, document)


def _save_config_2_0(project_name, data):
_filter = {"type": "project"}

document = io.find_one(_filter)

config = document["config"]

config["tasks"] = data.get("tasks", [])
config["template"].update(data.get("template", {}))
config["families"] = data.get("families", [])
config["groups"] = data.get("groups", [])

schema.validate(document)

io.replace_one(_filter, document)


def _report(added, updated):
if added:
print("+ added:")
Expand Down
85 changes: 0 additions & 85 deletions avalon/schema/config-2.0.json

This file was deleted.

0 comments on commit b6429f5

Please sign in to comment.