Skip to content
Snippets Groups Projects
Commit 97b5e2c2 authored by Simone Spinelli's avatar Simone Spinelli
Browse files

Clean syntax to pass tests

parent 9c65f54b
Branches
Tags
1 merge request!4Device product and initial workflow
......@@ -4,7 +4,10 @@ from orchestrator.domain.base import ProductBlockModel
from orchestrator.types import SubscriptionLifecycle
import ipaddress
class DeviceBlockInactive(ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="DeviceBlock"):
class DeviceBlockInactive(ProductBlockModel,
lifecycle=[SubscriptionLifecycle.INITIAL],
product_block_name="DeviceBlock"):
fqdn: Optional[str] = None
ts_address: Optional[str] = None
ts_port: Optional[int] = None
......@@ -22,7 +25,8 @@ class DeviceBlockInactive(ProductBlockModel, lifecycle=[SubscriptionLifecycle.IN
snmp_location: Optional[str] = None
class DeviceBlockProvisioning(DeviceBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
class DeviceBlockProvisioning(DeviceBlockInactive,
lifecycle=[SubscriptionLifecycle.PROVISIONING]):
fqdn: str
ts_address: str
ts_port: str
......@@ -40,16 +44,17 @@ class DeviceBlockProvisioning(DeviceBlockInactive, lifecycle=[SubscriptionLifecy
snmp_location: Optional[str] = None
class DeviceBlock(DeviceBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
class DeviceBlock(DeviceBlockProvisioning,
lifecycle=[SubscriptionLifecycle.ACTIVE]):
fqdn: str
ts_address: str
ts_port: str
lo_ipv4_address: ipaddress.IPv4Address
lo_ipv6_address: ipaddress.IPv6Address
lo_iso_address: str
si_ipv4_network: ipaddress.IPv4Network
ias_lt_ipv4_network: ipaddress.IPv4Network
ias_lt_ipv6_network: ipaddress.IPv6Network
lo_ipv4_address: ipaddress.IPv4Address
lo_ipv6_address: ipaddress.IPv6Address
lo_iso_address: str
si_ipv4_network: ipaddress.IPv4Network
ias_lt_ipv4_network: ipaddress.IPv4Network
ias_lt_ipv6_network: ipaddress.IPv6Network
site_city: str
site_country: str
site_country_code: str
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment