VOL-1318 OpenOLT Containerization

Committing following changes:
1. Skelaton code - methods and variables
2. Docker container initialization fixes
3. OpenOLT adapter successful registration with Core

Change-Id: I2b5d5a3c2dd049fa76d6f9dc0647e2c2d4408085
diff --git a/compose/adapters-openolt.yml b/compose/adapters-openolt.yml
index 84b171e..da3b0c3 100644
--- a/compose/adapters-openolt.yml
+++ b/compose/adapters-openolt.yml
@@ -26,8 +26,8 @@
       "/voltha/python/adapters/openolt/main.py",
       "-v",
       "--name=openolt",
-      "--kafka_adapter=${DOCKER_HOST_IP}:9093",
-      "--kafka_cluster=${DOCKER_HOST_IP}:9093",
+      "--kafka_adapter=${DOCKER_HOST_IP}:9092",
+      "--kafka_cluster=${DOCKER_HOST_IP}:9092",
       "--core_topic=rwcore"
     ]
     networks:
diff --git a/protos/device.proto b/protos/device.proto
index 61056e6..16186fa 100644
--- a/protos/device.proto
+++ b/protos/device.proto
@@ -30,6 +30,7 @@
 
     bool accepts_bulk_flow_update = 3;
     bool accepts_add_remove_flow_updates = 4;
+    bool accepts_direct_logical_flows_update = 7;
 
 }
 
diff --git a/python/adapters/openolt/openolt.py b/python/adapters/openolt/openolt.py
index 111e0fc..7756791 100644
--- a/python/adapters/openolt/openolt.py
+++ b/python/adapters/openolt/openolt.py
@@ -44,7 +44,7 @@
 from python.protos.common_pb2 import OperationResp
 from python.protos.inter_container_pb2 import SwitchCapability, PortCapability, \
     InterAdapterMessageType, InterAdapterResponseBody
-from python.protos.device_pb2 import Port, PmConfig, PmConfigs. \
+from python.protos.device_pb2 import Port, PmConfig, PmConfigs, \
     DeviceType, DeviceTypes
 from python.protos.adapter_pb2 import Adapter
 from python.protos.adapter_pb2 import AdapterConfig
@@ -85,8 +85,10 @@
         )
     ]
 
+    # System Init Methods #
     def __init__(self, core_proxy, adapter_proxy, config):
-        self.adapter_agent = adapter_agent
+        self.adapter_proxy = adapter_proxy
+        self.core_proxy = core_proxy
         self.config = config
         self.descriptor = Adapter(
             id=self.name,
@@ -94,9 +96,195 @@
             version='0.1',
             config=config
         )
-        log.debug('openolt.__init__', adapter_agent=adapter_agent)
+        log.debug('openolt.__init__', adapter_proxy=adapter_proxy)
         self.devices = dict()  # device_id -> OpenoltDevice()
         self.interface = registry('main').get_args().interface
         self.logical_device_id_to_root_device_id = dict()
         self.num_devices = 0
 
+    def start(self):
+        log.info('started', interface=self.interface)
+
+    def stop(self):
+        log.info('stopped', interface=self.interface)
+
+
+    # Info Methods #
+    def adapter_descriptor(self):
+        log.debug('get descriptor', interface=self.interface)
+        return self.descriptor
+
+    def device_types(self):
+        log.debug('get device_types', interface=self.interface,
+                  items=self.supported_device_types)
+        return DeviceTypes(items=self.supported_device_types)
+
+    def health(self):
+        log.debug('get health', interface=self.interface)
+        raise NotImplementedError()
+
+    def get_device_details(self, device):
+        log.debug('get_device_details', device=device)
+        raise NotImplementedError()
+
+
+    # Device Operation Methods #
+    def change_master_state(self, master):
+        log.debug('change_master_state', interface=self.interface,
+                  master=master)
+        raise NotImplementedError()
+
+    def abandon_device(self, device):
+        log.info('abandon-device', device=device)
+        raise NotImplementedError()
+
+
+    # Configuration Methods #
+    def update_flows_incrementally(self, device, flow_changes, group_changes):
+        log.debug('update_flows_incrementally', device=device,
+                  flow_changes=flow_changes, group_changes=group_changes)
+        log.info('This device does not allow this, therefore it is Not '
+                 'implemented')
+        raise NotImplementedError()
+
+    def update_pm_config(self, device, pm_configs):
+        log.info('update_pm_config - Not implemented yet', device=device,
+                 pm_configs=pm_configs)
+        raise NotImplementedError()
+
+    def receive_proxied_message(self, proxy_address, msg):
+        log.debug('receive_proxied_message - Not implemented',
+                  proxy_address=proxy_address,
+                  proxied_msg=msg)
+        raise NotImplementedError()
+
+    def receive_inter_adapter_message(self, msg):
+        log.info('rx_inter_adapter_msg - Not implemented')
+        raise NotImplementedError()
+
+
+    # Image Operations Methods #
+    def download_image(self, device, request):
+        log.info('image_download - Not implemented yet', device=device,
+                 request=request)
+        raise NotImplementedError()
+
+    def get_image_download_status(self, device, request):
+        log.info('get_image_download - Not implemented yet', device=device,
+                 request=request)
+        raise NotImplementedError()
+
+    def cancel_image_download(self, device, request):
+        log.info('cancel_image_download - Not implemented yet', device=device)
+        raise NotImplementedError()
+
+    def activate_image_update(self, device, request):
+        log.info('activate_image_update - Not implemented yet',
+                 device=device, request=request)
+        raise NotImplementedError()
+
+    def revert_image_update(self, device, request):
+        log.info('revert_image_update - Not implemented yet',
+                 device=device, request=request)
+        raise NotImplementedError()
+
+    def self_test_device(self, device):
+        # from voltha.protos.voltha_pb2 import SelfTestResponse
+        log.info('Not implemented yet')
+        raise NotImplementedError()
+
+
+    # PON Operations Methods #
+    def create_interface(self, device, data):
+        log.debug('create-interface - Not implemented - We do not use this',
+                  data=data)
+        raise NotImplementedError()
+
+    def update_interface(self, device, data):
+        log.debug('update-interface - Not implemented - We do not use this',
+                  data=data)
+        raise NotImplementedError()
+
+    def remove_interface(self, device, data):
+        log.debug('remove-interface - Not implemented - We do not use this',
+                  data=data)
+        raise NotImplementedError()
+
+    def receive_onu_detect_state(self, proxy_address, state):
+        log.debug('receive-onu-detect-state - Not implemented - We do not '
+                  'use this', proxy_address=proxy_address,
+                  state=state)
+        raise NotImplementedError()
+
+    def create_tcont(self, device, tcont_data, traffic_descriptor_data):
+        log.info('create-tcont - Not implemented - We do not use this',
+                 tcont_data=tcont_data,
+                 traffic_descriptor_data=traffic_descriptor_data)
+        raise NotImplementedError()
+
+    def update_tcont(self, device, tcont_data, traffic_descriptor_data):
+        log.info('update-tcont - Not implemented - We do not use this',
+                 tcont_data=tcont_data,
+                 traffic_descriptor_data=traffic_descriptor_data)
+        raise NotImplementedError()
+
+    def remove_tcont(self, device, tcont_data, traffic_descriptor_data):
+        log.info('remove-tcont - Not implemented - We do not use this',
+                 tcont_data=tcont_data,
+                 traffic_descriptor_data=traffic_descriptor_data)
+        raise NotImplementedError()
+
+    def create_gemport(self, device, data):
+        log.info('create-gemport - Not implemented - We do not use this',
+                 data=data)
+        raise NotImplementedError()
+
+    def update_gemport(self, device, data):
+        log.info('update-gemport - Not implemented - We do not use this',
+                 data=data)
+        raise NotImplementedError()
+
+    def remove_gemport(self, device, data):
+        log.info('remove-gemport - Not implemented - We do not use this',
+                 data=data)
+        raise NotImplementedError()
+
+    def create_multicast_gemport(self, device, data):
+        log.info('create-mcast-gemport  - Not implemented - We do not use '
+                 'this', data=data)
+        raise NotImplementedError()
+
+    def update_multicast_gemport(self, device, data):
+        log.info('update-mcast-gemport - Not implemented - We do not use '
+                 'this', data=data)
+        raise NotImplementedError()
+
+    def remove_multicast_gemport(self, device, data):
+        log.info('remove-mcast-gemport - Not implemented - We do not use '
+                 'this', data=data)
+        raise NotImplementedError()
+
+    def create_multicast_distribution_set(self, device, data):
+        log.info('create-mcast-distribution-set - Not implemented - We do '
+                 'not use this', data=data)
+        raise NotImplementedError()
+
+    def update_multicast_distribution_set(self, device, data):
+        log.info('update-mcast-distribution-set - Not implemented - We do '
+                 'not use this', data=data)
+        raise NotImplementedError()
+
+    def remove_multicast_distribution_set(self, device, data):
+        log.info('remove-mcast-distribution-set - Not implemented - We do '
+                 'not use this', data=data)
+        raise NotImplementedError()
+
+
+    # Alarm Methods #
+    def suppress_alarm(self, filter):
+        log.info('suppress_alarm - Not implemented yet', filter=filter)
+        raise NotImplementedError()
+
+    def unsuppress_alarm(self, filter):
+        log.info('unsuppress_alarm - Not implemented yet', filter=filter)
+        raise NotImplementedError()