package com.woorea.openstack.nova;


import com.woorea.openstack.base.client.OpenStackClient;
import com.woorea.openstack.base.client.OpenStackClientConnector;
import com.woorea.openstack.nova.api.ExtensionsResource;
import com.woorea.openstack.nova.api.FlavorsResource;
import com.woorea.openstack.nova.api.ImagesResource;
import com.woorea.openstack.nova.api.QuotaSetsResource;
import com.woorea.openstack.nova.api.ServersResource;
import com.woorea.openstack.nova.api.extensions.AggregatesExtension;
import com.woorea.openstack.nova.api.extensions.FloatingIpsExtension;
import com.woorea.openstack.nova.api.extensions.KeyPairsExtension;
import com.woorea.openstack.nova.api.extensions.SecurityGroupsExtension;
import com.woorea.openstack.nova.api.extensions.SnapshotsExtension;
import com.woorea.openstack.nova.api.extensions.VolumesExtension;

public class Nova extends OpenStackClient {
	
	private final ExtensionsResource EXTENSIONS;
	
	private final ServersResource SERVERS;
	
	private final ImagesResource IMAGES;
	
	private final FlavorsResource FLAVORS;
	
	private final KeyPairsExtension KEY_PAIRS;
	
	private final FloatingIpsExtension FLOATING_IPS;
	
	private final SecurityGroupsExtension SECURITY_GROUPS;
	
	private final SnapshotsExtension SNAPSHOTS;
	
	private final VolumesExtension VOLUMES;
	
	private final AggregatesExtension AGGREGATES;

	private final QuotaSetsResource QUOTA_SETS;
	
	public Nova(String endpoint, OpenStackClientConnector connector) {
		super(endpoint, connector);
		EXTENSIONS = new ExtensionsResource(this);
		SERVERS = new ServersResource(this);
		IMAGES = new ImagesResource(this);
		FLAVORS = new FlavorsResource(this);
		KEY_PAIRS = new KeyPairsExtension(this);
		FLOATING_IPS = new FloatingIpsExtension(this);
		SECURITY_GROUPS = new SecurityGroupsExtension(this);
		SNAPSHOTS = new SnapshotsExtension(this);
		VOLUMES = new VolumesExtension(this);
		AGGREGATES = new AggregatesExtension(this);
		QUOTA_SETS = new QuotaSetsResource(this);
	}
	
	public Nova(String endpoint) {
		this(endpoint, null);
	}
	
	public ExtensionsResource extensions() {
		return EXTENSIONS;
	}
	
	public ServersResource servers() {
		return SERVERS;
	}
	
	public ImagesResource images() {
		return IMAGES;
	}
	
	public FlavorsResource flavors() {
		return FLAVORS;
	}
	
	public KeyPairsExtension keyPairs() {
		return KEY_PAIRS;
	}
	
	public FloatingIpsExtension floatingIps() {
		return FLOATING_IPS;
	}
	
	public SecurityGroupsExtension securityGroups() {
		return SECURITY_GROUPS;
	}
	
	public SnapshotsExtension snapshots() {
		return SNAPSHOTS;
	}
	
	public VolumesExtension volumes() {
		return VOLUMES;
	}

	public AggregatesExtension aggregates() {
		return AGGREGATES;
	}

	public QuotaSetsResource quotaSets() {
		return QUOTA_SETS;
	}
}

@@ -839,16 +839,80 @@
 tension;
+%0Aimport com.woorea.openstack.nova.api.extensions.HostsExtension;
 %0A%0Apublic
@@ -1464,16 +1464,54 @@
 SETS;%0A%09%0A
+%09private final HostsExtension HOSTS;%0A%0A
 %09public 
@@ -2081,16 +2081,52 @@
 (this);%0A
+%09%09HOSTS = new HostsExtension(this);%0A
 %09%7D%0A%09%0A%09pu
@@ -2898,13 +2898,67 @@
 A_SETS;%0A
-
 %09%7D%0A
+%0A%09public HostsExtension hosts() %7B%0A%09%09return HOSTS;%0A%09%7D%0A%0A
 %7D%0A

Add HostsExtension to class Nova(OpenStackClient), and enable "/os-hosts" operations.