1 /** 2 * 3 * Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com> 4 * 5 * ==================================================================== 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 * ==================================================================== 18 */ 19 package org.jclouds.compute.domain; 20 21 import java.util.Set; 22 23 import javax.annotation.Nullable; 24 25 import org.jclouds.compute.domain.internal.NodeMetadataImpl; 26 import org.jclouds.domain.Credentials; 27 28 import com.google.inject.ImplementedBy; 29 30 /** 31 * @author Adrian Cole 32 * @author Ivan Meredith 33 */ 34 @ImplementedBy(NodeMetadataImpl.class) 35 public interface NodeMetadata extends ComputeMetadata { 36 37 /** 38 * Tag used for all resources that belong to the same logical group. run, destroy commands are 39 * scoped to group. 40 * 41 * @return group for this node, or null, if not a part of a group 42 * 43 */ 44 String getGroup(); 45 46 /** 47 * @see #getGroup 48 */ 49 @Deprecated 50 String getTag(); 51 52 /** 53 * 54 * The hardware this node is running, if possible to determine. 55 */ 56 @Nullable 57 Hardware getHardware(); 58 59 /** 60 * 61 * The id of the image this node was created from, if possible to correlate. 62 */ 63 @Nullable 64 String getImageId(); 65 66 /** 67 * 68 * The operating system this node is running, if possible to determine. 69 */ 70 @Nullable 71 OperatingSystem getOperatingSystem(); 72 73 /** 74 * Current State of the node 75 */ 76 NodeState getState(); 77 78 /** 79 * @return the TCP port used for terminal connections. Generally, this is port 22 for ssh. 80 */ 81 int getLoginPort(); 82 83 /** 84 * secures access to root with a password. This password is required to access either the console 85 * or run sudo as root. 86 * <p/> 87 * ex. {@code echo 'password' |sudo -S command} 88 * 89 * @return root or console password, if configured, or null. 90 */ 91 @Nullable 92 String getAdminPassword(); 93 94 /** 95 * If possible, these are returned upon all detail requests. However, it is often the case that 96 * credentials are only available at "run" time. 97 */ 98 Credentials getCredentials(); 99 100 /** 101 * All public IP addresses, potentially including shared ips. 102 */ 103 Set<String> getPublicAddresses(); 104 105 /** 106 * All private IP addresses. 107 */ 108 Set<String> getPrivateAddresses(); 109 110 }