yast/yast-slp — pull request #8 by vmoravec (2014-01-30 11:10:30+00:00)
Title: Slp service discovery module | FATE#316384

This is an addition for the SLP module. It improves the API for discovering services, see examples. How it works in short:
* first it makes a network scan for the services matching the name (and protocol if it's provided)
* then it filters the results by the remaining parameters (by matching the service properties or slp attributes)

## TODO
Add short how-to to the module

## Examples
```ruby
# Returns the first discovered ntp service or nil if none has been found
# Search parameter is service name
Yast::SlpService.find 'ntp'

# Search by the service name and other parameters
# that the service is expected to provide
Yast::SlpService.find 'install.suse', :protocol => 'ftp'

# The slp protocol provides ```attributes``` in its response,
# you can use the attributes' names in the search criteria.
Yast::SlpService.find 'install.suse', :protocol=>'ftp', :machine=>'x86_64', :description=>'SDK'

# To get all service keys/names use
Yast::SlpService.types # returns collection of structs with #name and #protocol