def __init__(self, required=None, optional=None, policy_url=None,
                 sreg_ns_uri=ns_uri):
        Extension.__init__(self)
        self.required = []
        self.optional = []
        self.policy_url = policy_url
        self.ns_uri = sreg_ns_uri

        if required:
            self.requestFields(required, required=True, strict=True)

        if optional:
            self.requestFields(optional, required=False, strict=True)

    # Assign getSRegNS to a static method so that it can be
    # overridden for testing.
Ports are created for each node automatically while adding links.
dataset/ETHPy150Open CollabQ/CollabQ/openid/extensions/sreg.py/SRegRequest.__init__--crossover with--dataset/ETHPy150Open HPENetworking/topology_docker/lib/topology_docker/platform.py/DockerPlatform.post_build