Commit c459cb6e authored by Pawel Kaminski's avatar Pawel Kaminski Committed by Darek Stojaczyk
Browse files

scripts/spdkcli: Throw exception if syntax of the 'create' portal group command is incorrect.



Fixes #751

Change-Id: I6c73c563d32cf930c295b7058492a2344b38883d
Signed-off-by: default avatarPawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451258


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarPaweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
parent 4d13903c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
from configshell_fb import ExecutionError
from rpc.client import JSONRPCException
from .ui_node import UINode

@@ -306,6 +307,9 @@ class UIPortalGroups(UINode):
            cpumask = None
            if "@" in portal:
                host, cpumask = portal.split("@")
            if ":" not in host:
                raise ExecutionError("Incorrect format of portal group. Port is missing."
                                     "Use 'help create' to see the command syntax.")
            host, port = host.rsplit(":", -1)
            portals.append({'host': host, 'port': port})
            if cpumask: