~ubuntu-cloud-archive/ubuntu/precise/quantum/folsom

« back to all changes in this revision

Viewing changes to quantum/tests/unit/test_debug_commands.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Adam Gandelman, Chuck Short
  • Date: 2012-09-12 13:41:20 UTC
  • mfrom: (2.1.12)
  • Revision ID: package-import@ubuntu.com-20120912134120-sheqxy7c2q5x7m34
Tags: 2012.2~rc1-0ubuntu1
[ Adam Gandelman ]
* debain/*.postrm: Fix argument-less calls to update-rc.d, redirect
  to /dev/null.  (LP: #1047560)
* debian/quantum-server.upstart: Invoke start-stop-daemon properly.
  (LP: #1047404)
* debain/*.postrm, *.upstart: Ensure files are named for corresponding
  agent package, not plugin package.
* debian/control:
  - Group agents with plugins.
  - Fix some copy/paste mistakes.
  - Set dependencies between agents and corresponding plugins.
  - Recommend quantum-plugin-openvswitch for quantum-server.
  - Require the same version of quantum-common and python-quantum.
  - Add quantum-netns-cleanup utility to quantum-common.
* debian/patches/fix-quantum-configuration.patch: Use correct database
  for linuxbridge plugin, use OVS plugin by default, call quantum-rootwrap
  correctly. (LP: #1048668)
* Fix all use of /usr/sbin, things should go in /usr/bin.
* Remove dhcp and l3 plugins, they are not actually plugins.
* Rename packages quantum-plugin-{l3, dhcp}-agent to
  quantum-{l3, dhcp}-agent.
* debain/quantum-*-agent.upstart: Specify config files as a
  parameter to --config-file, specify log files for all.
* debian/*.logrotate: Add logrotate configs for server and agents.
* Install quantum_sudoers with quantum-common, not quantum-server.
* Install rootwrap filters only with the packages that require them.
* debian/*-agent.upstart: Specify --config-file=/etc/quantum/quantum.conf
  in addition to plugin-specific config.  Specify log files for all agents.
* Allow group 'adm' read access to /var/log/quantum.
* debian/quantum-server.postinst: Drop, all has been moved to quantum-common.
* Add packaging for quantum-plugin-nec.

[ Chuck Short ]
* New usptream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
#    License for the specific language governing permissions and limitations
16
16
#    under the License.
17
17
 
18
 
import nose
19
18
import socket
20
19
import sys
21
20
import uuid
22
21
 
23
22
import mock
 
23
import nose.exc
24
24
import unittest2 as unittest
25
25
 
26
26
from quantum.agent.common import config
31
31
from quantum.debug.debug_agent import DEVICE_OWNER_PROBE, QuantumDebugAgent
32
32
from quantum.openstack.common import cfg
33
33
 
 
34
raise nose.exc.SkipTest('Skipped by Ubunut packaging')
34
35
 
35
36
class MyApp(object):
36
37
    def __init__(self, _stdout):
39
40
 
40
41
class TestDebugCommands(unittest.TestCase):
41
42
    def setUp(self):
42
 
        raise nose.exc.SkipTest('disabled by ubuntu patch')
43
43
        cfg.CONF.register_opts(interface.OPTS)
44
44
        cfg.CONF.register_opts(QuantumDebugAgent.OPTS)
45
45
        cfg.CONF(args=sys.argv, project='quantum')
132
132
                                                        )])
133
133
 
134
134
    def test_delete_probe(self):
135
 
        raise nose.exc.SkipTest('disabled by ubuntu patch')
136
135
        cmd = commands.DeleteProbe(self.app, None)
137
136
        cmd_parser = cmd.get_parser('delete_probe')
138
137
        args = ['fake_port']
146
145
                                      namespace=namespace)])
147
146
 
148
147
    def test_delete_probe_without_namespace(self):
149
 
        raise nose.exc.SkipTest('disabled by ubuntu patch')
150
148
        cfg.CONF.set_override('use_namespaces', False)
151
149
        cmd = commands.DeleteProbe(self.app, None)
152
150
        cmd_parser = cmd.get_parser('delete_probe')
159
157
                                      mock.call.unplug('tap12345678-12')])
160
158
 
161
159
    def test_list_probe(self):
162
 
        raise nose.exc.SkipTest('disabled by ubuntu patch')
163
160
        cmd = commands.ListProbe(self.app, None)
164
161
        cmd_parser = cmd.get_parser('list_probe')
165
162
        args = []
169
166
            [mock.call.list_ports(device_owner=DEVICE_OWNER_PROBE)])
170
167
 
171
168
    def test_exec_command(self):
172
 
        raise nose.exc.SkipTest('disabled by ubuntu patch')
173
169
        cmd = commands.ExecProbe(self.app, None)
174
170
        cmd_parser = cmd.get_parser('exec_command')
175
171
        args = ['fake_port', 'fake_command']
180
176
        self.client.assert_has_calls([mock.call.show_port('fake_port')])
181
177
 
182
178
    def test_exec_command_without_namespace(self):
183
 
        raise nose.exc.SkipTest('disabled by ubuntu patch')
184
179
        cfg.CONF.set_override('use_namespaces', False)
185
180
        cmd = commands.ExecProbe(self.app, None)
186
181
        cmd_parser = cmd.get_parser('exec_command')
192
187
        self.client.assert_has_calls([mock.call.show_port('fake_port')])
193
188
 
194
189
    def test_clear_probe(self):
195
 
        raise nose.exc.SkipTest('disabled by ubuntu patch')
196
190
        cmd = commands.ClearProbe(self.app, None)
197
191
        cmd_parser = cmd.get_parser('clear_probe')
198
192
        args = []
209
203
                                                       namespace=namespace)])
210
204
 
211
205
    def test_ping_all_with_ensure_port(self):
212
 
        raise nose.exc.SkipTest('disabled by ubuntu patch')
213
206
        fake_ports = self.fake_ports
214
207
 
215
208
        def fake_port_list(network_id=None, device_owner=None, device_id=None):
244
237
                                                        )])
245
238
 
246
239
    def test_ping_all(self):
247
 
        raise nose.exc.SkipTest('disabled by ubuntu patch')
248
240
        cmd = commands.PingAll(self.app, None)
249
241
        cmd_parser = cmd.get_parser('ping_all')
250
242
        args = []
268
260
        self.client.assert_has_calls(expected)
269
261
 
270
262
    def test_ping_all_v6(self):
271
 
        raise nose.exc.SkipTest('disabled by ubuntu patch')
272
263
        fake_subnet_v6 = {'subnet': {'name': 'fake_v6',
273
264
                          'ip_version': 6}}
274
265
        self.client.show_subnet.return_value = fake_subnet_v6