perfsonar / perl-shared

Shared libraries used by perl packages and referenced as a submodule in many git repos
Apache License 2.0
7 stars 3 forks source link

Tcp info #63

Closed bhavesh37 closed 5 years ago

bhavesh37 commented 5 years ago

Added TCP config method to show tcp info on UI and host JSON

ajragusa commented 5 years ago

I think this looks good, but I'll ask Andy to review just to make sure. Good job Bhavesh

arlake228 commented 5 years ago

A few questions/observations:

arlake228 commented 5 years ago

Per my second bullet, I looked closer at this and you should be able remove the configuration file read from lib/perfSONAR_PS/Utils/LookupService.pm and update the calls to is_host_registered() in lib/perfSONAR_PS/NPToolkit/DataService/Host.pm to pass the value of $conf{activehosts}. The %conf hash already has the contents of that file so there is no need to read it again. For an example, see how it handles allow_internal_addresses from web_admin.conf. For each call in Host.pm to is_host_registered() you can do something like the following:

$is_registered = is_host_registered($external_address, $conf{activehosts});

You will then need to update the subroutines in lib/perfSONAR_PS/Utils/LookupService.pm to accept and pass through the optional activehosts parameter as needed. If the activehosts argument is not present when the subroutine is called, it should probably just fallback to the old behavior for backward compatibility.

bhavesh37 commented 5 years ago

Created separate branches for each toolkit issue/commit