launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #08348
[Merge] lp:~allenap/maas/consolidate-namespace-pserv into lp:maas
Gavin Panella has proposed merging lp:~allenap/maas/consolidate-namespace-pserv into lp:maas.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~allenap/maas/consolidate-namespace-pserv/+merge/107995
Moves the provisioningserver package to maas.pserv, as discussed in https://code.launchpad.net/~jtv/maas/oauth-client-library/+merge/107056/comments/230782.
--
https://code.launchpad.net/~allenap/maas/consolidate-namespace-pserv/+merge/107995
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~allenap/maas/consolidate-namespace-pserv into lp:maas.
=== modified file 'HACKING.txt'
--- HACKING.txt 2012-05-28 19:42:56 +0000
+++ HACKING.txt 2012-05-30 15:40:25 +0000
@@ -102,7 +102,7 @@
To run tests at a lower level of granularity::
$ bin/test.maas maasserver.tests.test_api -v
- $ bin/test.pserv provisioningserver.tests.test_api -v
+ $ bin/test.pserv maas.tests.tests.test_api -v
The test runner is `nose`_, so you can pass in options like
``--with-coverage`` and ``--nocapture`` (short option: ``-s``). The
@@ -119,7 +119,7 @@
tests that can be run against it::
$ PSERV_TEST_COBBLER_URL=http://user:pass@localhost/cobbler_api \
- bin/test.pserv provisioningserver.tests.test_api
+ bin/test.pserv maas.pserv.tests.test_api
Adjust ``PSERV_TEST_COBBLER_URL`` as necessary. **Warning:** these
tests will modify your Cobbler database.
=== modified file 'buildout.cfg'
--- buildout.cfg 2012-05-28 20:10:50 +0000
+++ buildout.cfg 2012-05-30 15:40:25 +0000
@@ -125,7 +125,7 @@
test.maas=django.core.management:execute_from_command_line
initialization =
${maas:initialization}
- sys.argv[1:1] = ["test", "--exclude=provisioningserver", "--exclude=maastesting"]
+ sys.argv[1:1] = ["test", "--exclude=pserv", "--exclude=maastesting"]
scripts = test.maas
extra-paths =
${maas:extra-paths}
@@ -169,7 +169,7 @@
entry-points =
test.pserv=nose.core:TestProgram
initialization =
- sys.argv[1:1] = ["--where=src/provisioningserver"]
+ sys.argv[1:1] = ["--where=src/maas/pserv"]
extra-paths = ${common:extra-paths}
scripts =
test.pserv
=== modified file 'etc/celeryconfig.py'
--- etc/celeryconfig.py 2012-05-21 15:51:33 +0000
+++ etc/celeryconfig.py 2012-05-30 15:40:25 +0000
@@ -21,7 +21,7 @@
# Location of power action templates. Use an absolute path.
POWER_TEMPLATES_DIR = os.path.join(
- os.path.dirname(__file__), os.pardir, "src", "provisioningserver", "power",
+ os.path.dirname(__file__), os.pardir, "src", "maas", "pserv", "power",
"templates")
@@ -34,7 +34,7 @@
CELERY_IMPORTS = (
- "provisioningserver.tasks",
+ "maas.pserv.tasks",
)
CELERY_ACKS_LATE = True
=== renamed directory 'src/provisioningserver' => 'src/maas/pserv'
=== modified file 'src/maas/pserv/api.py'
--- src/provisioningserver/api.py 2012-05-21 04:55:16 +0000
+++ src/maas/pserv/api.py 2012-05-30 15:40:25 +0000
@@ -23,15 +23,15 @@
repeat,
)
-from maasserver.utils import map_enum
-from provisioningserver.cobblerclient import (
+from maas.pserv.cobblerclient import (
CobblerDistro,
CobblerProfile,
CobblerSystem,
)
-from provisioningserver.enum import POWER_TYPE
-from provisioningserver.interfaces import IProvisioningAPI
-from provisioningserver.utils import deferred
+from maas.pserv.enum import POWER_TYPE
+from maas.pserv.interfaces import IProvisioningAPI
+from maas.pserv.utils import deferred
+from maasserver.utils import map_enum
from twisted.internet.defer import (
inlineCallbacks,
returnValue,
@@ -254,7 +254,7 @@
:param object_type: The type of object to look for.
:type object_type:
- :class:`provisioningserver.cobblerclient.CobblerObjectType`
+ :class:`maas.pserv.cobblerclient.CobblerObjectType`
:param names: A list of names to search for.
:type names: list
"""
@@ -287,7 +287,7 @@
:param object_type: The type of object to delete.
:type object_type:
- :class:`provisioningserver.cobblerclient.CobblerObjectType`
+ :class:`maas.pserv.cobblerclient.CobblerObjectType`
:param names: A list of names to search for.
:type names: list
"""
=== modified file 'src/maas/pserv/cobblercatcher.py'
--- src/provisioningserver/cobblercatcher.py 2012-04-16 10:00:51 +0000
+++ src/maas/pserv/cobblercatcher.py 2012-05-30 15:40:25 +0000
@@ -18,7 +18,7 @@
import re
from xmlrpclib import Fault
-from provisioningserver.enum import PSERV_FAULT
+from maas.pserv.enum import PSERV_FAULT
class ProvisioningError(Fault):
=== modified file 'src/maas/pserv/cobblerclient.py'
--- src/provisioningserver/cobblerclient.py 2012-04-16 10:00:51 +0000
+++ src/maas/pserv/cobblerclient.py 2012-05-30 15:40:25 +0000
@@ -35,11 +35,11 @@
from urlparse import urlparse
import xmlrpclib
-from provisioningserver.cobblercatcher import (
+from maas.pserv.cobblercatcher import (
convert_cobbler_exception,
ProvisioningError,
)
-from provisioningserver.enum import PSERV_FAULT
+from maas.pserv.enum import PSERV_FAULT
from twisted.internet import reactor as default_reactor
from twisted.internet.defer import (
DeferredLock,
=== modified file 'src/maas/pserv/plugin.py'
--- src/provisioningserver/plugin.py 2012-04-16 10:01:30 +0000
+++ src/maas/pserv/plugin.py 2012-05-30 15:40:25 +0000
@@ -21,10 +21,10 @@
String,
URL,
)
-from provisioningserver.amqpclient import AMQFactory
-from provisioningserver.cobblerclient import CobblerSession
-from provisioningserver.remote import ProvisioningAPI_XMLRPC
-from provisioningserver.services import (
+from maas.pserv.amqpclient import AMQFactory
+from maas.pserv.cobblerclient import CobblerSession
+from maas.pserv.remote import ProvisioningAPI_XMLRPC
+from maas.pserv.services import (
LogService,
OOPSService,
)
=== modified file 'src/maas/pserv/power/tests/test_poweraction.py'
--- src/provisioningserver/power/tests/test_poweraction.py 2012-05-29 06:13:48 +0000
+++ src/maas/pserv/power/tests/test_poweraction.py 2012-05-30 15:40:25 +0000
@@ -1,7 +1,7 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Tests for `provisioningserver.power`.
+"""Tests for `maas.pserv.power`.
"""
from __future__ import (
@@ -17,14 +17,14 @@
from textwrap import dedent
from celeryconfig import POWER_TEMPLATES_DIR
-from maastesting.factory import factory
-from maastesting.testcase import TestCase
-from provisioningserver.enum import POWER_TYPE
-from provisioningserver.power.poweraction import (
+from maas.pserv.enum import POWER_TYPE
+from maas.pserv.power.poweraction import (
PowerAction,
PowerActionFail,
UnknownPowerType,
)
+from maastesting.factory import factory
+from maastesting.testcase import TestCase
from testtools.matchers import FileContains
=== modified file 'src/maas/pserv/remote.py'
--- src/provisioningserver/remote.py 2012-04-16 10:00:51 +0000
+++ src/maas/pserv/remote.py 2012-05-30 15:40:25 +0000
@@ -14,12 +14,12 @@
"ProvisioningAPI_XMLRPC",
]
-from provisioningserver.api import ProvisioningAPI
-from provisioningserver.interfaces import (
+from maas.pserv.api import ProvisioningAPI
+from maas.pserv.interfaces import (
IProvisioningAPI,
IProvisioningAPI_XMLRPC,
)
-from provisioningserver.utils import xmlrpc_export
+from maas.pserv.utils import xmlrpc_export
from twisted.web.xmlrpc import XMLRPC
from zope.interface import implements
=== modified file 'src/maas/pserv/tasks.py'
--- src/provisioningserver/tasks.py 2012-05-29 06:13:48 +0000
+++ src/maas/pserv/tasks.py 2012-05-30 15:40:25 +0000
@@ -17,7 +17,7 @@
from celery.decorators import task
-from provisioningserver.power.poweraction import (
+from maas.pserv.power.poweraction import (
PowerAction,
PowerActionFail,
)
=== modified file 'src/maas/pserv/testing/amqpclient.py'
--- src/provisioningserver/testing/amqpclient.py 2012-04-16 10:00:51 +0000
+++ src/maas/pserv/testing/amqpclient.py 2012-05-30 15:40:25 +0000
@@ -1,7 +1,7 @@
# Copyright 2005-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Tests for `provisioningserver.amqpclient`."""
+"""Tests for `maas.pserv.amqpclient`."""
from __future__ import (
absolute_import,
@@ -14,7 +14,7 @@
from unittest import skip
-from provisioningserver.amqpclient import AMQFactory
+from maas.pserv.amqpclient import AMQFactory
from testtools import TestCase
from testtools.deferredruntest import (
AsynchronousDeferredRunTestForBrokenTwisted,
=== modified file 'src/maas/pserv/testing/factory.py'
--- src/provisioningserver/testing/factory.py 2012-04-20 14:36:16 +0000
+++ src/maas/pserv/testing/factory.py 2012-05-30 15:40:25 +0000
@@ -21,11 +21,11 @@
from time import time
from xmlrpclib import Fault
-from provisioningserver.cobblerclient import (
+from maas.pserv.cobblerclient import (
CobblerDistro,
CobblerProfile,
)
-from provisioningserver.enum import POWER_TYPE
+from maas.pserv.enum import POWER_TYPE
from twisted.internet.defer import (
inlineCallbacks,
returnValue,
=== modified file 'src/maas/pserv/testing/fakeapi.py'
--- src/provisioningserver/testing/fakeapi.py 2012-04-16 10:00:51 +0000
+++ src/maas/pserv/testing/fakeapi.py 2012-05-30 15:40:25 +0000
@@ -26,7 +26,7 @@
from base64 import b64encode
from functools import wraps
-from provisioningserver.interfaces import IProvisioningAPI
+from maas.pserv.interfaces import IProvisioningAPI
from twisted.internet import defer
from zope.interface import implementer
from zope.interface.interface import Method
=== modified file 'src/maas/pserv/testing/fakecobbler.py'
--- src/provisioningserver/testing/fakecobbler.py 2012-04-20 09:58:23 +0000
+++ src/maas/pserv/testing/fakecobbler.py 2012-05-30 15:40:25 +0000
@@ -29,7 +29,7 @@
Fault,
)
-from provisioningserver.cobblerclient import CobblerSession
+from maas.pserv.cobblerclient import CobblerSession
from twisted.internet.defer import (
inlineCallbacks,
returnValue,
=== modified file 'src/maas/pserv/testing/realcobbler.py'
--- src/provisioningserver/testing/realcobbler.py 2012-04-17 09:20:48 +0000
+++ src/maas/pserv/testing/realcobbler.py 2012-05-30 15:40:25 +0000
@@ -16,10 +16,10 @@
from os import environ
from textwrap import dedent
+from unittest import skipIf
from urlparse import urlparse
-from unittest import skipIf
-from provisioningserver.cobblerclient import CobblerSession
+from maas.pserv.cobblerclient import CobblerSession
class RealCobbler:
=== modified file 'src/maas/pserv/tests/__init__.py'
--- src/provisioningserver/tests/__init__.py 2012-04-16 10:00:51 +0000
+++ src/maas/pserv/tests/__init__.py 2012-05-30 15:40:25 +0000
@@ -1,7 +1,7 @@
# Copyright 2005-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Tests for `provisioningserver`."""
+"""Tests for `maas.pserv`."""
from __future__ import (
absolute_import,
=== modified file 'src/maas/pserv/tests/test_amqaclient.py'
--- src/provisioningserver/tests/test_amqaclient.py 2012-04-16 10:00:51 +0000
+++ src/maas/pserv/tests/test_amqaclient.py 2012-05-30 15:40:25 +0000
@@ -12,8 +12,8 @@
__metaclass__ = type
__all__ = []
-from provisioningserver.amqpclient import AMQFactory
-from provisioningserver.testing.amqpclient import AMQTest
+from maas.pserv.amqpclient import AMQFactory
+from maas.pserv.testing.amqpclient import AMQTest
from testtools import TestCase
from testtools.deferredruntest import flush_logged_errors
from twisted.internet.defer import Deferred
=== modified file 'src/maas/pserv/tests/test_api.py'
--- src/provisioningserver/tests/test_api.py 2012-05-21 10:57:08 +0000
+++ src/maas/pserv/tests/test_api.py 2012-05-30 15:40:25 +0000
@@ -1,9 +1,9 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Tests for `provisioningserver.api`.
+"""Tests for `maas.pserv.api`.
-Also tests `provisioningserver.testing.fakeapi`.
+Also tests `maas.pserv.testing.fakeapi`.
"""
from __future__ import (
@@ -22,9 +22,7 @@
from base64 import b64decode
from contextlib import contextmanager
-from maasserver.utils import map_enum
-from maastesting.factory import factory
-from provisioningserver.api import (
+from maas.pserv.api import (
cobbler_to_papi_distro,
cobbler_to_papi_node,
cobbler_to_papi_profile,
@@ -32,13 +30,15 @@
postprocess_mapping,
ProvisioningAPI,
)
-from provisioningserver.cobblerclient import CobblerSystem
-from provisioningserver.enum import POWER_TYPE
-from provisioningserver.interfaces import IProvisioningAPI
-from provisioningserver.testing.factory import ProvisioningFakeFactory
-from provisioningserver.testing.fakeapi import FakeAsynchronousProvisioningAPI
-from provisioningserver.testing.fakecobbler import make_fake_cobbler_session
-from provisioningserver.testing.realcobbler import RealCobbler
+from maas.pserv.cobblerclient import CobblerSystem
+from maas.pserv.enum import POWER_TYPE
+from maas.pserv.interfaces import IProvisioningAPI
+from maas.pserv.testing.factory import ProvisioningFakeFactory
+from maas.pserv.testing.fakeapi import FakeAsynchronousProvisioningAPI
+from maas.pserv.testing.fakecobbler import make_fake_cobbler_session
+from maas.pserv.testing.realcobbler import RealCobbler
+from maasserver.utils import map_enum
+from maastesting.factory import factory
from testtools import TestCase
from testtools.deferredruntest import AsynchronousDeferredRunTest
from testtools.matchers import (
@@ -51,7 +51,7 @@
class TestFunctions(TestCase):
- """Tests for the free functions in `provisioningserver.api`."""
+ """Tests for the free functions in `maas.pserv.api`."""
def test_postprocess_mapping(self):
data = {
@@ -294,7 +294,7 @@
class ProvisioningAPITests(ProvisioningFakeFactory):
- """Tests for `provisioningserver.api.ProvisioningAPI`.
+ """Tests for `maas.pserv.api.ProvisioningAPI`.
Abstract base class. To exercise these tests, derive a test case from
this class as well as from TestCase. Provide it with a
=== modified file 'src/maas/pserv/tests/test_cobblercatcher.py'
--- src/provisioningserver/tests/test_cobblercatcher.py 2012-04-20 11:00:49 +0000
+++ src/maas/pserv/tests/test_cobblercatcher.py 2012-05-30 15:40:25 +0000
@@ -18,22 +18,22 @@
)
from xmlrpclib import Fault
-from maastesting.factory import factory
-from provisioningserver.cobblercatcher import (
+from maas.pserv.cobblercatcher import (
convert_cobbler_exception,
divine_fault_code,
extract_text,
ProvisioningError,
)
-from provisioningserver.cobblerclient import CobblerSystem
-from provisioningserver.enum import PSERV_FAULT
-from provisioningserver.testing.fakecobbler import (
+from maas.pserv.cobblerclient import CobblerSystem
+from maas.pserv.enum import PSERV_FAULT
+from maas.pserv.testing.fakecobbler import (
fake_auth_failure_string,
fake_token,
make_fake_cobbler_session,
)
-from provisioningserver.testing.realcobbler import RealCobbler
-from provisioningserver.utils import deferred
+from maas.pserv.testing.realcobbler import RealCobbler
+from maas.pserv.utils import deferred
+from maastesting.factory import factory
from testtools import TestCase
from testtools.deferredruntest import AsynchronousDeferredRunTest
from twisted.internet.defer import inlineCallbacks
=== modified file 'src/maas/pserv/tests/test_cobblerclient.py'
--- src/provisioningserver/tests/test_cobblerclient.py 2012-04-20 13:45:22 +0000
+++ src/maas/pserv/tests/test_cobblerclient.py 2012-05-30 15:40:25 +0000
@@ -1,7 +1,7 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Tests for `provisioningserver.cobblerclient`."""
+"""Tests for `maas.pserv.cobblerclient`."""
from __future__ import (
absolute_import,
@@ -15,8 +15,7 @@
from itertools import count
from random import randint
-from maastesting.testcase import TestCase
-from provisioningserver.cobblerclient import (
+from maas.pserv.cobblerclient import (
CobblerDistro,
CobblerImage,
CobblerPreseeds,
@@ -26,8 +25,9 @@
CobblerXMLRPCProxy,
tilde_to_None,
)
-from provisioningserver.testing.factory import CobblerFakeFactory
-from provisioningserver.testing.fakecobbler import log_in_to_fake_cobbler
+from maas.pserv.testing.factory import CobblerFakeFactory
+from maas.pserv.testing.fakecobbler import log_in_to_fake_cobbler
+from maastesting.testcase import TestCase
from testtools.deferredruntest import AsynchronousDeferredRunTest
from testtools.testcase import ExpectedException
from twisted.internet.defer import (
=== modified file 'src/maas/pserv/tests/test_cobblersession.py'
--- src/provisioningserver/tests/test_cobblersession.py 2012-04-20 09:58:23 +0000
+++ src/maas/pserv/tests/test_cobblersession.py 2012-05-30 15:40:25 +0000
@@ -17,15 +17,15 @@
from xmlrpclib import Fault
import fixtures
-from maastesting.factory import factory
-from provisioningserver import cobblerclient
-from provisioningserver.cobblercatcher import ProvisioningError
-from provisioningserver.enum import PSERV_FAULT
-from provisioningserver.testing.fakecobbler import (
+from maas.pserv import cobblerclient
+from maas.pserv.cobblercatcher import ProvisioningError
+from maas.pserv.enum import PSERV_FAULT
+from maas.pserv.testing.fakecobbler import (
fake_auth_failure_string,
fake_object_not_found_string,
fake_token,
)
+from maastesting.factory import factory
from testtools.content import text_content
from testtools.deferredruntest import (
assert_fails_with,
@@ -408,7 +408,7 @@
def test__issue_call_times_out(self):
clock = Clock()
patch = fixtures.MonkeyPatch(
- "provisioningserver.cobblerclient.default_reactor", clock)
+ "maas.pserv.cobblerclient.default_reactor", clock)
self.useFixture(patch)
session = make_recording_session(fake_proxy=DeadProxy)
=== modified file 'src/maas/pserv/tests/test_fakecobbler.py'
--- src/provisioningserver/tests/test_fakecobbler.py 2012-04-20 14:36:16 +0000
+++ src/maas/pserv/tests/test_fakecobbler.py 2012-05-30 15:40:25 +0000
@@ -12,14 +12,14 @@
__metaclass__ = type
__all__ = []
-from maastesting.testcase import TestCase
-from provisioningserver.cobblercatcher import ProvisioningError
-from provisioningserver.cobblerclient import CobblerRepo
-from provisioningserver.testing.factory import CobblerFakeFactory
-from provisioningserver.testing.fakecobbler import (
+from maas.pserv.cobblercatcher import ProvisioningError
+from maas.pserv.cobblerclient import CobblerRepo
+from maas.pserv.testing.factory import CobblerFakeFactory
+from maas.pserv.testing.fakecobbler import (
FakeCobbler,
log_in_to_fake_cobbler,
)
+from maastesting.testcase import TestCase
from testtools.content import text_content
from testtools.deferredruntest import AsynchronousDeferredRunTest
from testtools.testcase import ExpectedException
=== modified file 'src/maas/pserv/tests/test_plugin.py'
--- src/provisioningserver/tests/test_plugin.py 2012-04-20 12:54:26 +0000
+++ src/maas/pserv/tests/test_plugin.py 2012-05-30 15:40:25 +0000
@@ -22,16 +22,16 @@
import xmlrpclib
import formencode
-from maastesting.factory import factory
-from maastesting.testcase import TestCase
-from provisioningserver.plugin import (
+from maas.pserv.plugin import (
Config,
Options,
ProvisioningRealm,
ProvisioningServiceMaker,
SingleUsernamePasswordChecker,
)
-from provisioningserver.testing.fakecobbler import make_fake_cobbler_session
+from maas.pserv.testing.fakecobbler import make_fake_cobbler_session
+from maastesting.factory import factory
+from maastesting.testcase import TestCase
from testtools.deferredruntest import (
assert_fails_with,
AsynchronousDeferredRunTest,
@@ -54,7 +54,7 @@
class TestConfig(TestCase):
- """Tests for `provisioningserver.plugin.Config`."""
+ """Tests for `maas.pserv.plugin.Config`."""
def test_defaults(self):
mandatory = {
@@ -107,7 +107,7 @@
def test_load_example(self):
# The example configuration can be loaded and validated.
filename = os.path.join(
- os.path.dirname(__file__), os.pardir,
+ os.path.dirname(__file__), os.pardir, os.pardir,
os.pardir, os.pardir, "etc", "pserv.yaml")
Config.load(filename)
@@ -125,7 +125,7 @@
class TestOptions(TestCase):
- """Tests for `provisioningserver.plugin.Options`."""
+ """Tests for `maas.pserv.plugin.Options`."""
def test_defaults(self):
options = Options()
@@ -146,7 +146,7 @@
class TestProvisioningServiceMaker(TestCase):
- """Tests for `provisioningserver.plugin.ProvisioningServiceMaker`."""
+ """Tests for `maas.pserv.plugin.ProvisioningServiceMaker`."""
run_tests_with = AsynchronousDeferredRunTest.make_factory(timeout=5)
=== modified file 'src/maas/pserv/tests/test_remote.py'
--- src/provisioningserver/tests/test_remote.py 2012-04-16 10:00:51 +0000
+++ src/maas/pserv/tests/test_remote.py 2012-05-30 15:40:25 +0000
@@ -1,7 +1,7 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Tests for `provisioningserver.remote`."""
+"""Tests for `maas.pserv.remote`."""
from __future__ import (
absolute_import,
@@ -12,19 +12,19 @@
__metaclass__ = type
__all__ = []
-from provisioningserver.interfaces import (
+from maas.pserv.interfaces import (
IProvisioningAPI,
IProvisioningAPI_XMLRPC,
)
-from provisioningserver.remote import ProvisioningAPI_XMLRPC
-from provisioningserver.testing.fakecobbler import make_fake_cobbler_session
+from maas.pserv.remote import ProvisioningAPI_XMLRPC
+from maas.pserv.testing.fakecobbler import make_fake_cobbler_session
from testtools import TestCase
from testtools.deferredruntest import SynchronousDeferredRunTest
from zope.interface.verify import verifyObject
class TestProvisioningAPI_XMLRPC(TestCase):
- """Tests for `provisioningserver.remote.ProvisioningAPI_XMLRPC`."""
+ """Tests for `maas.pserv.remote.ProvisioningAPI_XMLRPC`."""
run_tests_with = SynchronousDeferredRunTest
=== modified file 'src/maas/pserv/tests/test_services.py'
--- src/provisioningserver/tests/test_services.py 2012-04-20 12:54:26 +0000
+++ src/maas/pserv/tests/test_services.py 2012-05-30 15:40:25 +0000
@@ -1,7 +1,7 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Tests for `provisioningserver.services`."""
+"""Tests for `maas.pserv.services`."""
from __future__ import (
absolute_import,
@@ -16,13 +16,13 @@
import signal
import sys
+from maas.pserv.services import (
+ LogService,
+ OOPSService,
+ )
from maastesting.factory import factory
from maastesting.testcase import TestCase
from oops_twisted import OOPSObserver
-from provisioningserver.services import (
- LogService,
- OOPSService,
- )
from testtools.content import content_from_file
from testtools.deferredruntest import AsynchronousDeferredRunTest
from twisted.application.service import MultiService
@@ -62,7 +62,7 @@
class TestLogService(TestServicesBase, TestCase):
- """Tests for `provisioningserver.services.LogService`."""
+ """Tests for `maas.pserv.services.LogService`."""
def test_log_to_stdout(self):
log_service = LogService("-")
@@ -90,7 +90,7 @@
class TestOOPSService(TestServicesBase, TestCase):
- """Tests for `provisioningserver.services.OOPSService`."""
+ """Tests for `maas.pserv.services.OOPSService`."""
def setUp(self):
super(TestOOPSService, self).setUp()
=== modified file 'src/maas/pserv/tests/test_tasks.py'
--- src/provisioningserver/tests/test_tasks.py 2012-05-29 08:07:16 +0000
+++ src/maas/pserv/tests/test_tasks.py 2012-05-30 15:40:25 +0000
@@ -12,17 +12,16 @@
__metaclass__ = type
__all__ = []
+from maas.pserv.enum import POWER_TYPE
+from maas.pserv.power.poweraction import PowerActionFail
+from maas.pserv.tasks import (
+ power_off,
+ power_on,
+ )
from maastesting.celery import CeleryFixture
from maastesting.testcase import TestCase
-from provisioningserver.enum import POWER_TYPE
-from provisioningserver.power.poweraction import PowerActionFail
-from provisioningserver.tasks import (
- power_off,
- power_on,
- )
from testresources import FixtureResource
-
# An arbitrary MAC address. Not using a properly random one here since
# we might accidentally affect real machines on the network.
arbitrary_mac = "AA:BB:CC:DD:EE:FF"
=== modified file 'src/maasserver/models/__init__.py'
--- src/maasserver/models/__init__.py 2012-05-28 14:28:46 +0000
+++ src/maasserver/models/__init__.py 2012-05-30 15:40:25 +0000
@@ -55,6 +55,11 @@
)
from django.db.models.signals import post_save
from django.shortcuts import get_object_or_404
+from maas.pserv.enum import (
+ POWER_TYPE,
+ POWER_TYPE_CHOICES,
+ )
+from maas.pserv.tasks import power_on
from maasserver import DefaultMeta
from maasserver.enum import (
ARCHITECTURE,
@@ -84,11 +89,6 @@
Consumer,
Token,
)
-from provisioningserver.enum import (
- POWER_TYPE,
- POWER_TYPE_CHOICES,
- )
-from provisioningserver.tasks import power_on
# Special users internal to MAAS.
SYSTEM_USERS = [
=== modified file 'src/maasserver/models/config.py'
--- src/maasserver/models/config.py 2012-05-06 09:00:14 +0000
+++ src/maasserver/models/config.py 2012-05-30 15:40:25 +0000
@@ -19,13 +19,17 @@
import copy
from socket import gethostname
-from django.db.models import Manager, Model, CharField
+from django.conf import settings
+from django.db.models import (
+ CharField,
+ Manager,
+ Model,
+ )
from django.db.models.signals import post_save
-from django.conf import settings
+from maas.pserv.enum import POWER_TYPE
from maasserver import DefaultMeta
from maasserver.enum import NODE_AFTER_COMMISSIONING_ACTION
from maasserver.fields import JSONObjectField
-from provisioningserver.enum import POWER_TYPE
def get_default_config():
=== modified file 'src/maasserver/power_parameters.py'
--- src/maasserver/power_parameters.py 2012-05-25 16:13:50 +0000
+++ src/maasserver/power_parameters.py 2012-05-30 15:40:25 +0000
@@ -34,7 +34,7 @@
from operator import attrgetter
from django.core.exceptions import ValidationError
-from provisioningserver.enum import POWER_TYPE
+from maas.pserv.enum import POWER_TYPE
PowerParameter = namedtuple(
=== modified file 'src/maasserver/provisioning.py'
--- src/maasserver/provisioning.py 2012-04-20 15:16:41 +0000
+++ src/maasserver/provisioning.py 2012-05-30 15:40:25 +0000
@@ -33,6 +33,7 @@
)
from django.dispatch import receiver
from django.utils.safestring import mark_safe
+from maas.pserv.enum import PSERV_FAULT
from maasserver.components import (
COMPONENT,
discard_persistent_error,
@@ -48,7 +49,6 @@
MACAddress,
Node,
)
-from provisioningserver.enum import PSERV_FAULT
import yaml
# Presentation templates for various provisioning faults (will be used
=== modified file 'src/maasserver/testing/__init__.py'
--- src/maasserver/testing/__init__.py 2012-04-27 12:38:18 +0000
+++ src/maasserver/testing/__init__.py 2012-05-30 15:40:25 +0000
@@ -26,7 +26,7 @@
from uuid import uuid1
from lxml.html import fromstring
-from provisioningserver.testing import fakeapi
+from maas.pserv.testing import fakeapi
# Current (singleton) fake provisioning API server.
fake_provisioning_proxy = None
=== modified file 'src/maasserver/testing/tests/test_module.py'
--- src/maasserver/testing/tests/test_module.py 2012-04-27 12:38:18 +0000
+++ src/maasserver/testing/tests/test_module.py 2012-05-30 15:40:25 +0000
@@ -18,6 +18,7 @@
HttpResponse,
HttpResponseRedirect,
)
+from maas.pserv.testing import fakeapi
from maasserver import provisioning
from maasserver.testing import (
extract_redirect,
@@ -30,7 +31,6 @@
TestCase,
TestModelTestCase,
)
-from provisioningserver.testing import fakeapi
# Horrible kludge. Works around a bug where delete() does not work on
# test models when using nose. Without this, running the tests in this
=== modified file 'src/maasserver/tests/test_api.py'
--- src/maasserver/tests/test_api.py 2012-05-24 16:10:47 +0000
+++ src/maasserver/tests/test_api.py 2012-05-30 15:40:25 +0000
@@ -33,6 +33,7 @@
from django.db.models.signals import post_save
from django.http import QueryDict
from fixtures import Fixture
+from maas.pserv.enum import POWER_TYPE
from maasserver import api
from maasserver.api import (
EDITABLE_NODE_FIELDS,
@@ -73,7 +74,6 @@
NodeUserData,
)
from metadataserver.nodeinituser import get_node_init_user
-from provisioningserver.enum import POWER_TYPE
class APIv10TestMixin:
=== modified file 'src/maasserver/tests/test_forms.py'
--- src/maasserver/tests/test_forms.py 2012-05-05 09:47:03 +0000
+++ src/maasserver/tests/test_forms.py 2012-05-30 15:40:25 +0000
@@ -18,6 +18,7 @@
ValidationError,
)
from django.http import QueryDict
+from maas.pserv.enum import POWER_TYPE_CHOICES
from maasserver.enum import (
ARCHITECTURE,
NODE_AFTER_COMMISSIONING_ACTION_CHOICES,
@@ -48,7 +49,6 @@
)
from maasserver.testing.factory import factory
from maasserver.testing.testcase import TestCase
-from provisioningserver.enum import POWER_TYPE_CHOICES
from testtools.testcase import ExpectedException
=== modified file 'src/maasserver/tests/test_models.py'
--- src/maasserver/tests/test_models.py 2012-05-30 01:41:24 +0000
+++ src/maasserver/tests/test_models.py 2012-05-30 15:40:25 +0000
@@ -21,6 +21,7 @@
ValidationError,
)
from django.db import transaction
+from maas.pserv.enum import POWER_TYPE
from maasserver.enum import (
NODE_PERMISSION,
NODE_STATUS,
@@ -68,7 +69,6 @@
SECRET_SIZE,
Token,
)
-from provisioningserver.enum import POWER_TYPE
from testtools.matchers import FileContains
@@ -355,7 +355,7 @@
}
self.assertAttributes(node, expected_attrs)
self.assertEqual(
- (1, 'provisioningserver.tasks.power_on'),
+ (1, 'maas.pserv.tasks.power_on'),
(len(fixture.tasks), fixture.tasks[0]['task'].name))
def test_start_commissioning_sets_user_data(self):
@@ -668,7 +668,7 @@
self.assertItemsEqual([node], output)
self.assertEqual(
- (1, 'provisioningserver.tasks.power_on', mac.mac_address),
+ (1, 'maas.pserv.tasks.power_on', mac.mac_address),
(
len(fixture.tasks),
fixture.tasks[0]['task'].name,
@@ -716,7 +716,7 @@
self.assertItemsEqual([node], output)
self.assertEqual(
- (1, 'provisioningserver.tasks.power_on'),
+ (1, 'maas.pserv.tasks.power_on'),
(len(fixture.tasks), fixture.tasks[0]['task'].name))
def test_start_nodes_wakeonlan_prefers_power_parameters(self):
@@ -733,7 +733,7 @@
self.assertItemsEqual([node], output)
self.assertEqual(
- (1, 'provisioningserver.tasks.power_on', preferred_mac),
+ (1, 'maas.pserv.tasks.power_on', preferred_mac),
(
len(fixture.tasks),
fixture.tasks[0]['task'].name,
@@ -777,7 +777,7 @@
self.assertItemsEqual([node], output)
self.assertEqual(
- (1, 'provisioningserver.tasks.power_on',
+ (1, 'maas.pserv.tasks.power_on',
"qemu", "localhost", "nobody"),
(
len(fixture.tasks),
=== modified file 'src/maasserver/tests/test_node_action.py'
--- src/maasserver/tests/test_node_action.py 2012-05-23 16:32:15 +0000
+++ src/maasserver/tests/test_node_action.py 2012-05-30 15:40:25 +0000
@@ -15,6 +15,7 @@
from urlparse import urlparse
from django.core.urlresolvers import reverse
+from maas.pserv.enum import POWER_TYPE
from maasserver.enum import (
NODE_PERMISSION,
NODE_STATUS,
@@ -32,7 +33,6 @@
from maasserver.testing.factory import factory
from maasserver.testing.testcase import TestCase
from maastesting.celery import CeleryFixture
-from provisioningserver.enum import POWER_TYPE
ALL_STATUSES = NODE_STATUS_CHOICES_DICT.keys()
@@ -196,7 +196,7 @@
action.execute()
self.assertEqual(NODE_STATUS.COMMISSIONING, node.status)
self.assertEqual(
- 'provisioningserver.tasks.power_on',
+ 'maas.pserv.tasks.power_on',
fixture.tasks[0]['task'].name)
def test_RetryCommissioning_starts_commissioning(self):
@@ -208,7 +208,7 @@
action.execute()
self.assertEqual(NODE_STATUS.COMMISSIONING, node.status)
self.assertEqual(
- 'provisioningserver.tasks.power_on',
+ 'maas.pserv.tasks.power_on',
fixture.tasks[0]['task'].name)
def test_StartNode_inhibit_allows_user_with_SSH_key(self):
@@ -234,5 +234,5 @@
self.assertEqual(NODE_STATUS.ALLOCATED, node.status)
self.assertEqual(user, node.owner)
self.assertEqual(
- 'provisioningserver.tasks.power_on',
+ 'maas.pserv.tasks.power_on',
fixture.tasks[0]['task'].name)
=== modified file 'src/maasserver/tests/test_power_parameters.py'
--- src/maasserver/tests/test_power_parameters.py 2012-05-25 16:13:50 +0000
+++ src/maasserver/tests/test_power_parameters.py 2012-05-30 15:40:25 +0000
@@ -15,6 +15,7 @@
from operator import attrgetter
from django.core.exceptions import ValidationError
+from maas.pserv.enum import POWER_TYPE
from maasserver.power_parameters import (
POWER_TYPE_PARAMETERS,
PowerParameter,
@@ -24,7 +25,6 @@
from maasserver.testing.testcase import TestCase
from maasserver.utils import map_enum
from maastesting.matchers import ContainsAll
-from provisioningserver.enum import POWER_TYPE
from testtools.matchers import (
AllMatch,
IsInstance,
=== modified file 'src/maasserver/tests/test_provisioning.py'
--- src/maasserver/tests/test_provisioning.py 2012-05-03 08:48:25 +0000
+++ src/maasserver/tests/test_provisioning.py 2012-05-30 15:40:25 +0000
@@ -17,6 +17,11 @@
from xmlrpclib import Fault
from django.conf import settings
+from maas.pserv.enum import (
+ POWER_TYPE,
+ PSERV_FAULT,
+ )
+from maas.pserv.testing.factory import ProvisioningFakeFactory
from maasserver import (
components,
provisioning,
@@ -60,11 +65,6 @@
from maasserver.testing.testcase import TestCase
from maasserver.utils import map_enum
from metadataserver.models import NodeKey
-from provisioningserver.enum import (
- POWER_TYPE,
- PSERV_FAULT,
- )
-from provisioningserver.testing.factory import ProvisioningFakeFactory
from testtools.deferredruntest import AsynchronousDeferredRunTest
from testtools.matchers import (
KeysEqual,
=== modified file 'src/maasserver/tests/test_views.py'
--- src/maasserver/tests/test_views.py 2012-04-30 16:26:38 +0000
+++ src/maasserver/tests/test_views.py 2012-05-30 15:40:25 +0000
@@ -22,6 +22,7 @@
from django.test.client import RequestFactory
from django.utils.html import escape
from lxml.html import fromstring
+from maas.pserv.enum import PSERV_FAULT
from maasserver import components
from maasserver.components import register_persistent_error
from maasserver.exceptions import ExternalComponentException
@@ -31,11 +32,10 @@
LoggedInTestCase,
TestCase,
)
+from maasserver.utils import map_enum
from maasserver.views import HelpfulDeleteView
from maasserver.views.nodes import NodeEdit
-from maasserver.utils import map_enum
from maastesting.matchers import ContainsAll
-from provisioningserver.enum import PSERV_FAULT
class Test404500(LoggedInTestCase):
=== modified file 'src/maasserver/tests/test_views_nodes.py'
--- src/maasserver/tests/test_views_nodes.py 2012-05-22 12:27:18 +0000
+++ src/maasserver/tests/test_views_nodes.py 2012-05-30 15:40:25 +0000
@@ -17,6 +17,7 @@
from django.conf import settings
from django.core.urlresolvers import reverse
from lxml.html import fromstring
+from maas.pserv.enum import POWER_TYPE_CHOICES
from maasserver import messages
import maasserver.api
from maasserver.enum import (
@@ -47,7 +48,6 @@
from maasserver.views import nodes as nodes_views
from maasserver.views.nodes import get_longpoll_context
from maastesting.matchers import ContainsAll
-from provisioningserver.enum import POWER_TYPE_CHOICES
class NodeViewsTest(LoggedInTestCase):
=== modified file 'src/metadataserver/tests/test_api.py'
--- src/metadataserver/tests/test_api.py 2012-04-20 15:16:41 +0000
+++ src/metadataserver/tests/test_api.py 2012-05-30 15:40:25 +0000
@@ -16,6 +16,7 @@
import httplib
from io import BytesIO
+from maas.pserv.testing.factory import ProvisioningFakeFactory
from maasserver.enum import NODE_STATUS
from maasserver.exceptions import Unauthorized
from maasserver.models import SSHKey
@@ -38,7 +39,6 @@
NodeUserData,
)
from metadataserver.nodeinituser import get_node_init_user
-from provisioningserver.testing.factory import ProvisioningFakeFactory
class TestHelpers(DjangoTestCase):
=== modified file 'twisted/plugins/maasps.py'
--- twisted/plugins/maasps.py 2012-04-16 10:00:51 +0000
+++ twisted/plugins/maasps.py 2012-05-30 15:40:25 +0000
@@ -13,7 +13,7 @@
__all__ = []
-from provisioningserver.plugin import ProvisioningServiceMaker
+from maas.pserv.plugin import ProvisioningServiceMaker
# Construct objects which *provide* the relevant interfaces. The name of
# these variables is irrelevant, as long as there are *some* names bound