use of com.yahoo.vespa.hosted.provision.Node in project vespa by vespa-engine.
the class RetireIPv4OnlyNodesTest method testMultipleIPv6Address.
@Test
public void testMultipleIPv6Address() {
Node node = createNodeWithAddresses("::1", "::2", "1234:5678:90ab::cdef");
assertFalse(policy.shouldRetire(node).isPresent());
}
use of com.yahoo.vespa.hosted.provision.Node in project vespa by vespa-engine.
the class RetireIPv4OnlyNodesTest method testSingleIPv6Address.
@Test
public void testSingleIPv6Address() {
Node node = createNodeWithAddresses("::1");
assertFalse(policy.shouldRetire(node).isPresent());
}
use of com.yahoo.vespa.hosted.provision.Node in project vespa by vespa-engine.
the class RetireIPv4OnlyNodesTest method testMultipleIPv4Address.
@Test
public void testMultipleIPv4Address() {
Node node = createNodeWithAddresses("127.0.0.1", "10.0.0.1", "192.168.0.1");
assertTrue(policy.shouldRetire(node).isPresent());
}
use of com.yahoo.vespa.hosted.provision.Node in project vespa by vespa-engine.
the class SerializationTest method want_to_deprovision_defaults_to_false.
@Test
public void want_to_deprovision_defaults_to_false() {
String nodeData = "{\n" + " \"type\" : \"tenant\",\n" + " \"flavor\" : \"large\",\n" + " \"openStackId\" : \"myId\",\n" + " \"hostname\" : \"myHostname\",\n" + " \"ipAddresses\" : [\"127.0.0.1\"]\n" + "}";
Node node = nodeSerializer.fromJson(State.provisioned, Utf8.toBytes(nodeData));
assertFalse(node.status().wantToDeprovision());
}
use of com.yahoo.vespa.hosted.provision.Node in project vespa by vespa-engine.
the class SerializationTest method testDefaultType.
@Test
public void testDefaultType() {
Node node = createNode().allocate(ApplicationId.from(TenantName.from("myTenant"), ApplicationName.from("myApplication"), InstanceName.from("myInstance")), ClusterMembership.from("content/myId/0/0", Vtag.currentVersion), clock.instant());
Node copy = nodeSerializer.fromJson(Node.State.provisioned, nodeSerializer.toJson(node));
assertEquals(NodeType.host, copy.type());
}
Aggregations