本文整理匯總了Java中com.woorea.openstack.heat.model.Stacks類的典型用法代碼示例。如果您正苦於以下問題:Java Stacks類的具體用法?Java Stacks怎麽用?Java Stacks使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Stacks類屬於com.woorea.openstack.heat.model包,在下文中一共展示了Stacks類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: stack
import com.woorea.openstack.heat.model.Stacks; //導入依賴的package包/類
public static void stack(String[] args) {
if(jopst.isDebug()) {
System.out.println("stack() called.");
}
String command = args[0];
if (command.equals("stack-list")) {
Keystone keystoneClient = new Keystone(jopst.getOsAuthUrl());
Access access = keystoneClient.tokens()
.authenticate(new UsernamePassword(jopst.getOsUsername(),
jopst.getOsPassword()))
.withTenantName(jopst.getOsTenantName())
.execute();
String heatEndpoint = KeystoneUtils
.findEndpointURL(access.getServiceCatalog(),
"orchestration", null, "public");
if (jopst.isDebug()) {
System.out.println("DEBUG: " + heatEndpoint);
}
Heat heatClient = new Heat(heatEndpoint);
heatClient.token(access.getToken().getId());
// heat stack-list
Stacks stacks = heatClient.stacks().list().execute();
util.printJson(stacks);
if (jopst.isDebug()) {
System.out.println(stacks);
}
}
}
示例2: List
import com.woorea.openstack.heat.model.Stacks; //導入依賴的package包/類
public List() {
super(client, HttpMethod.GET, "/stacks", null, Stacks.class);
}