diff --git a/gso/cli/imports.py b/gso/cli/imports.py index ba33565e27870475aad36ef4493dbcab7530b20e..4c973ace3bd5653e751292c7a078576fb79265ce 100644 --- a/gso/cli/imports.py +++ b/gso/cli/imports.py @@ -40,6 +40,7 @@ from gso.services.subscriptions import ( ) from gso.utils.shared_enums import SBPType, Vendor from gso.utils.types.base_site import BaseSiteValidatorModel +from gso.utils.types.geant_ids import IMPORTED_GA_ID, IMPORTED_GS_ID from gso.utils.types.interfaces import BandwidthString, LAGMember, LAGMemberList, PhysicalPortCapacity from gso.utils.types.ip_address import ( AddressSpace, @@ -116,7 +117,7 @@ class IptrunkImportModel(BaseModel): """Required fields for importing an existing ``gso.products.product_types.iptrunk``.""" partner: str - gs_id: str | None + gs_id: IMPORTED_GS_ID | None iptrunk_type: IptrunkType iptrunk_description: str | None = None iptrunk_speed: PhysicalPortCapacity @@ -124,11 +125,11 @@ class IptrunkImportModel(BaseModel): iptrunk_isis_metric: int side_a_node_id: str side_a_ae_iface: str - side_a_ga_id: str | None + side_a_ga_id: IMPORTED_GA_ID | None side_a_ae_members: LAGMemberList[LAGMember] side_b_node_id: str side_b_ae_iface: str - side_b_ga_id: str | None + side_b_ga_id: IMPORTED_GA_ID | None side_b_ae_members: LAGMemberList[LAGMember] iptrunk_ipv4_network: ipaddress.IPv4Network @@ -197,7 +198,7 @@ class EdgePortImportModel(BaseModel): encapsulation: EncapsulationType name: str minimum_links: int - ga_id: str | None + ga_id: IMPORTED_GA_ID | None mac_address: str | None partner: str enable_lacp: bool @@ -269,7 +270,7 @@ class L3CoreServiceImportModel(BaseModel): edge_port: str ap_type: str - gs_id: str + gs_id: IMPORTED_GS_ID sbp_type: SBPType = SBPType.L3 is_tagged: bool = False vlan_id: VLAN_ID @@ -349,7 +350,7 @@ class Layer2CircuitServiceImportModel(BaseModel): service_type: Layer2CircuitServiceType partner: str - gs_id: str + gs_id: IMPORTED_GS_ID vc_id: VC_ID layer_2_circuit_side_a: ServiceBindingPortInput layer_2_circuit_side_b: ServiceBindingPortInput diff --git a/gso/utils/types/geant_ids.py b/gso/utils/types/geant_ids.py new file mode 100644 index 0000000000000000000000000000000000000000..adc3b19c0bb25afed690833f61f2f56decc4e1cc --- /dev/null +++ b/gso/utils/types/geant_ids.py @@ -0,0 +1,49 @@ +"""Type definitions for the GA and GS IDs.""" + +from functools import partial +from typing import Annotated + +from pydantic import AfterValidator + +from gso.services.subscriptions import is_resource_type_value_unique + + +def validate_id(value: str, prefix: str, field_name: str) -> str: + """Validate that the ID is unique, has the correct prefix, and is within valid constraints. + + Args: + value (str): The ID value to validate. + prefix (str): The required prefix for the ID (e.g., "GA-" or "GS-"). + field_name (str): The database field name to check for uniqueness (e.g., "ga_id" or "gs_id"). + + Raises: + ValueError: If the ID is not valid. + + Returns: + str: The validated ID. + """ + min_range = 50000 + max_range = 99999 + if not value.startswith(prefix): + err = f"{field_name} must start with the prefix '{prefix}'." + raise ValueError(err) + + try: + numeric_part = int(value[len(prefix) :]) + except ValueError: + err = f"{field_name} must have a numeric part after the prefix '{prefix}'." + raise ValueError(err) from ValueError + + if min_range <= numeric_part < max_range: + err = f"{field_name} must not have a numeric part between 50000 and 99999." + raise ValueError(err) + + if not is_resource_type_value_unique(field_name, value): + err = f"{field_name} must be unique." + raise ValueError(err) + + return value + + +IMPORTED_GA_ID = Annotated[str, AfterValidator(partial(validate_id, prefix="GA-", field_name="ga_id"))] +IMPORTED_GS_ID = Annotated[str, AfterValidator(partial(validate_id, prefix="GS-", field_name="gs_id"))] diff --git a/gso/workflows/edge_port/create_imported_edge_port.py b/gso/workflows/edge_port/create_imported_edge_port.py index 07d4abf39675f88b6d42e3eb6bbfbbc2af950f97..cd5f7a7b164977d188272cb94bbdba366f66982e 100644 --- a/gso/workflows/edge_port/create_imported_edge_port.py +++ b/gso/workflows/edge_port/create_imported_edge_port.py @@ -20,6 +20,7 @@ from gso.products.product_types.router import Router from gso.services.partners import get_partner_by_name from gso.services.subscriptions import get_product_id_by_name from gso.utils.helpers import active_pe_router_selector +from gso.utils.types.geant_ids import IMPORTED_GA_ID from gso.utils.types.interfaces import LAGMember, PhysicalPortCapacity @@ -48,7 +49,7 @@ def initial_input_form_generator() -> FormGenerator: minimum_links: int mac_address: str | None = None ignore_if_down: bool = False - ga_id: str | None = None + ga_id: IMPORTED_GA_ID | None = None description: str | None = None name: str ae_members: Annotated[list[LAGMember], AfterValidator(validate_unique_list)] @@ -67,7 +68,7 @@ def initialize_subscription( encapsulation: EncapsulationType, name: str, minimum_links: int, - ga_id: str | None, + ga_id: IMPORTED_GA_ID | None, mac_address: str | None, partner: str, enable_lacp: bool, # noqa: FBT001 diff --git a/gso/workflows/iptrunk/create_imported_iptrunk.py b/gso/workflows/iptrunk/create_imported_iptrunk.py index db88b2b881a784dbfa76563b6b40fd0c935b03f0..1feec5053801b38b7e0ec75324f6e9194e37f723 100644 --- a/gso/workflows/iptrunk/create_imported_iptrunk.py +++ b/gso/workflows/iptrunk/create_imported_iptrunk.py @@ -20,6 +20,7 @@ from gso.products.product_types.router import Router from gso.services import subscriptions from gso.services.partners import get_partner_by_name from gso.utils.helpers import active_router_selector +from gso.utils.types.geant_ids import IMPORTED_GA_ID, IMPORTED_GS_ID from gso.utils.types.interfaces import LAGMember, LAGMemberList, PhysicalPortCapacity @@ -30,7 +31,7 @@ def initial_input_form_generator() -> FormGenerator: model_config = ConfigDict(title="Import Iptrunk") partner: str - gs_id: str | None = None + gs_id: IMPORTED_GS_ID | None = None iptrunk_description: str | None = None iptrunk_type: IptrunkType iptrunk_speed: PhysicalPortCapacity @@ -39,12 +40,12 @@ def initial_input_form_generator() -> FormGenerator: side_a_node_id: active_router_selector() # type: ignore[valid-type] side_a_ae_iface: str - side_a_ga_id: str | None = None + side_a_ga_id: IMPORTED_GA_ID | None = None side_a_ae_members: Annotated[list[LAGMember], AfterValidator(validate_unique_list)] side_b_node_id: active_router_selector() # type: ignore[valid-type] side_b_ae_iface: str - side_b_ga_id: str | None = None + side_b_ga_id: IMPORTED_GA_ID | None = None side_b_ae_members: Annotated[list[LAGMember], AfterValidator(validate_unique_list)] iptrunk_ipv4_network: ipaddress.IPv4Network @@ -71,7 +72,7 @@ def create_subscription(partner: str) -> State: @step("Initialize subscription") def initialize_subscription( subscription: ImportedIptrunkInactive, - gs_id: str | None, + gs_id: IMPORTED_GS_ID | None, iptrunk_type: IptrunkType, iptrunk_description: str, iptrunk_speed: PhysicalPortCapacity, @@ -79,11 +80,11 @@ def initialize_subscription( iptrunk_isis_metric: int, side_a_node_id: str, side_a_ae_iface: str, - side_a_ga_id: str | None, + side_a_ga_id: IMPORTED_GA_ID | None, side_a_ae_members: LAGMemberList, side_b_node_id: str, side_b_ae_iface: str, - side_b_ga_id: str | None, + side_b_ga_id: IMPORTED_GA_ID | None, side_b_ae_members: LAGMemberList, ) -> State: """Take all input from the user, and store it in the database.""" diff --git a/test/cli/test_imports.py b/test/cli/test_imports.py index 475492a48dfd696e203932dc27dc5444636f7deb..571e64b6a4444f319c4ab8df73179894925b10a9 100644 --- a/test/cli/test_imports.py +++ b/test/cli/test_imports.py @@ -62,7 +62,7 @@ def iptrunk_data(temp_file, router_subscription_factory, faker) -> (Path, dict): ipv6_network = ipv6_network or str(faker.ipv6_network(max_subnet=126)) iptrunk_data = { - "id": faker.geant_sid(), + "id": faker.imported_gs_id(), "config": { "common": { "link_speed": PhysicalPortCapacity.HUNDRED_GIGABIT_PER_SECOND, @@ -73,7 +73,7 @@ def iptrunk_data(temp_file, router_subscription_factory, faker) -> (Path, dict): "nodeA": { "name": side_a_node or Router.from_subscription(router_side_a).router.router_fqdn, "ae_name": side_a_ae_name or faker.network_interface(), - "port_ga_id": faker.geant_gid(), + "port_ga_id": faker.imported_ga_id(), "members": side_a_members or [ { @@ -88,7 +88,7 @@ def iptrunk_data(temp_file, router_subscription_factory, faker) -> (Path, dict): "nodeB": { "name": side_b_node or Router.from_subscription(router_side_b).router.router_fqdn, "ae_name": side_b_ae_name or faker.network_interface(), - "port_ga_id": faker.geant_gid(), + "port_ga_id": faker.imported_ga_id(), "members": side_b_members or [ { @@ -270,7 +270,7 @@ def edge_port_data(temp_file, faker, router_subscription_factory, partner_factor "encapsulation": EncapsulationType.DOT1Q, "name": "lag34", "minimum_links": 2, - "ga_id": faker.geant_gid(), + "ga_id": faker.imported_ga_id(), "mac_address": faker.mac_address(), "partner": partner_factory()["name"], "enable_lacp": True, @@ -305,7 +305,7 @@ def l3_core_service_data(temp_file, faker, partner_factory, edge_port_subscripti { "edge_port": edge_port_subscription_factory(), "ap_type": "PRIMARY", - "gs_id": faker.geant_sid(), + "gs_id": faker.imported_gs_id(), "vlan_id": faker.vlan_id(), "ipv4_address": faker.ipv4(), "ipv4_mask": faker.ipv4_netmask(), @@ -353,7 +353,7 @@ def l3_core_service_data(temp_file, faker, partner_factory, edge_port_subscripti { "edge_port": edge_port_subscription_factory(), "ap_type": "BACKUP", - "gs_id": faker.geant_sid(), + "gs_id": faker.imported_gs_id(), "vlan_id": faker.vlan_id(), "ipv4_address": faker.ipv4(), "ipv4_mask": faker.ipv4_netmask(), @@ -414,7 +414,7 @@ def layer_2_circuit_data(temp_file, faker, partner_factory, edge_port_subscripti layer_2_circuit_input_data = { "partner": partner_factory()["name"], "service_type": Layer2CircuitServiceType.GEANT_PLUS, - "gs_id": faker.geant_sid(), + "gs_id": faker.imported_gs_id(), "vc_id": generate_unique_vc_id(), "layer_2_circuit_side_a": { "edge_port": edge_port_subscription_factory(), @@ -697,7 +697,7 @@ def test_import_l3_core_service_with_invalid_edge_port( { "edge_port": fake_uuid, "ap_type": "PRIMARY", - "gs_id": faker.geant_sid(), + "gs_id": faker.imported_gs_id(), "vlan_id": faker.vlan_id(), "ipv4_address": faker.ipv4(), "ipv4_mask": faker.ipv4_netmask(), @@ -737,7 +737,7 @@ def test_import_l3_core_service_with_invalid_edge_port( { "edge_port": edge_port_subscription_factory(), "ap_type": "BACKUP", - "gs_id": faker.geant_sid(), + "gs_id": faker.imported_gs_id(), "vlan_id": faker.vlan_id(), "ipv4_address": faker.ipv4(), "ipv4_mask": faker.ipv4_netmask(), diff --git a/test/conftest.py b/test/conftest.py index da558c8a693e9a71cd2f30ff5832eac42b49684c..4548fe0fadd99957fee38e96fc0874402063f048 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -73,11 +73,21 @@ class FakerProvider(BaseProvider): return f"TT#{random_date}{random_int}" - def geant_gid(self) -> str: - return self.generator.numerify("GID-#####") + def ga_id(self) -> str: + random_int = self.generator.random_int(min=50000, max=99999) + return f"GA-{random_int}" - def geant_sid(self) -> str: - return self.generator.numerify("SID-#####") + def gs_id(self) -> str: + random_int = self.generator.random_int(min=50000, max=99999) + return f"GS-{random_int}" + + def imported_ga_id(self) -> str: + random_int = self.generator.random_int(min=00000, max=50000) + return f"GA-{random_int}" + + def imported_gs_id(self) -> str: + random_int = self.generator.random_int(min=00000, max=50000) + return f"GS-{random_int}" def site_name(self) -> str: site_name = "".join(self.generator.random_letter().upper() for _ in range(3)) diff --git a/test/fixtures/edge_port_fixtures.py b/test/fixtures/edge_port_fixtures.py index 7ea6b8b90775160fc4f051018fc112977d4a9103..0ea8744983148d97f4c9920498ea2da8a3b17ff7 100644 --- a/test/fixtures/edge_port_fixtures.py +++ b/test/fixtures/edge_port_fixtures.py @@ -52,7 +52,7 @@ def edge_port_subscription_factory(faker, partner_factory, router_subscription_f ) edge_port_subscription.edge_port.edge_port_description = description or faker.text(max_nb_chars=30) - edge_port_subscription.edge_port.ga_id = ga_id or faker.geant_gid() + edge_port_subscription.edge_port.ga_id = ga_id or faker.ga_id() edge_port_subscription.edge_port.node = node or node edge_port_subscription.edge_port.edge_port_name = name or f"lag-{faker.pyint(21, 50)}" edge_port_subscription.edge_port.edge_port_description = edge_port_description or faker.sentence() diff --git a/test/fixtures/iptrunk_fixtures.py b/test/fixtures/iptrunk_fixtures.py index 17715ebee9ced40b8d3c81d215b238198bdfb7af..742e974a98001ee4908f08b6502d7d5ca9ae8c20 100644 --- a/test/fixtures/iptrunk_fixtures.py +++ b/test/fixtures/iptrunk_fixtures.py @@ -31,7 +31,7 @@ def iptrunk_side_subscription_factory(router_subscription_factory, faker): iptrunk_side_node or router_subscription_factory(vendor=Vendor.NOKIA) ).router, iptrunk_side_ae_iface=iptrunk_side_ae_iface or faker.pystr(), - ga_id=ga_id or faker.geant_gid(), + ga_id=ga_id or faker.ga_id(), iptrunk_side_ae_members=iptrunk_side_ae_members or [ IptrunkInterfaceBlock.new( @@ -84,7 +84,7 @@ def iptrunk_subscription_factory(iptrunk_side_subscription_factory, faker, geant ) description = description or faker.sentence() - gs_id = gs_id or faker.geant_sid() + gs_id = gs_id or faker.gs_id() iptrunk_description = iptrunk_description or faker.sentence() iptrunk_isis_metric = iptrunk_isis_metric or faker.pyint() iptrunk_ipv4_network = iptrunk_ipv4_network or faker.ipv4_network(max_subnet=31) diff --git a/test/fixtures/l3_core_service_fixtures.py b/test/fixtures/l3_core_service_fixtures.py index 493ddc1caefdcf2201a6c7cde431e52934777be1..21ea6379595e8860d95e35508ec1b6a6e3cd7721 100644 --- a/test/fixtures/l3_core_service_fixtures.py +++ b/test/fixtures/l3_core_service_fixtures.py @@ -108,7 +108,7 @@ def service_binding_port_factory( ipv6_address=ipv6_address or faker.ipv6(), ipv6_mask=ipv6_mask or faker.ipv6_netmask(), custom_firewall_filters=custom_firewall_filters, - gs_id=gs_id or faker.geant_sid(), + gs_id=gs_id or faker.gs_id(), bgp_session_list=bgp_session_list or [ bgp_session_subscription_factory(families=[IPFamily.V4UNICAST]), diff --git a/test/fixtures/layer_2_circuit_fixtures.py b/test/fixtures/layer_2_circuit_fixtures.py index e7c8c468229874267fff32d8a21a3228ea111d46..2b93a37025a3ae728f68d0b869305b20b7474ff8 100644 --- a/test/fixtures/layer_2_circuit_fixtures.py +++ b/test/fixtures/layer_2_circuit_fixtures.py @@ -82,7 +82,7 @@ def layer_2_circuit_subscription_factory(faker, geant_partner, edge_port_subscri edge_port=EdgePort.from_subscription(edge_port).edge_port, sbp_type=SBPType.L2, vlan_id=vlan_id, - gs_id=gs_id or faker.geant_sid(), + gs_id=gs_id or faker.gs_id(), is_tagged=layer_2_circuit_type == Layer2CircuitType.TAGGED, custom_firewall_filters=False, ) diff --git a/test/workflows/edge_port/test_create_imported_edge_port.py b/test/workflows/edge_port/test_create_imported_edge_port.py index 838d330d9dc1c2feabd6d48d127aa484bb5ddc64..ea5b024e5ef9bdc1de35214e5c487a22979f7b6e 100644 --- a/test/workflows/edge_port/test_create_imported_edge_port.py +++ b/test/workflows/edge_port/test_create_imported_edge_port.py @@ -17,7 +17,7 @@ def imported_edge_port_creation_input_form_data(router_subscription_factory, par "encapsulation": EncapsulationType.DOT1Q, "name": "lag34", "minimum_links": 2, - "ga_id": faker.geant_gid(), + "ga_id": faker.imported_ga_id(), "mac_address": faker.mac_address(), "partner": partner_factory()["name"], "enable_lacp": True, diff --git a/test/workflows/edge_port/test_modify_edge_port.py b/test/workflows/edge_port/test_modify_edge_port.py index 6e16f73ab567a9aa109703f5711a5aabc8df5107..25adcd85704403110691db0ffa150da0bf168d10 100644 --- a/test/workflows/edge_port/test_modify_edge_port.py +++ b/test/workflows/edge_port/test_modify_edge_port.py @@ -21,7 +21,7 @@ def input_form_wizard_data(request, faker, edge_port_subscription_factory, partn {"subscription_id": subscription_id}, { "tt_number": faker.tt_number(), - "ga_id": faker.geant_gid(), + "ga_id": faker.ga_id(), "member_speed": PhysicalPortCapacity.FOUR_HUNDRED_GIGABIT_PER_SECOND, "number_of_members": 1, }, @@ -100,7 +100,7 @@ def input_form_wizard_without_changing_capacity(request, faker, edge_port_subscr return [ {"subscription_id": subscription_id}, - {"tt_number": faker.tt_number(), "ga_id": faker.geant_gid()}, + {"tt_number": faker.tt_number(), "ga_id": faker.ga_id()}, { "description": faker.sentence(), "ae_members": [ diff --git a/test/workflows/iptrunk/test_create_imported_iptrunk.py b/test/workflows/iptrunk/test_create_imported_iptrunk.py index 8b9c5d4d56ef3ee27e5af986b69c4f075d0694ce..deaa2ddd519b8f699633e35d6713414f4e3db8d1 100644 --- a/test/workflows/iptrunk/test_create_imported_iptrunk.py +++ b/test/workflows/iptrunk/test_create_imported_iptrunk.py @@ -16,7 +16,7 @@ from test.workflows import ( def workflow_input_data(faker, router_subscription_factory): return { "partner": "GEANT", - "gs_id": faker.geant_sid(), + "gs_id": faker.imported_gs_id(), "iptrunk_description": faker.sentence(), "iptrunk_type": IptrunkType.DARK_FIBER, "iptrunk_speed": PhysicalPortCapacity.FOUR_HUNDRED_GIGABIT_PER_SECOND, @@ -24,13 +24,13 @@ def workflow_input_data(faker, router_subscription_factory): "iptrunk_isis_metric": 10000, "side_a_node_id": router_subscription_factory(), "side_a_ae_iface": faker.network_interface(), - "side_a_ga_id": faker.geant_gid(), + "side_a_ga_id": faker.imported_ga_id(), "side_a_ae_members": [ {"interface_name": faker.network_interface(), "interface_description": faker.sentence()} for _ in range(3) ], "side_b_node_id": router_subscription_factory(), "side_b_ae_iface": faker.network_interface(), - "side_b_ga_id": faker.geant_gid(), + "side_b_ga_id": faker.imported_ga_id(), "side_b_ae_members": [ {"interface_name": faker.network_interface(), "interface_description": faker.sentence()} for _ in range(3) ], diff --git a/test/workflows/iptrunk/test_modify_trunk_interface.py b/test/workflows/iptrunk/test_modify_trunk_interface.py index 801ce86550d2374312daa3a1e4074039b3c33da0..12f49b90e4cfb524eaeb564718197aedcff80768 100644 --- a/test/workflows/iptrunk/test_modify_trunk_interface.py +++ b/test/workflows/iptrunk/test_modify_trunk_interface.py @@ -52,15 +52,15 @@ def input_form_iptrunk_data( product_id = iptrunk_subscription_factory(iptrunk_sides=[side_a_node, side_b_node]) - new_sid = faker.geant_sid() + new_sid = faker.gs_id() new_description = faker.sentence() new_type = IptrunkType.LEASED new_speed = PhysicalPortCapacity.FOUR_HUNDRED_GIGABIT_PER_SECOND new_link_count = 2 - new_side_a_gid = faker.geant_gid() + new_side_a_gid = faker.ga_id() - new_side_b_gid = faker.geant_gid() + new_side_b_gid = faker.ga_id() return [ {"subscription_id": product_id}, diff --git a/test/workflows/l2_circuit/test_create_imported_layer_2_circuit.py b/test/workflows/l2_circuit/test_create_imported_layer_2_circuit.py index 2d4ed7a2217de21b2cee2c97335715515ec196c1..3d0e78709dd4b708af3e46cdd19110611edbbfc4 100644 --- a/test/workflows/l2_circuit/test_create_imported_layer_2_circuit.py +++ b/test/workflows/l2_circuit/test_create_imported_layer_2_circuit.py @@ -28,7 +28,7 @@ def test_create_imported_layer_2_circuit_success( "vc_id": generate_unique_vc_id(), "policer_bandwidth": faker.bandwidth() if policer_enabled else None, "policer_burst_rate": faker.bandwidth() if policer_enabled else None, - "gs_id": faker.geant_sid(), + "gs_id": faker.imported_gs_id(), "layer_2_circuit_side_a": {"edge_port": edge_port_a, "vlan_id": faker.vlan_id()}, "layer_2_circuit_side_b": {"edge_port": edge_port_b, "vlan_id": faker.vlan_id()}, } diff --git a/test/workflows/l3_core_service/test_create_imported_l3_core_service.py b/test/workflows/l3_core_service/test_create_imported_l3_core_service.py index 0580bb5c90891514d542c4f2adf3e1b68d573987..48ac4b54d40fa6be2e76a3fea17d98c44bda8d33 100644 --- a/test/workflows/l3_core_service/test_create_imported_l3_core_service.py +++ b/test/workflows/l3_core_service/test_create_imported_l3_core_service.py @@ -27,7 +27,7 @@ def test_create_imported_l3_core_service_success( { "edge_port": edge_port_subscription_factory(), "ap_type": "PRIMARY", - "gs_id": faker.geant_sid(), + "gs_id": faker.imported_gs_id(), "sbp_type": SBPType.L3, "is_tagged": faker.boolean(), "vlan_id": faker.vlan_id(), diff --git a/test/workflows/l3_core_service/test_modify_l3_core_service.py b/test/workflows/l3_core_service/test_modify_l3_core_service.py index 333fc67036b71120a7ec20cc551a7af096c09728..dc7f3a510f92ed1d6361f0c1799528dbbe63c523 100644 --- a/test/workflows/l3_core_service/test_modify_l3_core_service.py +++ b/test/workflows/l3_core_service/test_modify_l3_core_service.py @@ -84,7 +84,7 @@ def test_modify_l3_core_service_add_new_edge_port_success( {}, # The existing SBPs are unchanged {}, { # Adding configuration for the new SBP - "gs_id": faker.geant_sid(), + "gs_id": faker.gs_id(), "vlan_id": faker.vlan_id(), "ipv4_address": faker.ipv4(), "ipv6_address": faker.ipv6(), @@ -115,7 +115,7 @@ def test_modify_l3_core_service_add_new_edge_port_success( def sbp_input_form_data(faker): def _generate_form_data(): return { - "gs_id": faker.geant_sid(), + "gs_id": faker.gs_id(), "is_tagged": True, "vlan_id": faker.vlan_id(), "ipv4_address": faker.ipv4(),