Skip to content
Snippets Groups Projects

Feature/NAT 459 - Opengear import workflow

Merged Neda Moeini requested to merge feature/NAT-459 into develop
1 file
+ 4
3
Compare changes
  • Side-by-side
  • Inline
+ 30
1
@@ -145,8 +145,25 @@ class IptrunkImportModel(BaseModel):
return self
class OpenGearImportModel(BaseModel):
"""Required fields for importing an existing :class:`gso.products.product_types.opengear`."""
partner: str
opengear_site: str
opengear_hostname: str
opengear_wan_address: IPv4AddressType
opengear_wan_netmask: IPv4AddressType
opengear_wan_gateway: IPv4AddressType
T = TypeVar(
"T", SiteImportModel, RouterImportModel, IptrunkImportModel, SuperPopSwitchImportModel, OfficeRouterImportModel
"T",
SiteImportModel,
RouterImportModel,
IptrunkImportModel,
SuperPopSwitchImportModel,
OfficeRouterImportModel,
OpenGearImportModel,
)
common_filepath_option = typer.Option(
@@ -263,6 +280,18 @@ def import_office_routers(filepath: str = common_filepath_option) -> None:
)
@app.command()
def import_opengear(filepath: str = common_filepath_option) -> None:
"""Import Opengear into GSO."""
_generic_import_product(
Path(filepath),
ProductType.IMPORTED_OPENGEAR,
"opengear",
"opengear_hostname",
OpenGearImportModel,
)
@app.command()
def import_iptrunks(filepath: str = common_filepath_option) -> None:
"""Import IP trunks into GSO."""
Loading