Package org.apache.ambari.server.state

Examples of org.apache.ambari.server.state.ServiceOsSpecific.addPackages()


                                                        String osFamily) {
    ServiceOsSpecific hostOs = new ServiceOsSpecific(osFamily);
    List<ServiceOsSpecific> foundedOSSpecifics = getOSSpecificsByFamily(serviceInfo.getOsSpecifics(), osFamily);
    if (!foundedOSSpecifics.isEmpty()) {
      for (ServiceOsSpecific osSpecific : foundedOSSpecifics) {
        hostOs.addPackages(osSpecific.getPackages());
      }
      // Choose repo that is relevant for host
      ServiceOsSpecific.Repo serviceRepo = hostOs.getRepo();
      if (serviceRepo != null) {
        String serviceRepoInfo = gson.toJson(serviceRepo);
View Full Code Here


    List<ServiceOsSpecific.Package> packageList2 = new ArrayList<ServiceOsSpecific.Package>();
    packageList2.add(package2);
    packageList2.add(package3);

    ServiceOsSpecific osSpecific1 = new ServiceOsSpecific("testOSFamily");
    osSpecific1.addPackages(packageList1);
    ServiceOsSpecific osSpecific2 = new ServiceOsSpecific("testOSFamily1,testOSFamily,testOSFamily2");
    osSpecific2.addPackages(packageList2);

    osSpecifics.put("testOSFamily", osSpecific1);
    osSpecifics.put("testOSFamily1,testOSFamily,testOSFamily2", osSpecific2);
View Full Code Here

    packageList2.add(package3);

    ServiceOsSpecific osSpecific1 = new ServiceOsSpecific("testOSFamily");
    osSpecific1.addPackages(packageList1);
    ServiceOsSpecific osSpecific2 = new ServiceOsSpecific("testOSFamily1,testOSFamily,testOSFamily2");
    osSpecific2.addPackages(packageList2);

    osSpecifics.put("testOSFamily", osSpecific1);
    osSpecifics.put("testOSFamily1,testOSFamily,testOSFamily2", osSpecific2);

    expect(serviceInfo.getOsSpecifics()).andReturn(osSpecifics);
View Full Code Here

    }
    ServiceOsSpecific hostOs = new ServiceOsSpecific(osFamily);
    List<ServiceOsSpecific> foundedOSSpecifics = getOSSpecificsByFamily(serviceInfo.getOsSpecifics(), osFamily);
    if (!foundedOSSpecifics.isEmpty()) {
      for (ServiceOsSpecific osSpecific : foundedOSSpecifics) {
        hostOs.addPackages(osSpecific.getPackages());
      }
      serviceInfo.getOsSpecifics().get(osFamily);
      // Choose repo that is relevant for host
      ServiceOsSpecific.Repo serviceRepo = hostOs.getRepo();
      if (serviceRepo != null) {
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.