3.5. 호스트 나열
이 Ruby 예제에서는 호스트를 나열합니다.
# Get the reference to the root of the services tree:
system_service = connection.system_service
# Get the reference to the service that manages the
# collection of hosts:
host_service = system_service.hosts_service
# Retrieve the list of hosts and for each one
# print its name:
host = host_service.list
host.each do |host|
puts host.name
end
연결된 호스트(Atlantic)만 있는 환경에서 예제 출력:
Atlantic
자세한 내용은 HostsService:list-instance_method 를 참조하십시오.