# Class e.p.a.a.AvahiResourceProvider(ResourceProvider):

Part of elisa.plugins.avahi.avahi_resource_provider View In Hierarchy

No class docstring

Line # | Kind | Name | Docs
--- | --- | --- | ---
72 | Method | __init__ | Undocumented
87 | Method | initialize | Initialize the component.
110 | Method | get | Request network informations. Using this method you can browse the

Inherited from ResourceProvider:

Line # | Kind | Name | Docs
--- | --- | --- | ---
94 | Method | post | Update the resource pointed by `uri` with `parameters`.
107 | Method | put | Put one resource into another. Both resources are identified with URIs.
129 | Method | delete | Delete a Resource represented by a URI.

Inherited from Component (via ResourceProvider):

Line # | Kind | Name | Docs
--- | --- | --- | ---
85 | Class | PathDescriptor | Undocumented
97 | Class Method | create | Create and initialize the component.
142 | Method | clean | Clean the component.

def __init__(self):
overrides elisa.core.log.Loggable.__init__
Undocumented
def initialize(self):
overrides elisa.core.component.Component.initialize

Initialize the component.

This method is called by `Component.create` to finish the initialization of a component.

Returns | a deferred called when a component is fully initialized (type: `twisted.internet.defer.Deferred` )

def get(self, uri, context_model):
overrides elisa.core.components.resource_provider.ResourceProvider.get

Request network informations. Using this method you can browse the networks your system is in using Avahi. The URI you probably want to start with is the `network://` what returns you a `elisa.plugins.avahi.models.NetworkOverViewModel`. This contains a list of domains found on the network. You now can request one of the domains putting the name of it as the host: `network://<domain_name>`. For e.g. `network://mylocaldomain`. You will receive a `elisa.plugins.avahi.models.DomainModel` containing `elisa.plugins.base.models.network.NetworkServiceModel`s.

These Service models are added and removed on the fly if differences are discovered. This is possible because you always receive the same DomainModel instance for each request. The `context_model` is not taken into account at all.

A shortcut you might be interested in is the `lan://` uri. This is the same as a `network://local` and that is the only domain that is always automatically discovered (as it is a bit special).

If you request for any other kind of domain, you might get a failure wiht `DomainNotFound`.