Old behavior restored
Signed-off-by: Jiri Podivin <jpodivin@redhat.com> Change-Id: Ia5aa3e96e8b5a6634a709ce8677f90108c80dfd3
This commit is contained in:
parent
4d1df7b0e7
commit
02790b081f
|
@ -14,7 +14,9 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from validations_libs.cli.common import GROUP_FILE
|
||||||
from cliff.show import ShowOne
|
from cliff.show import ShowOne
|
||||||
|
from cliff.lister import Lister
|
||||||
|
|
||||||
from validations_libs.validation_actions import ValidationActions
|
from validations_libs.validation_actions import ValidationActions
|
||||||
from validations_libs import constants
|
from validations_libs import constants
|
||||||
|
@ -50,30 +52,20 @@ class Show(ShowOne):
|
||||||
return data.keys(), data.values()
|
return data.keys(), data.values()
|
||||||
|
|
||||||
|
|
||||||
class ShowGroup(ShowOne):
|
class ShowGroup(Lister):
|
||||||
"""Validation Show group client implementation class"""
|
"""Validation Show group client implementation class"""
|
||||||
|
|
||||||
def get_parser(self, parser):
|
def get_parser(self, parser):
|
||||||
"""Argument parser for validation show group"""
|
"""Argument parser for validation show group"""
|
||||||
parser = super(ShowGroup, self).get_parser(parser)
|
parser = super(ShowGroup, self).get_parser(parser)
|
||||||
parser.add_argument('--validation-dir', dest='validation_dir',
|
|
||||||
default=constants.ANSIBLE_VALIDATION_DIR,
|
|
||||||
help=("Path where the validation playbooks "
|
|
||||||
"are located."))
|
|
||||||
parser.add_argument('--group', '-g',
|
|
||||||
metavar='<group_name>',
|
|
||||||
dest="group",
|
|
||||||
help=("Show a specific group."))
|
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
def take_action(self, parsed_args):
|
def take_action(self, parsed_args):
|
||||||
"""Take validation action"""
|
"""Take validation action"""
|
||||||
# Get parameters:
|
|
||||||
validation_dir = parsed_args.validation_dir
|
|
||||||
group = parsed_args.group
|
|
||||||
|
|
||||||
v_actions = ValidationActions(validation_path=validation_dir)
|
v_actions = ValidationActions(constants.ANSIBLE_VALIDATION_DIR)
|
||||||
return v_actions.group_information(group)
|
return v_actions.group_information(GROUP_FILE)
|
||||||
|
|
||||||
|
|
||||||
class ShowParameter(ShowOne):
|
class ShowParameter(ShowOne):
|
||||||
|
|
Loading…
Reference in New Issue