is it possible to get a list of all database servers that are available in the openstack cloud using jclouds?

StackOverflow https://stackoverflow.com/questions/23317815

  •  10-07-2023
  •  | 
  •  

문제

i have successfully deployed an openstack cloud. i have installed mongodb server and mysql server in two virtual machines.

how can I get a list of all database servers that are available using jclouds ?

도움이 되었습니까?

해결책

In this case I think you'll need to use a naming convention for your VMs running databases. e.g. db-mysql or db-mongo

Then you can list the servers and iterate over the results to check for VMs that what with the db- prefix.

If you're using the ComputeService, you could use

ComputeService.listNodesDetailsMatching(Predicate<ComputeMetadata>)

If you're using the ServerApi, you could use

ServerApi.list()
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top