summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/java/jvpp/gen/jvppgen/util.py
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2017-12-07 16:49:26 +0100
committerMarek Gradzki <mgradzki@cisco.com>2017-12-07 16:54:28 +0100
commit8f3ad25c637381da3f499f992c3477768cb636f9 (patch)
treef26dd0e2804b1a111affbaade95554cffebe1807 /src/vpp-api/java/jvpp/gen/jvppgen/util.py
parenta3611a70347d870ef4d657e010a1fe736a9fdd72 (diff)
jvpp: remove special request<>reply mappings
Since L2FibTable removal and introduction of dedicated SW Interface Event, special message handling code can be removed. The patch also fixes issues found by Intelij's code inspection tool. Change-Id: Ic4b2fd12ac30c7627f4cd6769716e4bb52ec0b10 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'src/vpp-api/java/jvpp/gen/jvppgen/util.py')
-rw-r--r--src/vpp-api/java/jvpp/gen/jvppgen/util.py31
1 files changed, 5 insertions, 26 deletions
diff --git a/src/vpp-api/java/jvpp/gen/jvppgen/util.py b/src/vpp-api/java/jvpp/gen/jvppgen/util.py
index 48645246596..6c2ffbc420c 100644
--- a/src/vpp-api/java/jvpp/gen/jvppgen/util.py
+++ b/src/vpp-api/java/jvpp/gen/jvppgen/util.py
@@ -35,16 +35,15 @@ def remove_folder(folder):
removedirs(folder)
-reply_suffixes = ("reply", "details", "l2fibtableentry")
+reply_suffixes = ("reply", "details")
def is_reply(name):
return name.lower().endswith(reply_suffixes)
-details_suffix = "details"
def is_details(name):
- return name.lower().endswith(reply_suffixes[1]) or name.lower().endswith(reply_suffixes[2])
+ return name.lower().endswith(reply_suffixes[1])
def is_retval_field(name):
@@ -60,11 +59,7 @@ def is_dump(name):
def get_reply_suffix(name):
for reply_suffix in reply_suffixes:
if name.lower().endswith(reply_suffix):
- if reply_suffix == reply_suffixes[2]:
- # FIXME workaround for l2_fib_table_entry
- return 'entry'
- else:
- return reply_suffix
+ return reply_suffix
# Mapping according to:
# http://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/types.html
@@ -94,7 +89,7 @@ jni_2_java_type_mapping = {'u8': 'byte',
vpp_2_jni_type_mapping = {'u8': 'jbyte',
'u8[]': 'jbyteArray',
'i8': 'jbyte',
- 'u8[]': 'jbyteArray',
+ 'i8[]': 'jbyteArray',
'u16': 'jshort',
'u16[]': 'jshortArray',
'i16': 'jshort',
@@ -153,21 +148,9 @@ jni_field_accessors = {'u8': 'ByteField',
'f64[]': 'ObjectField'
}
-
-# vpe.api calls that do not follow naming conventions and have to be handled exceptionally when finding reply -> request mapping
-# FIXME in vpe.api
-unconventional_naming_rep_req = {
- }
-
-#
# FIXME no convention in the naming of events (notifications) in vpe.api
notifications_message_suffixes = ("event", "counters")
-# messages that must be ignored. These messages are INSUFFICIENTLY marked as disabled in vpe.api
-# FIXME
-ignored_messages = []
-
-
def is_notification(name):
""" Returns true if the structure is a notification regardless of its no other use """
return is_just_notification(name)
@@ -178,10 +161,6 @@ def is_just_notification(name):
return name.lower().endswith(notifications_message_suffixes)
-def is_ignored(param):
- return param.lower() in ignored_messages
-
-
def remove_reply_suffix(camel_case_name_with_suffix):
return remove_suffix(camel_case_name_with_suffix, get_reply_suffix(camel_case_name_with_suffix))
@@ -194,7 +173,7 @@ def remove_suffix(camel_case_name_with_suffix, suffix):
def is_control_ping(camel_case_name_with_suffix):
- return camel_case_name_with_suffix.lower().startswith("controlping");
+ return camel_case_name_with_suffix.lower().startswith("controlping")
def api_message_to_javadoc(api_message):