Skip to content

How to attach container to an existing network using its id #4567

Answered by kiview
ratcashdev asked this question in Q&A
Discussion options

You must be logged in to vote

You can instantiate a new Network using the external id:

Network n = new Network() {
    @Override
    String getId() {
        return "existingId" // use id of external network
    }

    @Override
    void close() throws Exception {

    }

    @Override
    Statement apply(Statement base, Description description) {
        return null
    }
}

container.withNetwork(n)

Since this is a question rather than an issue, I converted it to a GH discussion.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ratcashdev
Comment options

@kiview
Comment options

@ratcashdev
Comment options

Answer selected by ratcashdev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #4566 on October 11, 2021 07:49.