SCM Inventory model, view, and task system changes

Inventory source file-type combined with a linked project
will allow the inventory source to be updated when the
project is updated. The inventory update runs in the
post-run hook of the project update.
This commit is contained in:
AlanCoding
2017-03-27 09:56:36 -04:00
parent 2c34aef661
commit 6d92c56da5
18 changed files with 516 additions and 47 deletions

View File

@@ -133,7 +133,9 @@ def project(instance, organization):
prj = Project.objects.create(name="test-proj",
description="test-proj-desc",
organization=organization,
playbook_files=['helloworld.yml', 'alt-helloworld.yml']
playbook_files=['helloworld.yml', 'alt-helloworld.yml'],
local_path='_92__test_proj',
scm_revision='1234567890123456789012345678901234567890'
)
return prj
@@ -208,6 +210,15 @@ def inventory(organization):
return organization.inventories.create(name="test-inv")
@pytest.fixture
def scm_inventory_source(inventory, project):
return InventorySource.objects.create(
name="test-scm-inv",
scm_project=project,
source_path='inventory_file',
inventory=inventory)
@pytest.fixture
def inventory_factory(organization):
def factory(name, org=organization):