diff --git a/README.md b/README.md index ca2448307b..c8ab1ef271 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ See SETUP.md for requirements and details. License ======= -Ansible-Commander is made available under the Affero GPL v3, see COPYING, (C) AnsibleWorks, 2013. +Ansible-Commander is made available under the GPL v3, see COPYING, (C) AnsibleWorks, 2013. Commercial licensing is also available. diff --git a/app_setup/templates/local_settings.py.j2 b/app_setup/templates/local_settings.py.j2 index 8a95ec3b9c..4de28fcae3 100644 --- a/app_setup/templates/local_settings.py.j2 +++ b/app_setup/templates/local_settings.py.j2 @@ -2,20 +2,20 @@ # Copyright (c) 2013 AnsibleWorks, Inc. # -# This file is part of Ansible Commander -# +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# 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 Ansible Commander. If not, see . + from defaults import * diff --git a/lib/__init__.py b/lib/__init__.py index ed36360860..3293f9412b 100644 --- a/lib/__init__.py +++ b/lib/__init__.py @@ -1,16 +1,16 @@ # Copyright (c) 2013 AnsibleWorks, Inc. # -# This file is part of Ansible Commander -# +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# 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 Ansible Commander. If not, see . + diff --git a/lib/cli/__init__.py b/lib/cli/__init__.py deleted file mode 100644 index cede6997f6..0000000000 --- a/lib/cli/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2013 AnsibleWorks, Inc. -# -# This file is part of Ansible Commander -# -# Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . - diff --git a/lib/cli/main.py b/lib/cli/main.py deleted file mode 100644 index 87fcb123e0..0000000000 --- a/lib/cli/main.py +++ /dev/null @@ -1,225 +0,0 @@ -# Copyright (c) 2013 AnsibleWorks, Inc. -# -# This file is part of Ansible Commander -# -# Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . - - -# FIXME: as we've switched things over to django-rest-framework from tastypie, this will need some revision - -import os -import requests -from requests.auth import HTTPBasicAuth -import sys -import json - -# this is temporary -username = os.getenv("ACOM_USER","admin") -password = os.getenv("ACOM_PASS","admin") -server = os.getenv("ACOM_SERVER","http://127.0.0.1:8000") -PARAMS = dict(format='json') -HEADERS = { 'Content-Type' : 'application/json' } -AUTH = HTTPBasicAuth(username, password) - -# TODO: format into actual command line - -# ============================================================= -# wrappers around URL request functions - -def get(url_seg, expect=200): - resp = None - if 'api/v1' not in url_seg: - url = "%s/api/v1/%s" % (server, url_seg) - else: - url = "%s%s" % (server, url_seg) - resp = requests.get(url, auth=AUTH) - if resp.status_code != expect: - assert False, "GET: Expecting %s got %s: %s" % (expect, resp.status_code, resp.text) - return resp - -def post(url_seg, data, expect=201): - resp = requests.post("%s/api/v1/%s" % (server, url_seg), auth=AUTH, data=data, headers=HEADERS) - if resp.status_code != expect: - assert False, "POST: Expecting %s got %s: %s" % (expect, resp.status_code, resp.text) - return resp - -def update_item(item, data, expect=204): - resp = requests.put("%s%s" % (server, item.resource_uri), auth=AUTH, data=data, headers=HEADERS) - if resp.status_code != expect: - assert False, "PUT: Expecting %s got %s: %s" % (expect, resp.status_code, resp.text) - return resp - -def delete(url_seg, expect=204): - if not url_seg.endswith("/"): - url_seg = "%s/" % url_seg - resp = requests.delete("%s%s" % (server, url_seg), auth=AUTH, headers=HEADERS) - if resp.status_code != expect: - assert False, "DELETE: Expecting %s got %s: %s" % (expect, resp.status_code, resp.text) - return resp - -# ============================================================= - -class Collection(object): - - def __init__(self): - - self.response = get(self.base_url()) - #print "---" - #print self.response.text - #print "---" - try: - self.data = json.loads(self.response.text) - except Exception, e: - print self.response.text - raise e - try: - self.meta = self.data['meta'] - except Exception, e: - print self.response.text - raise e - self.objects = self.data['objects'] - self.meta = self.data['meta'] - self.objects = self.data['objects'] - - def base_url(self): - return exceptions.NotImplementedError() - - def add(self, data): - json_data = json.dumps(data) - response = post(self.base_url(), data=json_data) - return Entry(data) - - def __iter__(self): - for x in self.objects: - yield Entry(x) - - def print_display(self): - # TODO: paginate/flexible headers - print "%s" % self.name() - print "===" - for x in self.objects: - print Entry(x).display() - print "" - -class Entry(object): - - def __init__(self, data): - self.data = data - self.resource_uri = data.get('resource_uri', None) - - def __repr__(self): - return repr(self.data) - - def refresh(self): - print "URI=%s" % self.resource_uri - data = get(self.resource_uri) - print "Data=%s" % data - return Entry(json.loads(data.text)) - - def update(self, data): - json_data = json.dumps(data) - return update_item(self, json_data) - - def delete(self): - ''' deletes the resource ''' - return delete(self.resource_uri) - - def deactivate(self): - return self.update(dict(active=False)) - - def activate(self): - return self.update(dict(active=True)) - - def delete_membership(self, parent, field): - ''' - removes this object from a parent collection: - example project.delete_membership(org, 'projects') - ''' - parent_uri = parent.resource_uri - uri = "/".join(parent_uri, "/", field, self.data['id']) - return delete(uri) - - def display(self): - keyz = self.data.keys() - keyz.sort() - lines = [] - lines.append(" %20s" % self.resource_uri) - lines.append(" %20s | %s" % ('name', self.data['name'])) - lines.append(" %20s | %s" % ('description', self.data['description'])) - lines.append(" %20s | %s" % ('creation_date', self.data['creation_date'])) - for key in keyz: - if key not in [ 'name', 'description', 'id', 'resource_uri', 'creation_date' ]: - lines.append(" %20s | %s" % (key, self.data[key])) - return "\n".join(lines) - - def print_display(self): - print self.display() - -class Organizations(Collection): - - def name(self): - return "Organizations" - - def base_url(self): - return "organizations/" - -class Projects(Collection): - - def name(self): - return "Projects" - - def base_url(self): - return "projects/" - - -#(Epdb) got.text -#u'{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null, "total_count": 1}, "objects": [{"active": true, "creation_date": "2013-03-15", "description": "testorg!", "id": 1, "name": "testorg", "resource_uri": "/api/v1/organizations/1/"}]}' -# - -try: - - print "*** adding an org" - orgs = Organizations() - orgs.add(dict(description="new org?", name="new org")) - last_org = list(Organizations())[-1] - last_org.refresh() - - - Organizations().print_display() - - print "*** adding a project" - projects = Projects() - projects.add(dict(description="new project?", name="new project")) - last_project = list(Projects())[-1] - - last_project.update(dict(description="new project!!!!", name="new project!!!!", organization=last_org.resource_uri)) - print ">> it was added here: %s to %s>>" % (last_project.resource_uri, last_org.resource_uri) - Organizations().print_display() - - print "*** showing the orgs" - Organizations().print_display() - - print "*** showing the projects" - Projects().print_display() - - print "*** deleting all projects" - [x.delete() for x in projects] - - print "*** showing the projects" - Projects().print_display() - -except requests.exceptions.ConnectionError: - print "connect failed" - sys.exit(1) - diff --git a/lib/main/__init__.py b/lib/main/__init__.py index cede6997f6..3293f9412b 100644 --- a/lib/main/__init__.py +++ b/lib/main/__init__.py @@ -1,17 +1,16 @@ # Copyright (c) 2013 AnsibleWorks, Inc. # -# This file is part of Ansible Commander -# +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# 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 Ansible Commander. If not, see . diff --git a/lib/main/admin.py b/lib/main/admin.py index 2fa8b87367..74563a1534 100644 --- a/lib/main/admin.py +++ b/lib/main/admin.py @@ -1,19 +1,18 @@ # Copyright (c) 2013 AnsibleWorks, Inc. # -# This file is part of Ansible Commander -# +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# 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 Ansible Commander. If not, see . from django.conf.urls import * diff --git a/lib/main/base_views.py b/lib/main/base_views.py index 4788b571b9..1791c56e5d 100644 --- a/lib/main/base_views.py +++ b/lib/main/base_views.py @@ -1,19 +1,18 @@ # Copyright (c) 2013 AnsibleWorks, Inc. # -# This file is part of Ansible Commander -# +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# 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 Ansible Commander. If not, see . from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt diff --git a/lib/main/management/__init__.py b/lib/main/management/__init__.py index ed36360860..3293f9412b 100644 --- a/lib/main/management/__init__.py +++ b/lib/main/management/__init__.py @@ -1,16 +1,16 @@ # Copyright (c) 2013 AnsibleWorks, Inc. # -# This file is part of Ansible Commander -# +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# 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 Ansible Commander. If not, see . + diff --git a/lib/main/management/commands/__init__.py b/lib/main/management/commands/__init__.py index cf3f1d2813..594eae475f 100644 --- a/lib/main/management/commands/__init__.py +++ b/lib/main/management/commands/__init__.py @@ -1,19 +1,18 @@ # Copyright (c) 2013 AnsibleWorks, Inc. # -# This file is part of Ansible Commander -# +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# 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 Ansible Commander. If not, see . import os diff --git a/lib/main/management/commands/acom_callback_event.py b/lib/main/management/commands/acom_callback_event.py index abc1eaae29..5485ff4417 100755 --- a/lib/main/management/commands/acom_callback_event.py +++ b/lib/main/management/commands/acom_callback_event.py @@ -2,21 +2,19 @@ # Copyright (c) 2013 AnsibleWorks, Inc. # -# This file is part of Ansible Commander -# +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . - +# 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 Ansible Commander. If not, see . import json from optparse import make_option diff --git a/lib/main/management/commands/acom_inventory.py b/lib/main/management/commands/acom_inventory.py index fa441a5c53..4f5f06840f 100755 --- a/lib/main/management/commands/acom_inventory.py +++ b/lib/main/management/commands/acom_inventory.py @@ -2,20 +2,19 @@ # Copyright (c) 2013 AnsibleWorks, Inc. # -# This file is part of Ansible Commander -# +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# 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 Ansible Commander. If not, see . import json diff --git a/lib/main/migrations/__init__.py b/lib/main/migrations/__init__.py index e69de29bb2..3293f9412b 100644 --- a/lib/main/migrations/__init__.py +++ b/lib/main/migrations/__init__.py @@ -0,0 +1,16 @@ +# Copyright (c) 2013 AnsibleWorks, Inc. +# +# This file is part of Ansible Commander. +# +# Ansible Commander 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, version 3 of the License. +# +# Ansible Commander 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 Ansible Commander. If not, see . + diff --git a/lib/main/models/__init__.py b/lib/main/models/__init__.py index 9c4932c636..03d1c5cc5d 100644 --- a/lib/main/models/__init__.py +++ b/lib/main/models/__init__.py @@ -1,20 +1,18 @@ # Copyright (c) 2013 AnsibleWorks, Inc. # -# This file is part of Ansible Commander -# +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . - +# 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 Ansible Commander. If not, see . from django.db import models from django.db.models import CASCADE, SET_NULL, PROTECT diff --git a/lib/main/rbac.py b/lib/main/rbac.py index de649c5317..079508ebc7 100644 --- a/lib/main/rbac.py +++ b/lib/main/rbac.py @@ -1,19 +1,19 @@ # Copyright (c) 2013 AnsibleWorks, Inc. # -# This file is part of Ansible Commander -# +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# 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 Ansible Commander. If not, see . + from lib.main.models import * from lib.main.serializers import * diff --git a/lib/main/serializers.py b/lib/main/serializers.py index 441ccd22a4..e8c2b2f168 100644 --- a/lib/main/serializers.py +++ b/lib/main/serializers.py @@ -1,20 +1,18 @@ # Copyright (c) 2013 AnsibleWorks, Inc. # -# This file is part of Ansible Commander -# +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . - +# 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 Ansible Commander. If not, see . from django.contrib.auth.models import User from lib.main.models import * diff --git a/lib/main/tasks.py b/lib/main/tasks.py index de2a7f285d..d92315e68f 100644 --- a/lib/main/tasks.py +++ b/lib/main/tasks.py @@ -1,19 +1,18 @@ # Copyright (c) 2013 AnsibleWorks, Inc. # -# This file is part of Ansible Commander -# +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# 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 Ansible Commander. If not, see . import os import subprocess diff --git a/lib/main/tests/__init__.py b/lib/main/tests/__init__.py index 1f94b18f7a..c8f2ea8b33 100644 --- a/lib/main/tests/__init__.py +++ b/lib/main/tests/__init__.py @@ -1,20 +1,18 @@ # Copyright (c) 2013 AnsibleWorks, Inc. # -# This file is part of Ansible Commander -# +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . - +# 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 Ansible Commander. If not, see . from lib.main.tests.organizations import OrganizationsTest from lib.main.tests.users import UsersTest diff --git a/lib/main/tests/base.py b/lib/main/tests/base.py index d0c222f252..6ba02e9473 100644 --- a/lib/main/tests/base.py +++ b/lib/main/tests/base.py @@ -1,19 +1,18 @@ # Copyright (c) 2013 AnsibleWorks, Inc. # -# This file is part of Ansible Commander -# +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# 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 Ansible Commander. If not, see . import datetime import json diff --git a/lib/main/tests/commands.py b/lib/main/tests/commands.py index 696182d8aa..d429a6f13a 100644 --- a/lib/main/tests/commands.py +++ b/lib/main/tests/commands.py @@ -1,20 +1,18 @@ -# (c) 2013, AnsibleWorks -# -# This file is part of Ansible Commander +# Copyright (c) 2013 AnsibleWorks, Inc. # +# This file is part of Ansible Commander. +# # Ansible Commander 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. +# the Free Software Foundation, version 3 of the License. # # Ansible Commander 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 +# 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 Ansible Commander. If not, see . - +# along with Ansible Commander. If not, see . import json import os diff --git a/lib/main/tests/inventory.py b/lib/main/tests/inventory.py index 077d779a84..416acb1c9b 100644 --- a/lib/main/tests/inventory.py +++ b/lib/main/tests/inventory.py @@ -1,19 +1,18 @@ # Copyright (c) 2013 AnsibleWorks, Inc. # -# This file is part of Ansible Commander -# +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# 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 Ansible Commander. If not, see . import datetime import json diff --git a/lib/main/tests/organizations.py b/lib/main/tests/organizations.py index 7383643d9c..0502e4ce00 100644 --- a/lib/main/tests/organizations.py +++ b/lib/main/tests/organizations.py @@ -1,19 +1,18 @@ # Copyright (c) 2013 AnsibleWorks, Inc. # -# This file is part of Ansible Commander -# +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# 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 Ansible Commander. If not, see . import datetime import json diff --git a/lib/main/tests/projects.py b/lib/main/tests/projects.py index 345770f511..1c661ce32f 100644 --- a/lib/main/tests/projects.py +++ b/lib/main/tests/projects.py @@ -1,19 +1,18 @@ -# (c) 2013, AnsibleWorks -# -# This file is part of Ansible Commander +# Copyright (c) 2013 AnsibleWorks, Inc. # +# This file is part of Ansible Commander. +# # Ansible Commander 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. +# the Free Software Foundation, version 3 of the License. # # Ansible Commander 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 +# 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 Ansible Commander. If not, see . +# along with Ansible Commander. If not, see . import datetime import json diff --git a/lib/main/tests/tasks.py b/lib/main/tests/tasks.py index f2df1ff65b..022abcb358 100644 --- a/lib/main/tests/tasks.py +++ b/lib/main/tests/tasks.py @@ -1,19 +1,18 @@ -# (c) 2013, AnsibleWorks -# -# This file is part of Ansible Commander +# Copyright (c) 2013 AnsibleWorks, Inc. # +# This file is part of Ansible Commander. +# # Ansible Commander 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. +# the Free Software Foundation, version 3 of the License. # # Ansible Commander 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 +# 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 Ansible Commander. If not, see . +# along with Ansible Commander. If not, see . import os diff --git a/lib/main/tests/users.py b/lib/main/tests/users.py index 37696e12ab..d200396210 100644 --- a/lib/main/tests/users.py +++ b/lib/main/tests/users.py @@ -1,21 +1,19 @@ -# (c) 2013, AnsibleWorks -# -# This file is part of Ansible Commander +# Copyright (c) 2013 AnsibleWorks, Inc. # +# This file is part of Ansible Commander. +# # Ansible Commander 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. +# the Free Software Foundation, version 3 of the License. # # Ansible Commander 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 +# 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 Ansible Commander. If not, see . +# along with Ansible Commander. If not, see . -import datetime import json from django.contrib.auth.models import User as DjangoUser diff --git a/lib/main/views.py b/lib/main/views.py index 1623455cc2..edd8664323 100644 --- a/lib/main/views.py +++ b/lib/main/views.py @@ -1,19 +1,18 @@ # Copyright (c) 2013 AnsibleWorks, Inc. # -# This file is part of Ansible Commander -# +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# 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 Ansible Commander. If not, see . from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt diff --git a/lib/middleware/__init__.py b/lib/middleware/__init__.py index ed36360860..3293f9412b 100644 --- a/lib/middleware/__init__.py +++ b/lib/middleware/__init__.py @@ -1,16 +1,16 @@ # Copyright (c) 2013 AnsibleWorks, Inc. # -# This file is part of Ansible Commander -# +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# 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 Ansible Commander. If not, see . + diff --git a/lib/middleware/exceptions.py b/lib/middleware/exceptions.py index 297ecad255..ba752f8097 100644 --- a/lib/middleware/exceptions.py +++ b/lib/middleware/exceptions.py @@ -1,19 +1,18 @@ # Copyright (c) 2013 AnsibleWorks, Inc. # -# This file is part of Ansible Commander -# +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# 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 Ansible Commander. If not, see . import traceback from django.http import HttpResponse diff --git a/lib/settings/__init__.py b/lib/settings/__init__.py index 6728eb3e15..7c2eb1b420 100644 --- a/lib/settings/__init__.py +++ b/lib/settings/__init__.py @@ -1,20 +1,18 @@ -# Copyright (c) 2013 AnsibleWorks, INc. -# -# This file is part of Ansible Commander +# Copyright (c) 2013 AnsibleWorks, Inc. # +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . - +# 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 Ansible Commander. If not, see . try: from local_settings import * diff --git a/lib/settings/defaults.py b/lib/settings/defaults.py index 7e000efc00..6060f916bf 100644 --- a/lib/settings/defaults.py +++ b/lib/settings/defaults.py @@ -1,19 +1,18 @@ -# Copyright (c) 2013 AnsibleWorks, INc. -# -# This file is part of Ansible Commander +# Copyright (c) 2013 AnsibleWorks, Inc. # +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# 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 Ansible Commander. If not, see . import os diff --git a/lib/urls.py b/lib/urls.py index 901a78691d..80f3aad6ef 100644 --- a/lib/urls.py +++ b/lib/urls.py @@ -1,19 +1,18 @@ -# Copyright (c) 2013 AnsibleWorks, INc. -# -# This file is part of Ansible Commander +# Copyright (c) 2013 AnsibleWorks, Inc. # +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# 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 Ansible Commander. If not, see . from django.conf import settings from django.conf.urls import * diff --git a/lib/wsgi.py b/lib/wsgi.py index b542ecba7e..f82d18ee28 100644 --- a/lib/wsgi.py +++ b/lib/wsgi.py @@ -7,22 +7,21 @@ For more information on this file, see https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/ """ -# Copyright (c) 2013 AnsibleWorks, INc. -# -# This file is part of Ansible Commander +# Copyright (c) 2013 AnsibleWorks, Inc. # +# This file is part of Ansible Commander. +# # Ansible Commander is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. # -# This program is distributed in the hope that it will be useful, +# Ansible Commander 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# 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 Ansible Commander. If not, see . import os