@Consumes(APPLICATION_JSON) public Firewall expected(String base_url) { return Firewall.create( // "12862241031274216284", // id URI.create(base_url + "/party/global/firewalls/jclouds-test"), // selfLink parse("2012-04-13T03:05:02.855"), // creationTimestamp "jclouds-test", // name "Internal traffic from default allowed", // description URI.create(base_url + "/party/global/networks/jclouds-test"), // network ImmutableList.of("10.0.0.0/8"), // sourceRanges null, // sourceTags null, // targetTags ImmutableList.of( // allowed Rule.create("tcp", ImmutableList.of("1-65535")), // Rule.create("udp", ImmutableList.of("1-65535")), // Rule.create("icmp", null) // )); } }
@Consumes(APPLICATION_JSON) public ListPage<Firewall> expected(String baseUrl) { Firewall firewall1 = new ParseFirewallTest().expected(baseUrl); Firewall firewall2 = Firewall.create( // "12862241067393040785", // id URI.create(baseUrl + "/google/global/firewalls/default-ssh"), // selfLink parse("2012-04-13T03:05:04.365"), // creationTimestamp "default-ssh", // name "SSH allowed from anywhere", // description URI.create(baseUrl + "/google/global/networks/default"), // network ImmutableList.of("0.0.0.0/0"), // sourceRanges null, // sourceTags null, // targetTags ImmutableList.of(Firewall.Rule.create("tcp", ImmutableList.of("22"))) // allowed ); return ForwardingListPage.create( // ImmutableList.of(firewall1, firewall2), // items null // nextPageToken ); } }