diff --git a/designateclient/v2/cli/tlds.py b/designateclient/v2/cli/tlds.py index 57f62bf6..9f3dc77d 100644 --- a/designateclient/v2/cli/tlds.py +++ b/designateclient/v2/cli/tlds.py @@ -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 diff --git a/designateclient/v2/tlds.py b/designateclient/v2/tlds.py index 22591907..d70c88ab 100644 --- a/designateclient/v2/tlds.py +++ b/designateclient/v2/tlds.py @@ -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,