def set_network_host(self, context, network_ref):
        # TODO(mriedem): Remove this compat shim when network RPC API version
        # 1.0 is dropped.
        if not isinstance(network_ref, obj_base.NovaObject):
            network_ref = objects.Network._from_db_object(
                context, objects.Network(), network_ref)
        LOG.debug('Setting host %s for network %s', self.host,
                  network_ref.uuid, context=context)
        network_ref.host = self.host
        network_ref.save()
        return self.host
Constructor.
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/network/manager.py/NetworkManager.set_network_host--crossover with--dataset/ETHPy150Open openstack/ironic/ironic/common/glance_service/service.py/ImageService.__init__