2009-06-24 08:12:27 -05:00
|
|
|
# Authors:
|
|
|
|
# Rob Crittenden <rcritten@redhat.com>
|
|
|
|
# Pavel Zuna <pzuna@redhat.com>
|
|
|
|
#
|
|
|
|
# Copyright (C) 2008 Red Hat
|
|
|
|
# see file 'COPYING' for use and warranty information
|
|
|
|
#
|
2010-12-09 06:59:11 -06:00
|
|
|
# This program 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.
|
2009-06-24 08:12:27 -05:00
|
|
|
#
|
|
|
|
# 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 General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2010-12-09 06:59:11 -06:00
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2009-06-24 08:12:27 -05:00
|
|
|
"""
|
|
|
|
Test the `ipalib/plugins/automount.py' module.
|
|
|
|
"""
|
|
|
|
|
|
|
|
import sys
|
2012-03-09 08:41:16 -06:00
|
|
|
from nose.tools import raises, assert_raises # pylint: disable=E0611
|
|
|
|
|
2009-06-24 08:12:27 -05:00
|
|
|
from xmlrpc_test import XMLRPC_test, assert_attr_equal
|
|
|
|
from ipalib import api
|
|
|
|
from ipalib import errors
|
|
|
|
|
|
|
|
|
|
|
|
class test_automount(XMLRPC_test):
|
|
|
|
"""
|
|
|
|
Test the `automount` plugin.
|
|
|
|
"""
|
2009-08-27 08:55:19 -05:00
|
|
|
locname = u'testlocation'
|
2009-06-24 08:12:27 -05:00
|
|
|
mapname = u'testmap'
|
|
|
|
keyname = u'testkey'
|
2011-08-01 09:41:28 -05:00
|
|
|
keyname_rename = u'testkey_rename'
|
2009-06-24 08:12:27 -05:00
|
|
|
keyname2 = u'testkey2'
|
|
|
|
description = u'description of map'
|
|
|
|
info = u'ro'
|
2010-12-19 13:23:16 -06:00
|
|
|
newinfo = u'rw'
|
2010-12-07 16:18:04 -06:00
|
|
|
map_kw = {'automountmapname': mapname, 'description': description, 'raw': True}
|
|
|
|
key_kw = {'automountkey': keyname, 'automountinformation': info, 'raw': True}
|
|
|
|
key_kw2 = {'automountkey': keyname2, 'automountinformation': info, 'raw': True}
|
2009-08-27 08:55:19 -05:00
|
|
|
|
|
|
|
def test_0_automountlocation_add(self):
|
|
|
|
"""
|
|
|
|
Test adding a location `xmlrpc.automountlocation_add` method.
|
|
|
|
"""
|
2009-12-09 10:09:53 -06:00
|
|
|
ret = self.failsafe_add(
|
|
|
|
api.Object.automountlocation, self.locname
|
|
|
|
)
|
|
|
|
entry = ret['result']
|
|
|
|
assert_attr_equal(entry, 'cn', self.locname)
|
2009-06-24 08:12:27 -05:00
|
|
|
|
|
|
|
def test_1_automountmap_add(self):
|
|
|
|
"""
|
|
|
|
Test adding a map `xmlrpc.automountmap_add` method.
|
|
|
|
"""
|
2010-12-07 16:18:04 -06:00
|
|
|
res = api.Command['automountmap_add'](self.locname, **self.map_kw)['result']
|
2009-06-24 08:12:27 -05:00
|
|
|
assert res
|
|
|
|
assert_attr_equal(res, 'automountmapname', self.mapname)
|
|
|
|
|
|
|
|
def test_2_automountkey_add(self):
|
|
|
|
"""
|
|
|
|
Test adding a key using `xmlrpc.automountkey_add` method.
|
|
|
|
"""
|
2010-12-07 16:18:04 -06:00
|
|
|
res = api.Command['automountkey_add'](self.locname, self.mapname, **self.key_kw2)['result']
|
2009-06-24 08:12:27 -05:00
|
|
|
assert res
|
|
|
|
assert_attr_equal(res, 'automountkey', self.keyname2)
|
|
|
|
|
|
|
|
def test_3_automountkey_add(self):
|
|
|
|
"""
|
|
|
|
Test adding a key using `xmlrpc.automountkey_add` method.
|
|
|
|
"""
|
2010-12-07 16:18:04 -06:00
|
|
|
res = api.Command['automountkey_add'](self.locname, self.mapname, **self.key_kw)['result']
|
2009-06-24 08:12:27 -05:00
|
|
|
assert res
|
|
|
|
assert_attr_equal(res, 'automountkey', self.keyname)
|
|
|
|
|
2012-03-09 08:41:16 -06:00
|
|
|
@raises(errors.DuplicateEntry)
|
2009-06-24 08:12:27 -05:00
|
|
|
def test_4_automountkey_add(self):
|
|
|
|
"""
|
|
|
|
Test adding a duplicate key using `xmlrpc.automountkey_add` method.
|
|
|
|
"""
|
2012-03-09 08:41:16 -06:00
|
|
|
res = api.Command['automountkey_add'](self.locname, self.mapname, **self.key_kw)
|
2009-06-24 08:12:27 -05:00
|
|
|
|
|
|
|
def test_5_automountmap_show(self):
|
|
|
|
"""
|
|
|
|
Test the `xmlrpc.automountmap_show` method.
|
|
|
|
"""
|
2009-12-09 10:09:53 -06:00
|
|
|
res = api.Command['automountmap_show'](self.locname, self.mapname, raw=True)['result']
|
2009-06-24 08:12:27 -05:00
|
|
|
assert res
|
|
|
|
assert_attr_equal(res, 'automountmapname', self.mapname)
|
|
|
|
|
|
|
|
def test_6_automountmap_find(self):
|
|
|
|
"""
|
|
|
|
Test the `xmlrpc.automountmap_find` method.
|
|
|
|
"""
|
2009-12-09 10:09:53 -06:00
|
|
|
res = api.Command['automountmap_find'](self.locname, self.mapname, raw=True)['result']
|
|
|
|
assert_attr_equal(res[0], 'automountmapname', self.mapname)
|
2009-06-24 08:12:27 -05:00
|
|
|
|
|
|
|
def test_7_automountkey_show(self):
|
|
|
|
"""
|
|
|
|
Test the `xmlrpc.automountkey_show` method.
|
|
|
|
"""
|
2010-12-19 13:23:16 -06:00
|
|
|
showkey_kw={'automountkey': self.keyname, 'automountinformation' : self.info, 'raw': True}
|
2010-12-07 16:18:04 -06:00
|
|
|
res = api.Command['automountkey_show'](self.locname, self.mapname, **showkey_kw)['result']
|
2009-06-24 08:12:27 -05:00
|
|
|
assert res
|
|
|
|
assert_attr_equal(res, 'automountkey', self.keyname)
|
|
|
|
assert_attr_equal(res, 'automountinformation', self.info)
|
|
|
|
|
|
|
|
def test_8_automountkey_find(self):
|
|
|
|
"""
|
|
|
|
Test the `xmlrpc.automountkey_find` method.
|
|
|
|
"""
|
2009-12-09 10:09:53 -06:00
|
|
|
res = api.Command['automountkey_find'](self.locname, self.mapname, raw=True)['result']
|
2009-06-24 08:12:27 -05:00
|
|
|
assert res
|
|
|
|
assert len(res) == 2
|
2011-04-13 09:48:07 -05:00
|
|
|
assert_attr_equal(res[0], 'automountkey', self.keyname)
|
|
|
|
assert_attr_equal(res[0], 'automountinformation', self.info)
|
2009-06-24 08:12:27 -05:00
|
|
|
|
|
|
|
def test_9_automountkey_mod(self):
|
|
|
|
"""
|
|
|
|
Test the `xmlrpc.automountkey_mod` method.
|
|
|
|
"""
|
2010-12-19 13:23:16 -06:00
|
|
|
self.key_kw['newautomountinformation'] = self.newinfo
|
2011-08-01 09:41:28 -05:00
|
|
|
self.key_kw['rename'] = self.keyname_rename
|
2010-12-07 16:18:04 -06:00
|
|
|
res = api.Command['automountkey_mod'](self.locname, self.mapname, **self.key_kw)['result']
|
2009-06-24 08:12:27 -05:00
|
|
|
assert res
|
2011-08-01 09:41:28 -05:00
|
|
|
assert_attr_equal(res, 'automountinformation', self.newinfo)
|
|
|
|
assert_attr_equal(res, 'automountkey', self.keyname_rename)
|
2009-06-24 08:12:27 -05:00
|
|
|
|
|
|
|
def test_a_automountmap_mod(self):
|
|
|
|
"""
|
|
|
|
Test the `xmlrpc.automountmap_mod` method.
|
|
|
|
"""
|
2010-12-07 16:18:04 -06:00
|
|
|
mod_kw = {'description': u'new description'}
|
|
|
|
res = api.Command['automountmap_mod'](self.locname, self.mapname, **mod_kw)['result']
|
2009-06-24 08:12:27 -05:00
|
|
|
assert res
|
|
|
|
assert_attr_equal(res, 'description', 'new description')
|
|
|
|
|
|
|
|
def test_b_automountkey_del(self):
|
|
|
|
"""
|
|
|
|
Test the `xmlrpc.automountkey_del` method.
|
|
|
|
"""
|
2012-04-16 08:29:42 -05:00
|
|
|
delkey_kw={'automountkey': self.keyname_rename, 'automountinformation' : self.newinfo}
|
2010-12-07 16:18:04 -06:00
|
|
|
res = api.Command['automountkey_del'](self.locname, self.mapname, **delkey_kw)['result']
|
2011-01-07 10:17:55 -06:00
|
|
|
assert res
|
|
|
|
assert_attr_equal(res, 'failed', '')
|
2009-06-24 08:12:27 -05:00
|
|
|
|
|
|
|
# Verify that it is gone
|
2012-03-09 08:41:16 -06:00
|
|
|
with assert_raises(errors.NotFound):
|
2010-12-07 16:18:04 -06:00
|
|
|
api.Command['automountkey_show'](self.locname, self.mapname, **delkey_kw)
|
2009-06-24 08:12:27 -05:00
|
|
|
|
2009-08-27 08:55:19 -05:00
|
|
|
def test_c_automountlocation_del(self):
|
2009-06-24 08:12:27 -05:00
|
|
|
"""
|
2009-08-27 08:55:19 -05:00
|
|
|
Test the `xmlrpc.automountlocation_del` method.
|
2009-06-24 08:12:27 -05:00
|
|
|
"""
|
2009-12-09 10:09:53 -06:00
|
|
|
res = api.Command['automountlocation_del'](self.locname)['result']
|
2011-01-07 10:17:55 -06:00
|
|
|
assert res
|
|
|
|
assert_attr_equal(res, 'failed', '')
|
2009-06-24 08:12:27 -05:00
|
|
|
|
|
|
|
# Verify that it is gone
|
2012-03-09 08:41:16 -06:00
|
|
|
with assert_raises(errors.NotFound):
|
2009-08-27 08:55:19 -05:00
|
|
|
api.Command['automountlocation_show'](self.locname)
|
2009-06-24 08:12:27 -05:00
|
|
|
|
|
|
|
def test_d_automountmap_del(self):
|
|
|
|
"""
|
2009-08-27 08:55:19 -05:00
|
|
|
Test that the `xmlrpc.automountlocation_del` method removes all maps and keys
|
2009-06-24 08:12:27 -05:00
|
|
|
"""
|
|
|
|
# Verify that the second key we added is gone
|
2010-12-19 13:23:16 -06:00
|
|
|
key_kw = {'automountkey': self.keyname2, 'automountinformation': self.info, 'raw': True}
|
2012-03-09 08:41:16 -06:00
|
|
|
with assert_raises(errors.NotFound):
|
2010-12-07 16:18:04 -06:00
|
|
|
api.Command['automountkey_show'](self.locname, self.mapname, **key_kw)
|
2009-06-24 08:12:27 -05:00
|
|
|
|
2010-12-19 13:23:16 -06:00
|
|
|
class test_automount_direct(XMLRPC_test):
|
|
|
|
"""
|
|
|
|
Test the `automount` plugin indirect map functionality.
|
|
|
|
"""
|
|
|
|
locname = u'testlocation'
|
|
|
|
mapname = u'auto.direct2'
|
|
|
|
keyname = u'/-'
|
|
|
|
direct_kw = { 'key' : keyname }
|
|
|
|
|
|
|
|
def test_0_automountlocation_add(self):
|
|
|
|
"""
|
|
|
|
Test adding a location.
|
|
|
|
"""
|
|
|
|
res = api.Command['automountlocation_add'](self.locname, raw=True)['result']
|
|
|
|
assert res
|
|
|
|
assert_attr_equal(res, 'cn', self.locname)
|
|
|
|
|
|
|
|
def test_1_automountmap_add_direct(self):
|
|
|
|
"""
|
|
|
|
Test adding a second direct map with a different info
|
|
|
|
"""
|
|
|
|
res = api.Command['automountmap_add_indirect'](self.locname, self.mapname, **self.direct_kw)['result']
|
|
|
|
assert res
|
|
|
|
assert_attr_equal(res, 'automountmapname', self.mapname)
|
|
|
|
|
2012-03-09 08:41:16 -06:00
|
|
|
@raises(errors.DuplicateEntry)
|
2010-12-19 13:23:16 -06:00
|
|
|
def test_2_automountmap_add_duplicate(self):
|
|
|
|
"""
|
|
|
|
Test adding a duplicate direct map.
|
|
|
|
"""
|
2012-03-09 08:41:16 -06:00
|
|
|
res = api.Command['automountmap_add_indirect'](self.locname, self.mapname, **self.direct_kw)['result']
|
2010-12-19 13:23:16 -06:00
|
|
|
|
|
|
|
def test_3_automountlocation_del(self):
|
|
|
|
"""
|
|
|
|
Remove the location.
|
|
|
|
"""
|
|
|
|
res = api.Command['automountlocation_del'](self.locname)['result']
|
|
|
|
assert res
|
|
|
|
assert_attr_equal(res, 'failed', '')
|
|
|
|
|
|
|
|
# Verity that it is gone
|
2012-03-09 08:41:16 -06:00
|
|
|
with assert_raises(errors.NotFound):
|
2010-12-19 13:23:16 -06:00
|
|
|
api.Command['automountlocation_show'](self.locname)
|
2009-06-24 08:12:27 -05:00
|
|
|
|
|
|
|
class test_automount_indirect(XMLRPC_test):
|
|
|
|
"""
|
|
|
|
Test the `automount` plugin indirect map functionality.
|
|
|
|
"""
|
2009-08-27 08:55:19 -05:00
|
|
|
locname = u'testlocation'
|
2009-06-24 08:12:27 -05:00
|
|
|
mapname = u'auto.home'
|
|
|
|
keyname = u'/home'
|
|
|
|
parentmap = u'auto.master'
|
2012-04-16 08:29:42 -05:00
|
|
|
map_kw = {'key': keyname, 'parentmap': parentmap, 'raw': True}
|
2010-12-19 13:23:16 -06:00
|
|
|
key_kw = {'automountkey': keyname, 'automountinformation': mapname}
|
2009-08-27 08:55:19 -05:00
|
|
|
|
|
|
|
def test_0_automountlocation_add(self):
|
|
|
|
"""
|
|
|
|
Test adding a location.
|
|
|
|
"""
|
2009-12-09 10:09:53 -06:00
|
|
|
res = api.Command['automountlocation_add'](self.locname, raw=True)['result']
|
2009-08-27 08:55:19 -05:00
|
|
|
assert res
|
|
|
|
assert_attr_equal(res, 'cn', self.locname)
|
2009-06-24 08:12:27 -05:00
|
|
|
|
|
|
|
def test_1_automountmap_add_indirect(self):
|
|
|
|
"""
|
|
|
|
Test adding an indirect map.
|
|
|
|
"""
|
2009-12-09 10:09:53 -06:00
|
|
|
res = api.Command['automountmap_add_indirect'](self.locname, self.mapname, **self.map_kw)['result']
|
2009-06-24 08:12:27 -05:00
|
|
|
assert res
|
2009-08-27 08:55:19 -05:00
|
|
|
assert_attr_equal(res, 'automountmapname', self.mapname)
|
2009-06-24 08:12:27 -05:00
|
|
|
|
2012-03-09 08:41:16 -06:00
|
|
|
@raises(errors.DuplicateEntry)
|
2011-07-27 09:25:48 -05:00
|
|
|
def test_1a_automountmap_add_indirect(self):
|
|
|
|
"""
|
|
|
|
Test adding a duplicate indirect map.
|
|
|
|
"""
|
2012-03-09 08:41:16 -06:00
|
|
|
api.Command['automountmap_add_indirect'](self.locname, self.mapname, **self.map_kw)['result']
|
2011-07-27 09:25:48 -05:00
|
|
|
|
2009-06-24 08:12:27 -05:00
|
|
|
def test_2_automountmap_show(self):
|
|
|
|
"""
|
|
|
|
Test the `xmlrpc.automountmap_show` method.
|
|
|
|
"""
|
2010-12-19 13:23:16 -06:00
|
|
|
res = api.Command['automountmap_show'](self.locname, self.mapname, raw=True)['result']
|
2009-06-24 08:12:27 -05:00
|
|
|
assert res
|
2010-12-19 13:23:16 -06:00
|
|
|
assert_attr_equal(res, 'automountmapname', self.mapname)
|
2009-06-24 08:12:27 -05:00
|
|
|
|
|
|
|
def test_3_automountkey_del(self):
|
|
|
|
"""
|
|
|
|
Remove the indirect key /home.
|
|
|
|
"""
|
2010-12-19 13:23:16 -06:00
|
|
|
res = api.Command['automountkey_del'](self.locname, self.parentmap, **self.key_kw)['result']
|
2011-01-07 10:17:55 -06:00
|
|
|
assert res
|
|
|
|
assert_attr_equal(res, 'failed', '')
|
2009-06-24 08:12:27 -05:00
|
|
|
|
|
|
|
# Verify that it is gone
|
2012-03-09 08:41:16 -06:00
|
|
|
with assert_raises(errors.NotFound):
|
2010-12-19 13:23:16 -06:00
|
|
|
api.Command['automountkey_show'](self.locname, self.parentmap, **self.key_kw)
|
2009-06-24 08:12:27 -05:00
|
|
|
|
|
|
|
def test_4_automountmap_del(self):
|
|
|
|
"""
|
|
|
|
Remove the indirect map for auto.home.
|
|
|
|
"""
|
2009-12-09 10:09:53 -06:00
|
|
|
res = api.Command['automountmap_del'](self.locname, self.mapname)['result']
|
2011-01-07 10:17:55 -06:00
|
|
|
assert res
|
|
|
|
assert_attr_equal(res, 'failed', '')
|
2009-06-24 08:12:27 -05:00
|
|
|
|
|
|
|
# Verify that it is gone
|
2012-03-09 08:41:16 -06:00
|
|
|
with assert_raises(errors.NotFound):
|
2009-08-27 08:55:19 -05:00
|
|
|
api.Command['automountmap_show'](self.locname, self.mapname)
|
|
|
|
|
|
|
|
def test_5_automountlocation_del(self):
|
|
|
|
"""
|
|
|
|
Remove the location.
|
|
|
|
"""
|
2009-12-09 10:09:53 -06:00
|
|
|
res = api.Command['automountlocation_del'](self.locname)['result']
|
2011-01-07 10:17:55 -06:00
|
|
|
assert res
|
|
|
|
assert_attr_equal(res, 'failed', '')
|
2009-08-27 08:55:19 -05:00
|
|
|
|
|
|
|
# Verity that it is gone
|
2012-03-09 08:41:16 -06:00
|
|
|
with assert_raises(errors.NotFound):
|
2009-08-27 08:55:19 -05:00
|
|
|
api.Command['automountlocation_show'](self.locname)
|
2009-06-24 08:12:27 -05:00
|
|
|
|
|
|
|
|
|
|
|
class test_automount_indirect_no_parent(XMLRPC_test):
|
|
|
|
"""
|
|
|
|
Test the `automount` plugin Indirect map function.
|
|
|
|
"""
|
2009-08-27 08:55:19 -05:00
|
|
|
locname = u'testlocation'
|
2009-06-24 08:12:27 -05:00
|
|
|
mapname = u'auto.home'
|
|
|
|
keyname = u'/home'
|
|
|
|
parentmap = u'auto.master'
|
2010-12-19 13:23:16 -06:00
|
|
|
map_kw = {'key': keyname, 'raw': True}
|
2009-08-27 08:55:19 -05:00
|
|
|
|
|
|
|
def test_0_automountlocation_add(self):
|
|
|
|
"""
|
|
|
|
Test adding a location.
|
|
|
|
"""
|
2009-12-09 10:09:53 -06:00
|
|
|
res = api.Command['automountlocation_add'](self.locname, raw=True)['result']
|
2009-08-27 08:55:19 -05:00
|
|
|
assert res
|
|
|
|
assert_attr_equal(res, 'cn', self.locname)
|
|
|
|
|
2009-06-24 08:12:27 -05:00
|
|
|
def test_1_automountmap_add_indirect(self):
|
|
|
|
"""
|
|
|
|
Test adding an indirect map with default parent.
|
|
|
|
"""
|
2009-12-09 10:09:53 -06:00
|
|
|
res = api.Command['automountmap_add_indirect'](self.locname, self.mapname, **self.map_kw)['result']
|
2009-06-24 08:12:27 -05:00
|
|
|
assert res
|
2009-08-27 08:55:19 -05:00
|
|
|
assert_attr_equal(res, 'automountmapname', self.mapname)
|
2009-06-24 08:12:27 -05:00
|
|
|
|
|
|
|
def test_2_automountkey_show(self):
|
|
|
|
"""
|
|
|
|
Test the `xmlrpc.automountkey_show` method with default parent.
|
|
|
|
"""
|
2010-12-19 13:23:16 -06:00
|
|
|
showkey_kw = {'automountkey': self.keyname, 'automountinformation': self.mapname, 'raw': True}
|
2010-12-07 16:18:04 -06:00
|
|
|
res = api.Command['automountkey_show'](self.locname, self.parentmap, **showkey_kw)['result']
|
2009-06-24 08:12:27 -05:00
|
|
|
assert res
|
|
|
|
assert_attr_equal(res, 'automountkey', self.keyname)
|
|
|
|
|
|
|
|
def test_3_automountkey_del(self):
|
|
|
|
"""
|
|
|
|
Remove the indirect key /home.
|
|
|
|
"""
|
2010-12-19 13:23:16 -06:00
|
|
|
delkey_kw={'automountkey': self.keyname, 'automountinformation': self.mapname}
|
2010-12-07 16:18:04 -06:00
|
|
|
res = api.Command['automountkey_del'](self.locname, self.parentmap, **delkey_kw)['result']
|
2011-01-07 10:17:55 -06:00
|
|
|
assert res
|
|
|
|
assert_attr_equal(res, 'failed', '')
|
2009-06-24 08:12:27 -05:00
|
|
|
|
|
|
|
# Verify that it is gone
|
2012-03-09 08:41:16 -06:00
|
|
|
with assert_raises(errors.NotFound):
|
2010-12-07 16:18:04 -06:00
|
|
|
api.Command['automountkey_show'](self.locname, self.parentmap, **delkey_kw)
|
2009-06-24 08:12:27 -05:00
|
|
|
|
|
|
|
def test_4_automountmap_del(self):
|
|
|
|
"""
|
|
|
|
Remove the indirect map for auto.home.
|
|
|
|
"""
|
2009-12-09 10:09:53 -06:00
|
|
|
res = api.Command['automountmap_del'](self.locname, self.mapname)['result']
|
2011-01-07 10:17:55 -06:00
|
|
|
assert res
|
|
|
|
assert_attr_equal(res, 'failed', '')
|
2009-06-24 08:12:27 -05:00
|
|
|
|
|
|
|
# Verify that it is gone
|
2012-03-09 08:41:16 -06:00
|
|
|
with assert_raises(errors.NotFound):
|
2009-08-27 08:55:19 -05:00
|
|
|
api.Command['automountmap_show'](self.locname, self.mapname)
|
|
|
|
|
|
|
|
def test_5_automountlocation_del(self):
|
|
|
|
"""
|
|
|
|
Remove the location.
|
|
|
|
"""
|
2009-12-09 10:09:53 -06:00
|
|
|
res = api.Command['automountlocation_del'](self.locname)['result']
|
2011-01-07 10:17:55 -06:00
|
|
|
assert res
|
|
|
|
assert_attr_equal(res, 'failed', '')
|
2009-08-27 08:55:19 -05:00
|
|
|
|
|
|
|
# Verity that it is gone
|
2012-03-09 08:41:16 -06:00
|
|
|
with assert_raises(errors.NotFound):
|
2009-08-27 08:55:19 -05:00
|
|
|
api.Command['automountlocation_show'](self.locname)
|