Soft Patch Panel
 help / color / mirror / Atom feed
* [spp] [PATCH 0/2] Add default entry for registering MAC
@ 2018-12-25 10:17 ogawa.yasufumi
  2018-12-25 10:17 ` [spp] [PATCH 1/2] spp-ctl: add " ogawa.yasufumi
  2018-12-25 10:17 ` [spp] [PATCH 2/2] controller: revise error message ogawa.yasufumi
  0 siblings, 2 replies; 3+ messages in thread
From: ogawa.yasufumi @ 2018-12-25 10:17 UTC (permalink / raw)
  To: ferruh.yigit, spp, ogawa.yasufumi

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

Hi,

Spp-ctl does not accept for a request to register default entry for
registering MAC address.

  spp > vf 1; component start cls1 4 classifier_mac
  spp > vf 1; port add ring:1 tx cls1
  spp > vf 1; classifier_table add mac default ring:1
  System error occured in spp-ctl.  # failed to register default

This update is to accept the default entry. It is also including a fix
of wrong formatted error messages in SPP CLI.

Thanks,
Yasufumi

Yasufumi Ogawa (2):
  spp-ctl: add default entry for registering MAC
  controller: revise error message

 src/controller/spp_ctl_client.py | 4 ++--
 src/spp-ctl/spp_webapi.py        | 4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [spp] [PATCH 1/2] spp-ctl: add default entry for registering MAC
  2018-12-25 10:17 [spp] [PATCH 0/2] Add default entry for registering MAC ogawa.yasufumi
@ 2018-12-25 10:17 ` ogawa.yasufumi
  2018-12-25 10:17 ` [spp] [PATCH 2/2] controller: revise error message ogawa.yasufumi
  1 sibling, 0 replies; 3+ messages in thread
From: ogawa.yasufumi @ 2018-12-25 10:17 UTC (permalink / raw)
  To: ferruh.yigit, spp, ogawa.yasufumi

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

Spp-ctl does not accept for a request to register default entry for
registering MAC address.

  spp > vf 1; component start cls1 4 classifier_mac
  spp > vf 1; port add ring:1 tx cls1
  spp > vf 1; classifier_table add mac default ring:1
  System error occured in spp-ctl.  # failed to register default

This update is to accept the default entry.

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 src/spp-ctl/spp_webapi.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/spp-ctl/spp_webapi.py b/src/spp-ctl/spp_webapi.py
index efbaee1..d88d7a9 100644
--- a/src/spp-ctl/spp_webapi.py
+++ b/src/spp-ctl/spp_webapi.py
@@ -284,7 +284,9 @@ class V1VFHandler(BaseHandler, V1VFCommon):
         if body['type'] not in ["mac", "vlan"]:
             raise KeyInvalid('type', body['type'])
         self._validate_port(body['port'])
-        self._validate_mac(body['mac_address'])
+
+        if not body['mac_address'] == 'default':
+            self._validate_mac(body['mac_address'])
 
         if body['type'] == "vlan":
             try:
-- 
2.7.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [spp] [PATCH 2/2] controller: revise error message
  2018-12-25 10:17 [spp] [PATCH 0/2] Add default entry for registering MAC ogawa.yasufumi
  2018-12-25 10:17 ` [spp] [PATCH 1/2] spp-ctl: add " ogawa.yasufumi
@ 2018-12-25 10:17 ` ogawa.yasufumi
  1 sibling, 0 replies; 3+ messages in thread
From: ogawa.yasufumi @ 2018-12-25 10:17 UTC (permalink / raw)
  To: ferruh.yigit, spp, ogawa.yasufumi

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

This update is to correct wrong formatted error messages.

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 src/controller/spp_ctl_client.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/controller/spp_ctl_client.py b/src/controller/spp_ctl_client.py
index f04173b..50cbfae 100644
--- a/src/controller/spp_ctl_client.py
+++ b/src/controller/spp_ctl_client.py
@@ -29,10 +29,10 @@ class SppCtlClient(object):
                 # TODO(yasufum) revise print message to more appropriate
                 # for spp.py.
                 if res.status_code == 400:
-                    print('Syntax or lexical error, or SPP returns' +
+                    print('Syntax or lexical error, or SPP returns ' +
                           'error for the request.')
                 elif res.status_code == 404:
-                    print('URL is not supported, or no SPP process' +
+                    print('URL is not supported, or no SPP process ' +
                           'of client-id in a URL.')
                 elif res.status_code == 500:
                     print('System error occured in spp-ctl.')
-- 
2.7.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-25 10:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-25 10:17 [spp] [PATCH 0/2] Add default entry for registering MAC ogawa.yasufumi
2018-12-25 10:17 ` [spp] [PATCH 1/2] spp-ctl: add " ogawa.yasufumi
2018-12-25 10:17 ` [spp] [PATCH 2/2] controller: revise error message ogawa.yasufumi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).