import attr
from ..factory import target_factory
from .common import Resource
[docs]
@attr.s(eq=False)
class BaseProvider(Resource):
internal = attr.ib(validator=attr.validators.instance_of(str))
external = attr.ib(validator=attr.validators.instance_of(str))
[docs]
def __attrs_post_init__(self):
self.host = "localhost"
super().__attrs_post_init__()
[docs]
@target_factory.reg_resource
@attr.s(eq=False)
class TFTPProvider(BaseProvider):
pass
[docs]
@target_factory.reg_resource
@attr.s(eq=False)
class NFSProvider(Resource):
[docs]
def __attrs_post_init__(self):
self.host = "localhost"
super().__attrs_post_init__()
[docs]
@target_factory.reg_resource
@attr.s(eq=False)
class HTTPProvider(BaseProvider):
pass