scripts/spdkcli: Throw exception if syntax of the 'create' portal group command is incorrect.
Fixes #751 Change-Id: I6c73c563d32cf930c295b7058492a2344b38883d Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451258 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
parent
4d13903c58
commit
c459cb6e70
@ -1,3 +1,4 @@
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user