Fixes 'openstack tld list' command's exception
Earlier while executing "openstack tld list" command the designate
client was not able to list the created tlds and was resulting an
exception.
This patch fixes those issues and makes designateclient to list
all the created tlds.
Change-Id: I762cf269eb8396b20915b98709f445acaa3f7649
Closes-Bug: #1557364
(cherry picked from commit 9011aac4cc
)
This commit is contained in:
@@ -35,7 +35,16 @@ def _format_tld(tld):
|
||||
class ListTLDsCommand(lister.Lister):
|
||||
"""List tlds"""
|
||||
|
||||
columns = ['id', 'name']
|
||||
columns = ['id', 'name', 'description']
|
||||
|
||||
def get_parser(self, prog_name):
|
||||
parser = super(ListTLDsCommand, self).get_parser(prog_name)
|
||||
|
||||
parser.add_argument('--name', help="TLD NAME")
|
||||
|
||||
parser.add_argument('--description', help="TLD Description")
|
||||
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
client = self.app.client_manager.dns
|
||||
|
@@ -13,11 +13,11 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from designateclient import client
|
||||
from designateclient.v2.base import V2Controller
|
||||
from designateclient.v2 import utils as v2_utils
|
||||
|
||||
|
||||
class TLDController(client.Controller):
|
||||
class TLDController(V2Controller):
|
||||
def create(self, name, description=None):
|
||||
data = {
|
||||
'name': name,
|
||||
|
Reference in New Issue
Block a user