|
@@ -380,6 +380,7 @@ class Service(Item):
|
|
|
|
|
|
def __init__(self,
|
|
|
duration=None,
|
|
|
+ ip_addresses=None,
|
|
|
location=None,
|
|
|
period=None,
|
|
|
state=None,
|
|
@@ -390,6 +391,10 @@ class Service(Item):
|
|
|
if duration:
|
|
|
assert isinstance(duration, ioex.datetimeex.Duration)
|
|
|
self.duration = duration
|
|
|
+ if ip_addresses:
|
|
|
+ assert isinstance(ip_addresses, list)
|
|
|
+ assert all([isinstance(a, str) for a in ip_addresses])
|
|
|
+ self.ip_addresses = ip_addresses
|
|
|
if location:
|
|
|
assert isinstance(location, str)
|
|
|
self.location = location
|
|
@@ -406,15 +411,10 @@ class HostingService(Service):
|
|
|
yaml_tag = u'!hosting-service'
|
|
|
|
|
|
def __init__(self,
|
|
|
- ip_addresses=None,
|
|
|
operating_system=None,
|
|
|
**kwargs
|
|
|
):
|
|
|
super(HostingService, self).__init__(**kwargs)
|
|
|
- if ip_addresses:
|
|
|
- assert isinstance(ip_addresses, list)
|
|
|
- assert all([isinstance(a, str) for a in ip_addresses])
|
|
|
- self.ip_addresses = ip_addresses
|
|
|
if operating_system:
|
|
|
assert isinstance(operating_system, str)
|
|
|
self.operating_system = operating_system
|