Package org.platformlayer.ops

Examples of org.platformlayer.ops.OpsException


          }
          return null;
        }
      });
    } catch (ExecutionException e) {
      throw new OpsException("Error while waiting for address", e);
    } catch (TimeoutException e) {
      throw new OpsException("Timeout while waiting for address", e);
    }
  }
View Full Code Here


        if (etcIssue.startsWith("Debian")) {
          addDefaultsDebian(target);
        } else if (etcIssue.startsWith("Ubuntu")) {
          addDefaultsUbuntu(target);
        } else {
          throw new OpsException("Unknown operating system: " + etcIssue);
        }
        built = true;
      }
      return super.getContentsBytes();
    }
View Full Code Here

      for (SchedulerRecord record : repository.findAll()) {
        // TODO: Tolerate exceptions?
        scheduleRecord(record, true);
      }
    } catch (RepositoryException e) {
      throw new OpsException("Error initializing scheduled tasks", e);
    }

    ready = true;
  }
View Full Code Here

    scheduleRecord(record, false);

    try {
      repository.put(record);
    } catch (RepositoryException e) {
      throw new OpsException("Error persisting record", e);
    }
  }
View Full Code Here

    JaxbHelper jaxb = JaxbHelper.get(BackupData.class);
    String xml;
    try {
      xml = jaxb.marshal(data, true);
    } catch (JAXBException e) {
      throw new OpsException("Error serializing metadata", e);
    }
    byte[] data = Utf8.getBytes(xml);

    try {
      getStorageClient().putObject(containerName, path, data);
    } catch (OpenstackException e) {
      throw new OpsException("Error uploading metadata", e);
    } catch (IOException e) {
      throw new OpsException("Error uploading metadata", e);
    }
  }
View Full Code Here

      properties.putAll(propertiesMap);

      String v = PropertyUtils.serialize(properties);
      return Utf8.getBytes(v);
    } catch (IOException e) {
      throw new OpsException("Error serializing properties", e);
    }
  }
View Full Code Here

      if (field.name == null) {
        field.name = field.getId();
      }

      if (field.name == null) {
        throw new OpsException("name is required");
      }

      if (field.type == null) {
        throw new OpsException("type is required");
      }
    }

    super.beforeCreateItem(item);
  }
View Full Code Here

    boolean namespaceAware = false;
    Document dom;
    try {
      dom = XmlHelper.parseXmlDocument(xml, namespaceAware);
    } catch (ParserConfigurationException e) {
      throw new OpsException("Error parsing XML output", e);
    } catch (SAXException e) {
      throw new OpsException("Error parsing XML output", e);
    } catch (IOException e) {
      throw new OpsException("Error parsing XML output", e);
    }
    return new SolrCoreStatus(dom);
  }
View Full Code Here

      instance.addChild(TemplatedFile.build(template, new File("/etc/postgresql/9.1/main/pg_hba.conf"),
          "9_1_pg_hba.conf"));
      instance.addChild(TemplatedFile.build(template, new File("/etc/postgresql/9.1/main/postgresql.conf"),
          "9_1_postgresql.conf"));
    } else {
      throw new OpsException("Unsupported postgres version: " + postgresVersion);
    }

    instance.addChild(PostgresqlServerBootstrap.build());

    instance.addChild(MetricsInstance.class);
View Full Code Here

    Date startedAt = new Date();
    String executionId;
    try {
      executionId = jobRepository.insertExecution(jobData.key, startedAt);
    } catch (RepositoryException e) {
      throw new OpsException("Error inserting job execution into repository", e);
    }

    JobExecutionData execution = new JobExecutionData();
    execution.job = jobData;
    execution.jobKey = jobData.getJobKey();
View Full Code Here

TOP

Related Classes of org.platformlayer.ops.OpsException

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.