INNER CODE UNIT · Python

_get_vlan

faucetsdn/poseidon · lib/poseidon_cli/poseidon_cli/cli.py:47

    def _get_vlan(endpoint):
        vlan = str(endpoint.endpoint_data["vlan"])
        return vlan.split("VLAN")[1] if vlan.startswith("VLAN") else vlan

    @staticmethod
    def _get_acls(endpoint):
        return str(endpoint.acl_data)

    @staticmethod
    def _get_ipv4(endpoint):
        return str(endpoint.endpoint_data["ipv4"])

    @staticmethod
    def _get_ipv4_subnet(endpoint):
        if "ipv4_subnet" in endpoint.endpoint_data:
            return str(endpoint.endpoint_data["ipv4_subnet"])
        return NO_DATA

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…