25 lines
722 B
Python
25 lines
722 B
Python
"""Commandline interface for Attract."""
|
|
|
|
import logging
|
|
|
|
from pillar.cli import manager
|
|
from pillar.api.utils import authentication
|
|
|
|
import attract.setup
|
|
|
|
log = logging.getLogger(__name__)
|
|
|
|
|
|
@manager.command
|
|
@manager.option('-r', '--replace', dest='replace', action='store_true', default=False)
|
|
@manager.option('-s', '--svn', dest='svn_url', nargs='?')
|
|
def setup_for_attract(project_url, replace=False, svn_url=None):
|
|
"""Adds Attract node types to the project.
|
|
|
|
Use --replace to replace pre-existing Attract node types
|
|
(by default already existing Attract node types are skipped).
|
|
"""
|
|
|
|
authentication.force_cli_user()
|
|
attract.setup.setup_for_attract(project_url, replace=replace, svn_url=svn_url)
|