PONSIM: PON simulator with real dataplane handling

This was needed because neither CPQD nor OVS can handle
both zero-tagged packets and 802.1ad (QinQ).

- extensive unittest proves ponsim functional correctness
  (for the common use-cases needed in the PON scenario)
- integrated with frameio and coupled with a rather
  simple gRPC NBI, ponsim can be operated from Voltha
  just like a real PON system
- posim_olt/_onu adapters added to Voltha to work on
  ponsim
- CLI can be used to preprovision and activate a PONSIM
  instance (e.g., preprovision_olt -t ponsim_olt -H localhost:50060)
- Some of olt-oftest:olt-complex testcases can be run on
  the ponsim device (in vagrant/Ubuntu environment),
  but there are some remaining issues to work out:
  - barrier calls in OF do not guaranty that the flow
    is already installed on the device. This is a generic
    issue, not just for ponsim.
  - the whole test framework is inconsistent about zero-
    tagged vs. untagged frames at the ONUs, while ponsim
    is rather pedantica and does exactly what was defined
    in the flows.

Change-Id: I0dd564c932416ae1566935492134cb5b08113bdc
diff --git a/cli/utils.py b/cli/utils.py
index b1aad1a..0d677d1 100644
--- a/cli/utils.py
+++ b/cli/utils.py
@@ -136,10 +136,17 @@
             table.add_cell(i, *field_printers[type](ofb))
 
         for instruction in flow['instructions']:
-            if instruction['type'] == 4:
+            itype = instruction['type']
+            if itype == 4:
                 for action in instruction['actions']['actions']:
-                    type = action['type'][len('OFPAT_'):]
-                    table.add_cell(i, *action_printers[type](action))
+                    atype = action['type'][len('OFPAT_'):]
+                    table.add_cell(i, *action_printers[atype](action))
+            elif itype == 1:
+                table.add_cell(i, 10000, 'goto-table',
+                               instruction['goto_table']['table_id'])
+            else:
+                raise NotImplementedError(
+                    'not handling instruction type {}'.format(itype))
 
     table.print_table(header, printfn)