Use same hostname function as nova
Use same hostname function as nova

Certain plugin implementations of port binding depend on the port's
binding:host_id set by nova matching the compute node's hostname
reported by neutron agents in agents_db. Nova uses
socket.gethostname() to obtain the hostname, so this changes neutron
to also use socket.gethostname(), instead of socket.getfqdn() to
obtain the default hostname. If deployments require a specific
hostname format or value, the hostname can be specified in nova and
neutron configuration files.

Closes-Bug: 1223000
Change-Id: I5de9c6b0df16eca482037a5bdc3a77dc52f4adba

vveerava/Openstack,virtualopensystems/neutron,cernops/neutron,adelina-t/neutron,magic0704/neutron,huntxu/neutron,aristanetworks/neutron,yanheven/neutron,vbannai/neutron,pnavarro/neutron,vijayendrabvs/ssl-neutron,Juniper/neutron,SmartInfrastructures/neutron,miyakz1192/neutron,zhhf/charging,gkotton/neutron,blueboxgroup/neutron,mattt416/neutron,Metaswitch/calico-neutron,cisco-openstack/neutron,wenhuizhang/neutron,kaiweifan/neutron,virtualopensystems/neutron,neoareslinux/neutron,CiscoSystems/neutron,jerryz1982/neutron,rickerc/neutron_audit,mmnelemane/neutron,sebrandon1/neutron,gopal1cloud/neutron,chitr/neutron,waltBB/neutron_read,yamahata/neutron,citrix-openstack-build/neutron,Comcast/neutron,dims/neutron,beagles/neutron_hacking,yuewko/neutron,cernops/neutron,shahbazn/neutron,suneeth51/neutron,infobloxopen/neutron,antonioUnina/neutron,vbannai/neutron,aristanetworks/neutron,CiscoSystems/neutron,leeseulstack/openstack,Stavitsky/neutron,beagles/neutron_hacking,vijayendrabvs/ssl-neutron,MaximNevrov/neutron,chitr/neutron,cloudbase/neutron-virtualbox,gkotton/neutron,rdo-management/neutron,blueboxgroup/neutron,sasukeh/neutron,Stavitsky/neutron,yamahata/tacker,yanheven/neutron,projectcalico/calico-neutron,JioCloud/neutron,paninetworks/neutron,jacknjzhou/neutron,citrix-openstack-build/neutron,JianyuWang/neutron,yamahata/tacker,silenci/neutron,kaiweifan/neutron,Juniper/contrail-dev-neutron,leeseuljeong/leeseulstack_neutron,paninetworks/neutron,Comcast/neutron,jumpojoy/neutron,cloudbase/neutron,pnavarro/neutron,wenhuizhang/neutron,sajuptpm/neutron-ipam,vijayendrabvs/ssl-neutron,infobloxopen/neutron,mandeepdhami/neutron,leeseulstack/openstack,adelina-t/neutron,SamYaple/neutron,Juniper/neutron,Juniper/contrail-dev-neutron,mmnelemane/neutron,alexandrucoman/vbox-neutron-agent,mahak/neutron,vbannai/neutron,citrix-openstack-build/neutron,asgard-lab/neutron,antonioUnina/neutron,JioCloud/neutron,blueboxgroup/neutron,redhat-openstack/neutron,apporc/neutron,shahbazn/neutron,Metaswitch/calico-neutron,leeseuljeong/leeseulstack_neutron,mandeepdhami/neutron,asgard-lab/neutron,alexandrucoman/vbox-neutron-agent,mahak/neutron,Comcast/neutron,gopal1cloud/neutron,swdream/neutron,openstack/neutron,javaos74/neutron,eonpatapon/neutron,SamYaple/neutron,gkotton/neutron,sebrandon1/neutron,Juniper/neutron,skyddv/neutron,cloudbase/neutron,vijayendrabvs/hap,kaiweifan/neutron,mahak/neutron,CiscoSystems/neutron,jacknjzhou/neutron,JianyuWang/neutron,swdream/neutron,takeshineshiro/neutron,zhhf/charging,vivekanand1101/neutron,vivekanand1101/neutron,vijayendrabvs/hap,igor-toga/local-snat,yamahata/tacker,glove747/liberty-neutron,netscaler/neutron,Juniper/contrail-dev-neutron,huntxu/neutron,bigswitch/neutron,wolverineav/neutron,yuewko/neutron,projectcalico/calico-neutron,dhanunjaya/neutron,wolverineav/neutron,sajuptpm/neutron-ipam,watonyweng/neutron,mattt416/neutron,rdo-management/neutron,yamahata/neutron,ntt-sic/neutron,barnsnake351/neutron,barnsnake351/neutron,glove747/liberty-neutron,oeeagle/quantum,CiscoSystems/vespa,NeCTAR-RC/neutron,jerryz1982/neutron,openstack/neutron,openstack/neutron,dims/neutron,zhhf/charging,redhat-openstack/neutron,suneeth51/neutron,apporc/neutron,noironetworks/neutron,CiscoSystems/vespa,dhanunjaya/neutron,yamahata/neutron,ntt-sic/neutron,miyakz1192/neutron,javaos74/neutron,beagles/neutron_hacking,CiscoSystems/vespa,jumpojoy/neutron,magic0704/neutron,skyddv/neutron,noironetworks/neutron,sasukeh/neutron,virtualopensystems/neutron,rickerc/neutron_audit,waltBB/neutron_read,rickerc/neutron_audit,MaximNevrov/neutron,bgxavier/neutron,klmitch/neutron,watonyweng/neutron,neoareslinux/neutron,eayunstack/neutron,eonpatapon/neutron,oeeagle/quantum,bgxavier/neutron,vijayendrabvs/hap,silenci/neutron,leeseuljeong/leeseulstack_neutron,NeCTAR-RC/neutron,cisco-openstack/neutron,leeseulstack/openstack,vveerava/Openstack,ntt-sic/neutron,takeshineshiro/neutron,bigswitch/neutron,igor-toga/local-snat,netscaler/neutron,klmitch/neutron,eayunstack/neutron,cloudbase/neutron-virtualbox,netscaler/neutron,vveerava/Openstack,SmartInfrastructures/neutron,sajuptpm/neutron-ipam