NovaFirewallSupport novafw = new NovaFirewallSupport();
novafw.activateComponent();
firewallManagerFactory.bindFirewallSupport(novafw);
// create and activate provider
JcloudsContainerProvider provider = new JcloudsContainerProvider();
provider.activateComponent();
provider.bindFirewallManagerFactory(firewallManagerFactory);
// get and set the provider name
String providerName = args.getProviderName();
args = args.contextName(providerName);
// create and set the compute service
ComputeService computeClient = CloudDetails.createComputeService(getSelectedCloud());
args = args.computeService(computeClient);
FabricPlugin.getLogger().debug("Creating Jclouds provider type: " + providerName);
// we need to set the fabric user , pw and role in that way, otherwise the user is not created
CreateJCloudsContainerOptions opts = args.withUser(args.getUser(), args.getPassword(), "admin").build();
FabricPlugin.getLogger().debug("Compute Service: " + opts.getComputeService());
// finally create the image
final CreateJCloudsContainerMetadata metadata = provider.create(opts, new CreationStateListener() {
@Override
public void onStateChange(String message) {
monitor.subTask(message);
}
});