def populate_local_cache_tenant(self, fw_id, fw_data):
        """Populate the cache for a given tenant.

        Calls routines to Populate the in and out information.
        Update the result information.
        Populate the state information.
        Populate the router information.
        """
        tenant_id = fw_data.get('tenant_id')
        self.create_serv_obj(tenant_id)
        serv_obj = self.get_service_obj(tenant_id)
        serv_obj.create_fw_db(fw_id, fw_data.get('name'), tenant_id)
        self.pop_fw_local(tenant_id, fw_data.get('in_network_id'), "in",
                          fw_data.get('in_service_node_ip'))
        self.pop_fw_local(tenant_id, fw_data.get('out_network_id'), "out",
                          fw_data.get('out_service_node_ip'))
        serv_obj.update_fw_local_result_str(fw_data.get('os_status'),
                                            fw_data.get('dcnm_status'),
                                            fw_data.get('device_status'))
        compl_res = fw_data.get('result')
        result = compl_res.split('(')[0]
        serv_obj.store_local_final_result(result)
        state = self.pop_fw_state(compl_res, fw_data.get('os_status'),
                                  fw_data.get('dcnm_status'))
        if state is None:
            LOG.error("Unable to get state complete result %(res)s"
                      " OS status %(os)s, dcnm status %(dcnm)s",
                      {'res': compl_res, 'os': fw_data.get('os_status'),
                       'dcnm': fw_data.get('dcnm_status')})
        serv_obj.store_state(state, popl_db=False)
        if state == fw_const.FABRIC_PREPARE_DONE_STATE:
            serv_obj.set_fabric_create(True)
        router_id = fw_data.get('router_id')
        rout_net_id = fw_data.get('router_net_id')
        rout_subnet_id = fw_data.get('router_subnet_id')
        # Result is already populated above, so pass None below.
        # And, the result passed should be a string
        serv_obj.update_fw_local_router(rout_net_id, rout_subnet_id, router_id,
                                        None)
def populate_local_cache_tenant ( self , fw_id , fw_data ) : tenant_id = fw_data . get ( 'tenant_id' ) self . create_serv_obj ( tenant_id ) serv_obj = self . get_service_obj ( tenant_id ) serv_obj . create_fw_db ( fw_id , fw_data . get ( 'name' ) , tenant_id ) self . pop_fw_local ( tenant_id , fw_data . get ( 'in_network_id' ) , "in" , fw_data . get ( 'in_service_node_ip' ) ) self . pop_fw_local ( tenant_id , fw_data . get ( 'out_network_id' ) , "out" , fw_data . get ( 'out_service_node_ip' ) ) serv_obj . update_fw_local_result_str ( fw_data . get ( 'os_status' ) , fw_data . get ( 'dcnm_status' ) , fw_data . get ( 'device_status' ) ) compl_res = fw_data . get ( 'result' ) result = compl_res . split ( '(' ) [ 0 ] serv_obj . store_local_final_result ( result ) state = self . pop_fw_state ( compl_res , fw_data . get ( 'os_status' ) , fw_data . get ( 'dcnm_status' ) ) if state is None : LOG . error ( "Unable to get state complete result %(res)s" " OS status %(os)s, dcnm status %(dcnm)s" , { 'res' : compl_res , 'os' : fw_data . get ( 'os_status' ) , 'dcnm' : fw_data . get ( 'dcnm_status' ) } ) serv_obj . store_state ( state , popl_db = False ) if state == fw_const . FABRIC_PREPARE_DONE_STATE : serv_obj . set_fabric_create ( True ) router_id = fw_data . get ( 'router_id' ) rout_net_id = fw_data . get ( 'router_net_id' ) rout_subnet_id = fw_data . get ( 'router_subnet_id' ) serv_obj . update_fw_local_router ( rout_net_id , rout_subnet_id , router_id , None )
Populate the cache for a given tenant.

        Calls routines to Populate the in and out information.
        Update the result information.
        Populate the state information.
        Populate the router information.