protected Object doExecute()

in commands/src/main/java/org/jclouds/karaf/commands/compute/ComputeServiceCreateCommand.java [46:70]


   protected Object doExecute() throws Exception {
      if (provider == null && api == null) {
         System.err.println("You need to specify at least a valid provider or api.");
         return null;
      }

      if (name == null && provider != null) {
         name = provider;
      } else if (name == null && api != null) {
         name = api;
      }

      Map<String, String> props = parseOptions(options);
      registerComputeService(configAdmin, name, provider, api, identity, credential, endpoint, props);
      if (noWait) {
         return null;
      } else if (!isProviderOrApiInstalled(provider, api)) {
         System.out.println("Provider / api currently not installed. Service will be created once it does get installed.");
         return null;
      } else {
         System.out.println(String.format("Waiting for compute service with name: %s.", name));
         waitForComputeService(bundleContext, name, provider, api);
      }
      return null;
   }