Skip to content

[API_FCT] getAllHostsByElement#10

Open
ChamMach wants to merge 4 commits intoEyesOfNetworkCommunity:masterfrom
ChamMach:master_cham
Open

[API_FCT] getAllHostsByElement#10
ChamMach wants to merge 4 commits intoEyesOfNetworkCommunity:masterfrom
ChamMach:master_cham

Conversation

@ChamMach
Copy link

@ChamMach ChamMach commented Sep 17, 2019

Hello,

I created a new function for the API and named this "getAllHostsByElement".
With this, the user can get hosts with more flexibility :

  • He can get a list of hosts that's meet the requierement (instead of a single host that's meet strictly the requirement with getHost)
  • He can get an host with only the ip address
  • He can get a list of hosts with specific alias
  • Also, if we send a space, the function return all the hosts of an EON

However, be careful when using this function. Indeed, the function will search in all the hosts if the searched element is not present (the function search on the fields name, alias & ip address). If the searched element is present in a host but not strictly, the function will recover this host anyway.

For example :

On my EyesOfNetwork I have 3 hosts:

  1. localhost
  2. testlinuxhost
  3. testwindows

If I search for the list of hosts with the string host in their names the function will send me localhost and testlinuxhost.

If I search for those with test then the function will send me testlinuxhost and testwindows.

If I put a space as an element, the function will send me every hosts.

Even if the research element can be variable while having a fixed base. We must be sure that we master the call of the function and the configuration of the supervision.

Some basic tests in the commit comments.

SAADOUNE Chamseddine and others added 4 commits September 17, 2019 17:29
Minor modifications
Minor modification : deletion of one useless variable
Allow no argument to get all host
@IPv777
Copy link

IPv777 commented Jan 20, 2020

any news from the project managers ?

@ChamMach
Copy link
Author

ChamMach commented Feb 6, 2020

Ping @davoult & @jeremyHoarau

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments