Package com.openshift.client

Examples of com.openshift.client.OpenShiftSSHKeyException


  public IOpenShiftSSHKey putSSHKey(String name, ISSHPublicKey key) throws OpenShiftException {
    Assert.notNull(name);
    Assert.notNull(key);

    if (hasSSHKeyName(name)) {
      throw new OpenShiftSSHKeyException(
          "Could not add new key {0} with the name {1}. There already is a key for this name, key names must be unique.",
          key.getPublicKey(), name);
    }
    if (hasSSHPublicKey(name)) {
      throw new OpenShiftSSHKeyException(
          "Could not add new key {0} with the name {1}. The key is already stored with a different name. Public key have to be unique.",
          key.getPublicKey(), name);
    }
    KeyResourceDTO keyDTO = new AddSShKeyRequest().execute(key.getKeyType(), name, key.getPublicKey());
    return put(keyDTO);
View Full Code Here


  public IOpenShiftSSHKey addSSHKey(String name, ISSHPublicKey key) throws OpenShiftException {
    Assert.notNull(name);
    Assert.notNull(key);

    if (hasSSHKeyName(name)) {
      throw new OpenShiftSSHKeyException(
          "Could not add new key {0} with the name {1}. There already is a key for this name, key names must be unique.",
          key.getPublicKey(), name);
    }
    if (hasSSHPublicKey(name)) {
      throw new OpenShiftSSHKeyException(
          "Could not add new key {0} with the name {1}. The key is already stored with a different name. Public key have to be unique.",
          key.getPublicKey(), name);
    }
    KeyResourceDTO keyDTO = new AddSShKeyRequest().execute(key.getKeyType(), name, key.getPublicKey());
    return put(keyDTO);
View Full Code Here

  public IOpenShiftSSHKey putSSHKey(String name, ISSHPublicKey key) throws OpenShiftException {
    Assert.notNull(name);
    Assert.notNull(key);

    if (hasSSHKeyName(name)) {
      throw new OpenShiftSSHKeyException(
          "Could not add new key {0} with the name {1}. There already is a key for this name, key names must be unique.",
          key.getPublicKey(), name);
    }
    if (hasSSHPublicKey(name)) {
      throw new OpenShiftSSHKeyException(
          "Could not add new key {0} with the name {1}. The key is already stored with a different name. Public key have to be unique.",
          key.getPublicKey(), name);
    }
    KeyResourceDTO keyDTO = new AddSShKeyRequest().execute(key.getKeyType(), name, key.getPublicKey());
    return put(keyDTO);
View Full Code Here

  public IOpenShiftSSHKey addSSHKey(String name, ISSHPublicKey key) throws OpenShiftException {
    Assert.notNull(name);
    Assert.notNull(key);

    if (hasSSHKeyName(name)) {
      throw new OpenShiftSSHKeyException(
          "Could not add new key {0} with the name {1}. There already is a key for this name, key names must be unique.",
          key.getPublicKey(), name);
    }
    if (hasSSHPublicKey(name)) {
      throw new OpenShiftSSHKeyException(
          "Could not add new key {0} with the name {1}. The key is already stored with a different name. Public key have to be unique.",
          key.getPublicKey(), name);
    }
    KeyResourceDTO keyDTO = new AddSShKeyRequest().execute(key.getKeyType(), name, key.getPublicKey());
    return put(keyDTO);
View Full Code Here

TOP

Related Classes of com.openshift.client.OpenShiftSSHKeyException

Copyright © 2018 www.massapicom. 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.