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
1=== modified file 'src/provisioningserver/rpc/clusterservice.py'
2--- src/provisioningserver/rpc/clusterservice.py 2014-08-26 17:23:16 +0000
3+++ src/provisioningserver/rpc/clusterservice.py 2014-09-02 09:30:41 +0000
4@@ -14,7 +14,6 @@
5 __metaclass__ = type
6 __all__ = [
7 "ClusterClientService",
8- "ClusterService",
9 ]
10
11 import json
12@@ -55,19 +54,14 @@
13 change_power_state,
14 get_power_state,
15 )
16-from twisted.application.internet import (
17- StreamServerEndpointService,
18- TimerService,
19- )
20+from twisted.application.internet import TimerService
21 from twisted.internet import ssl
22 from twisted.internet.defer import inlineCallbacks
23 from twisted.internet.endpoints import (
24 connectProtocol,
25 TCP4ClientEndpoint,
26- TCP4ServerEndpoint,
27 )
28 from twisted.internet.error import ConnectError
29-from twisted.internet.protocol import Factory
30 from twisted.protocols import amp
31 from twisted.python import (
32 filepath,
33@@ -223,19 +217,6 @@
34 }
35
36
37-class ClusterService(StreamServerEndpointService):
38- """A cluster controller RPC service.
39-
40- This is a service - in the Twisted sense - that exposes the
41- ``Cluster`` protocol on the given port.
42- """
43-
44- def __init__(self, reactor, port):
45- super(ClusterService, self).__init__(
46- TCP4ServerEndpoint(reactor, port),
47- Factory.forProtocol(Cluster))
48-
49-
50 @implementer(IConnection)
51 class ClusterClient(Cluster):
52 """The RPC protocol supported by a cluster controller, client version.
53
54=== modified file 'src/provisioningserver/rpc/tests/test_clusterservice.py'
55--- src/provisioningserver/rpc/tests/test_clusterservice.py 2014-09-01 08:40:13 +0000
56+++ src/provisioningserver/rpc/tests/test_clusterservice.py 2014-09-02 09:30:41 +0000
57@@ -27,7 +27,6 @@
58 MockCalledWith,
59 MockCallsMatch,
60 MockNotCalled,
61- Provides,
62 )
63 from maastesting.testcase import (
64 MAASTestCase,
65@@ -62,7 +61,6 @@
66 Cluster,
67 ClusterClient,
68 ClusterClientService,
69- ClusterService,
70 )
71 from provisioningserver.rpc.interfaces import IConnection
72 from provisioningserver.rpc.osystems import gen_operating_systems
73@@ -87,21 +85,13 @@
74 MatchesListwise,
75 MatchesStructure,
76 )
77-from twisted.application.internet import (
78- StreamServerEndpointService,
79- TimerService,
80- )
81-from twisted.internet import (
82- error,
83- reactor,
84- )
85+from twisted.application.internet import TimerService
86+from twisted.internet import error
87 from twisted.internet.defer import (
88 inlineCallbacks,
89 succeed,
90 )
91 from twisted.internet.endpoints import TCP4ClientEndpoint
92-from twisted.internet.interfaces import IStreamServerEndpoint
93-from twisted.internet.protocol import Factory
94 from twisted.internet.task import Clock
95 from twisted.protocols import amp
96 from twisted.test.proto_helpers import StringTransportWithDisconnection
97@@ -296,19 +286,6 @@
98 JSON_POWER_TYPE_PARAMETERS, response["power_types"])
99
100
101-class TestClusterService(MAASTestCase):
102-
103- def test_init_sets_appropriate_instance_attributes(self):
104- # ClusterService is a convenience wrapper around
105- # StreamServerEndpointService. There's not much to demonstrate
106- # other than it has been initialised correctly.
107- service = ClusterService(reactor, 0)
108- self.assertThat(service, IsInstance(StreamServerEndpointService))
109- self.assertThat(service.endpoint, Provides(IStreamServerEndpoint))
110- self.assertThat(service.factory, IsInstance(Factory))
111- self.assertThat(service.factory.protocol, Equals(Cluster))
112-
113-
114 class TestClusterClientService(MAASTestCase):
115
116 run_tests_with = MAASTwistedRunTest.make_factory(timeout=5)