X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=openvimd;h=b4f628319e5249a6d8c6e61f752c55f699eab10b;hb=c67abe2ff35fcdd5b85db97915a7833ab31beb56;hp=e2bbabe91522cf0a844ff1b838b5c5ee1c50fa8e;hpb=86b8dd1f1ac02927ade345fea697f620f5134f13;p=osm%2Fopenvim.git diff --git a/openvimd b/openvimd index e2bbabe..b4f6283 100755 --- a/openvimd +++ b/openvimd @@ -24,8 +24,8 @@ """ This is the main program of openvim, it reads the configuration -and launches the rest of threads: http clients, openflow controller -and host controllers +and launches the rest of threads: http clients, openflow controllers +and host controllers, network controller """ import osm_openvim.httpserver as httpserver @@ -231,10 +231,22 @@ if __name__ == "__main__": logger.error(error_msg) exit(1) + if config_dic['network_type'] == 'ovs' \ + and config_dic['ovs_controller_ip'][:4] == '127.': + # and not (config_dic['mode'] == 'test' or config_dic['mode'] == "OF only"): + + error_msg = "Error: invalid value '{}' for ovs_controller_ip at {}. Use 'localhost' word instead "\ + "of a loopback IP address".format(config_dic['ovs_controller_ip'], config_file) + + print ("!! {} ".format(error_msg)) + logger.error(error_msg) + exit(1) + if config_dic['mode'] != 'normal': print ('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!') print ("!! Warning, openvimd in TEST mode '{}'".format(config_dic['mode'])) print ('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!') + config_dic['version'] = ovim.ovim.get_version() config_dic["logger_name"] = "openvim"