Merge lp:~julian-edwards/maas/remove-old-code into lp:~maas-committers/maas/trunk

Proposed by Julian Edwards
Status: Merged
Approved by: Julian Edwards
Approved revision: no longer in the source branch.
Merged at revision: 2870
Proposed branch: lp:~julian-edwards/maas/remove-old-code
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 116 lines (+3/-45)
2 files modified
src/provisioningserver/rpc/clusterservice.py (+1/-20)
src/provisioningserver/rpc/tests/test_clusterservice.py (+2/-25)
To merge this branch: bzr merge lp:~julian-edwards/maas/remove-old-code
Reviewer Review Type Date Requested Status
Julian Edwards (community) selfie Approve
Review via email: mp+232963@code.launchpad.net

Commit message

Remove some dead code that was not being used anywhere.

To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) :
review: Approve (selfie)
Revision history for this message
MAAS Lander (maas-lander) wrote :
Download full text (19.2 KiB)

The attempt to merge lp:~julian-edwards/maas/remove-old-code into lp:maas failed. Below is the output from the failed tests.

Ign http://security.ubuntu.com trusty-security InRelease
Hit http://security.ubuntu.com trusty-security Release.gpg
Hit http://security.ubuntu.com trusty-security Release
Ign http://nova.clouds.archive.ubuntu.com trusty InRelease
Ign http://nova.clouds.archive.ubuntu.com trusty-updates InRelease
Hit http://nova.clouds.archive.ubuntu.com trusty Release.gpg
Hit http://nova.clouds.archive.ubuntu.com trusty-updates Release.gpg
Hit http://nova.clouds.archive.ubuntu.com trusty Release
Hit http://nova.clouds.archive.ubuntu.com trusty-updates Release
Hit http://security.ubuntu.com trusty-security/main Sources
Hit http://security.ubuntu.com trusty-security/universe Sources
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty/main Sources
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Sources
Hit http://nova.clouds.archive.ubuntu.com trusty/main amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/main Sources
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/universe Sources
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/main amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/universe amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/universe Translation-en
Ign http://nova.clouds.archive.ubuntu.com trusty/main Translation-en_US
Ign http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en_US
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
     --no-install-recommends install apache2 authbind bind9 bind9utils build-essential bzr-builddeb curl daemontools debhelper dh-apport distro-info dnsutils firefox freeipmi-tools ipython isc-dhcp-common libjs-raphael libjs-yui3-full libjs-yui3-min libpq-dev make pep8 postgresql pyflakes python-amqplib python-bzrlib python-celery python-convoy python-crochet python-cssselect python-curtin python-dev python-distro-info python-django python-django-piston python-django-south python-djorm-ext-pgarray python-docutils python-extras python-fixtures python-flake8 python-formencode python-hivex python-httplib2 python-jinja2 python-jsonschema python-lockfile python-lxml python-mimeparse python-mock python-netaddr python-netifaces python-nose python-oauth python-oops python-oops-amqp python-oops-datedir-repo python-oops-twisted python-oops-wsgi python-openssl python-paramiko python-pexpect python-pip python-pocket-lint python-psycopg2 python-pyinotify python-seamicroclient python-simplejson python-simplestreams python-sphinx ...

Revision history for this message
MAAS Lander (maas-lander) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
MAAS Lander (maas-lander) wrote :
Download full text (18.9 KiB)

The attempt to merge lp:~julian-edwards/maas/remove-old-code into lp:maas failed. Below is the output from the failed tests.

Ign http://security.ubuntu.com trusty-security InRelease
Hit http://security.ubuntu.com trusty-security Release.gpg
Hit http://security.ubuntu.com trusty-security Release
Ign http://nova.clouds.archive.ubuntu.com trusty InRelease
Ign http://nova.clouds.archive.ubuntu.com trusty-updates InRelease
Hit http://nova.clouds.archive.ubuntu.com trusty Release.gpg
Hit http://nova.clouds.archive.ubuntu.com trusty-updates Release.gpg
Hit http://nova.clouds.archive.ubuntu.com trusty Release
Hit http://nova.clouds.archive.ubuntu.com trusty-updates Release
Hit http://security.ubuntu.com trusty-security/main Sources
Hit http://security.ubuntu.com trusty-security/universe Sources
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty/main Sources
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Sources
Hit http://nova.clouds.archive.ubuntu.com trusty/main amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/main Sources
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/universe Sources
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/main amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/universe amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/universe Translation-en
Ign http://nova.clouds.archive.ubuntu.com trusty/main Translation-en_US
Ign http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en_US
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
     --no-install-recommends install apache2 authbind bind9 bind9utils build-essential bzr-builddeb curl daemontools debhelper dh-apport distro-info dnsutils firefox freeipmi-tools ipython isc-dhcp-common libjs-raphael libjs-yui3-full libjs-yui3-min libpq-dev make pep8 postgresql pyflakes python-amqplib python-bzrlib python-celery python-convoy python-crochet python-cssselect python-curtin python-dev python-distro-info python-django python-django-piston python-django-south python-djorm-ext-pgarray python-docutils python-extras python-fixtures python-flake8 python-formencode python-hivex python-httplib2 python-jinja2 python-jsonschema python-lockfile python-lxml python-mimeparse python-mock python-netaddr python-netifaces python-nose python-oauth python-oops python-oops-amqp python-oops-datedir-repo python-oops-twisted python-oops-wsgi python-openssl python-paramiko python-pexpect python-pip python-pocket-lint python-psycopg2 python-pyinotify python-seamicroclient python-simplejson python-simplestreams python-sphinx ...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/provisioningserver/rpc/clusterservice.py'
--- src/provisioningserver/rpc/clusterservice.py 2014-08-26 17:23:16 +0000
+++ src/provisioningserver/rpc/clusterservice.py 2014-09-02 09:30:41 +0000
@@ -14,7 +14,6 @@
14__metaclass__ = type14__metaclass__ = type
15__all__ = [15__all__ = [
16 "ClusterClientService",16 "ClusterClientService",
17 "ClusterService",
18]17]
1918
20import json19import json
@@ -55,19 +54,14 @@
55 change_power_state,54 change_power_state,
56 get_power_state,55 get_power_state,
57 )56 )
58from twisted.application.internet import (57from twisted.application.internet import TimerService
59 StreamServerEndpointService,
60 TimerService,
61 )
62from twisted.internet import ssl58from twisted.internet import ssl
63from twisted.internet.defer import inlineCallbacks59from twisted.internet.defer import inlineCallbacks
64from twisted.internet.endpoints import (60from twisted.internet.endpoints import (
65 connectProtocol,61 connectProtocol,
66 TCP4ClientEndpoint,62 TCP4ClientEndpoint,
67 TCP4ServerEndpoint,
68 )63 )
69from twisted.internet.error import ConnectError64from twisted.internet.error import ConnectError
70from twisted.internet.protocol import Factory
71from twisted.protocols import amp65from twisted.protocols import amp
72from twisted.python import (66from twisted.python import (
73 filepath,67 filepath,
@@ -223,19 +217,6 @@
223 }217 }
224218
225219
226class ClusterService(StreamServerEndpointService):
227 """A cluster controller RPC service.
228
229 This is a service - in the Twisted sense - that exposes the
230 ``Cluster`` protocol on the given port.
231 """
232
233 def __init__(self, reactor, port):
234 super(ClusterService, self).__init__(
235 TCP4ServerEndpoint(reactor, port),
236 Factory.forProtocol(Cluster))
237
238
239@implementer(IConnection)220@implementer(IConnection)
240class ClusterClient(Cluster):221class ClusterClient(Cluster):
241 """The RPC protocol supported by a cluster controller, client version.222 """The RPC protocol supported by a cluster controller, client version.
242223
=== modified file 'src/provisioningserver/rpc/tests/test_clusterservice.py'
--- src/provisioningserver/rpc/tests/test_clusterservice.py 2014-09-01 08:40:13 +0000
+++ src/provisioningserver/rpc/tests/test_clusterservice.py 2014-09-02 09:30:41 +0000
@@ -27,7 +27,6 @@
27 MockCalledWith,27 MockCalledWith,
28 MockCallsMatch,28 MockCallsMatch,
29 MockNotCalled,29 MockNotCalled,
30 Provides,
31 )30 )
32from maastesting.testcase import (31from maastesting.testcase import (
33 MAASTestCase,32 MAASTestCase,
@@ -62,7 +61,6 @@
62 Cluster,61 Cluster,
63 ClusterClient,62 ClusterClient,
64 ClusterClientService,63 ClusterClientService,
65 ClusterService,
66 )64 )
67from provisioningserver.rpc.interfaces import IConnection65from provisioningserver.rpc.interfaces import IConnection
68from provisioningserver.rpc.osystems import gen_operating_systems66from provisioningserver.rpc.osystems import gen_operating_systems
@@ -87,21 +85,13 @@
87 MatchesListwise,85 MatchesListwise,
88 MatchesStructure,86 MatchesStructure,
89 )87 )
90from twisted.application.internet import (88from twisted.application.internet import TimerService
91 StreamServerEndpointService,89from twisted.internet import error
92 TimerService,
93 )
94from twisted.internet import (
95 error,
96 reactor,
97 )
98from twisted.internet.defer import (90from twisted.internet.defer import (
99 inlineCallbacks,91 inlineCallbacks,
100 succeed,92 succeed,
101 )93 )
102from twisted.internet.endpoints import TCP4ClientEndpoint94from twisted.internet.endpoints import TCP4ClientEndpoint
103from twisted.internet.interfaces import IStreamServerEndpoint
104from twisted.internet.protocol import Factory
105from twisted.internet.task import Clock95from twisted.internet.task import Clock
106from twisted.protocols import amp96from twisted.protocols import amp
107from twisted.test.proto_helpers import StringTransportWithDisconnection97from twisted.test.proto_helpers import StringTransportWithDisconnection
@@ -296,19 +286,6 @@
296 JSON_POWER_TYPE_PARAMETERS, response["power_types"])286 JSON_POWER_TYPE_PARAMETERS, response["power_types"])
297287
298288
299class TestClusterService(MAASTestCase):
300
301 def test_init_sets_appropriate_instance_attributes(self):
302 # ClusterService is a convenience wrapper around
303 # StreamServerEndpointService. There's not much to demonstrate
304 # other than it has been initialised correctly.
305 service = ClusterService(reactor, 0)
306 self.assertThat(service, IsInstance(StreamServerEndpointService))
307 self.assertThat(service.endpoint, Provides(IStreamServerEndpoint))
308 self.assertThat(service.factory, IsInstance(Factory))
309 self.assertThat(service.factory.protocol, Equals(Cluster))
310
311
312class TestClusterClientService(MAASTestCase):289class TestClusterClientService(MAASTestCase):
313290
314 run_tests_with = MAASTwistedRunTest.make_factory(timeout=5)291 run_tests_with = MAASTwistedRunTest.make_factory(timeout=5)