Examples of shouldAuthenticateSudo()


Examples of org.jclouds.domain.LoginCredentials.shouldAuthenticateSudo()

            JsonLoginCredentials val = new JsonLoginCredentials();
            val.user = login.getUser();
            val.password = login.getOptionalPassword().orNull();
            val.privateKey = login.getOptionalPrivateKey().orNull();
            if (login.shouldAuthenticateSudo())
               val.authenticateSudo = login.shouldAuthenticateSudo();
            return ByteSource.wrap(json.toJson(val).getBytes(Charsets.UTF_8));
         }
         return ByteSource.wrap(json.toJson(from).getBytes(Charsets.UTF_8));
      }
   }
View Full Code Here

Examples of org.jclouds.domain.LoginCredentials.shouldAuthenticateSudo()

            builder.user(credsFromParameters.getUser());
         if (credsFromParameters.getPassword() != null)
            builder.password(credsFromParameters.getPassword());
         if (credsFromParameters.getPrivateKey() != null)
            builder.privateKey(credsFromParameters.getPrivateKey());
         if (credsFromParameters.shouldAuthenticateSudo())
            builder.authenticateSudo(true);
         creds = builder.build();
      }
      return creds;
   }
View Full Code Here

Examples of org.jclouds.domain.LoginCredentials.shouldAuthenticateSudo()

            LoginCredentials login = LoginCredentials.class.cast(from);
            JsonLoginCredentials val = new JsonLoginCredentials();
            val.user = login.getUser();
            val.password = login.getPassword();
            val.privateKey = login.getPrivateKey();
            if (login.shouldAuthenticateSudo())
               val.authenticateSudo = login.shouldAuthenticateSudo();
            return Strings2.toInputStream(json.toJson(val));
         }
         return Strings2.toInputStream(json.toJson(from));
      }
View Full Code Here

Examples of org.jclouds.domain.LoginCredentials.shouldAuthenticateSudo()

            JsonLoginCredentials val = new JsonLoginCredentials();
            val.user = login.getUser();
            val.password = login.getPassword();
            val.privateKey = login.getPrivateKey();
            if (login.shouldAuthenticateSudo())
               val.authenticateSudo = login.shouldAuthenticateSudo();
            return Strings2.toInputStream(json.toJson(val));
         }
         return Strings2.toInputStream(json.toJson(from));
      }
   }
View Full Code Here

Examples of org.jclouds.domain.LoginCredentials.shouldAuthenticateSudo()

            out.value(login.getUser());
            out.name("password");
            out.value(login.getOptionalPassword().orNull());
            out.name("privateKey");
            out.value(login.getOptionalPrivateKey().orNull());
            if (login.shouldAuthenticateSudo()) {
               out.name("authenticateSudo");
               out.value(login.shouldAuthenticateSudo());
            }
         } else {
            out.name("identity");
View Full Code Here

Examples of org.jclouds.domain.LoginCredentials.shouldAuthenticateSudo()

            out.value(login.getOptionalPassword().orNull());
            out.name("privateKey");
            out.value(login.getOptionalPrivateKey().orNull());
            if (login.shouldAuthenticateSudo()) {
               out.name("authenticateSudo");
               out.value(login.shouldAuthenticateSudo());
            }
         } else {
            out.name("identity");
            out.value(credentials.identity);
            out.name("credential");
View Full Code Here

Examples of org.jclouds.domain.LoginCredentials.shouldAuthenticateSudo()

      assertEquals(deserializedCreds.identity, creds.identity);
      assertEquals(deserializedCreds.credential, creds.credential);
      assertEquals(deserializedCreds.getUser(), creds.getUser());
      assertEquals(deserializedCreds.getOptionalPassword(), creds.getOptionalPassword());
      assertEquals(deserializedCreds.getOptionalPrivateKey(), creds.getOptionalPrivateKey());
      assertEquals(deserializedCreds.shouldAuthenticateSudo(), creds.shouldAuthenticateSudo());
   }
  
   protected Map<String, Credentials> getStore(Injector injector) {
      return injector.getInstance(Key.get(new TypeLiteral<Map<String, Credentials>>() {
      }));
View Full Code Here

Examples of org.jclouds.domain.LoginCredentials.shouldAuthenticateSudo()

            builder.user(credsFromParameters.getUser());
         if (credsFromParameters.getOptionalPassword().isPresent())
            builder.password(credsFromParameters.getOptionalPassword().get());
         if (credsFromParameters.getOptionalPrivateKey().isPresent())
            builder.privateKey(credsFromParameters.getOptionalPrivateKey().get());
         if (credsFromParameters.shouldAuthenticateSudo())
            builder.authenticateSudo(true);
         creds = builder.build();
      }
      return creds;
   }
View Full Code Here

Examples of org.jclouds.ec2.compute.options.EC2TemplateOptions.shouldAuthenticateSudo()

      // setup expectations
      expect(options.getKeyPair()).andReturn(userSuppliedKeyPair);
      expect(options.getLoginUser()).andReturn(null);
      expect(options.getLoginPassword()).andReturn(null);
      expect(options.getLoginPrivateKey()).andReturn(null);
      expect(options.shouldAuthenticateSudo()).andReturn(null);
      expect(options.getRunScript()).andReturn(Statements.exec("echo foo"));

      expect(strategy.credentialsMap.containsKey(new RegionAndName(region, userSuppliedKeyPair))).andReturn(false);

      // replay mocks
View Full Code Here

Examples of org.jclouds.ec2.compute.options.EC2TemplateOptions.shouldAuthenticateSudo()

      // setup expectations
      expect(options.getKeyPair()).andReturn(userSuppliedKeyPair);
      expect(options.getLoginUser()).andReturn(null);
      expect(options.getLoginPassword()).andReturn(null);
      expect(options.getLoginPrivateKey()).andReturn(null);
      expect(options.shouldAuthenticateSudo()).andReturn(null);
      expect(options.getRunScript()).andReturn(Statements.exec("echo foo"));

      expect(strategy.credentialsMap.containsKey(new RegionAndName(region, userSuppliedKeyPair))).andReturn(false);

      // replay mocks
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.