Filters the List of Deployments and returns the ones that are DEFAULT deployments.

@param deployments
List to filter

@return Filtered list
340366
private List<Deployment> defaultDeployments(List<Deployment> deployments) {
        List<Deployment> defaults = new ArrayList<Deployment>();
        for (Deployment deployment : deployments) {
            if (deployment.getDescription().getName().equals(DeploymentTargetDescription.DEFAULT.getName())) {
                defaults.add(deployment);
            }
        }
        return defaults;
    }
1034195
public DeploymentService delete(long applicationId, long deploymentId)
    {
        HTTP.DELETE(String.format("/v2/applications/%d/deployments/%d.json", applicationId, deploymentId));       
        return this;
    }
1139791
func (j *Jobs) Deployments(jobID string, q *QueryOptions) ([]*Deployment, *QueryMeta, error) {
	var resp []*Deployment
	qm, err := j.client.query("/v1/job/"+jobID+"/deployments", &resp, q)
	if err != nil {
		return nil, nil, err
	}
	sort.Sort(DeploymentIndexSort(resp))
	return resp, qm, nil
}
1082723
def deployment_groups(self):
        
        if not self.__deployment_groups:
            self.__deployment_groups = DeploymentGroups(self.__connection)
        return self.__deployment_groups
757900
def os_deployment_servers(self):
        
        if not self.__os_deployment_servers:
            self.__os_deployment_servers = OsDeploymentServers(self.__connection)
        return self.__os_deployment_servers
1176552
public List<CmsProject> filterProjectsForSelector(List<CmsProject> projects) {

        List<CmsProject> result = new ArrayList<CmsProject>();
        for (CmsProject project : projects) {
            if (!project.isHiddenFromSelector()) {
                result.add(project);
            }
        }
        return result;
    }
876635
public List<T> filter(List<T> results) {
        if (filters.isEmpty() || results == null) {
            return results;
        }
        
        List<T> include = new ArrayList<>();
        
        for (T result : results) {
            if (include(result)) {
                include.add(result);
            }
        }
        
        return results.size() == include.size() ? results : include;
    }
711719
public java.util.List<String> getDeploymentConfigsList() {
        if (deploymentConfigsList == null) {
            deploymentConfigsList = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return deploymentConfigsList;
    }
111953
public static String getDeployment(DeploymentType deployment, boolean indent) throws IOException {
        try {
            if (m_jc == null || m_schema == null) {
                throw new RuntimeException("Error schema validation.");
            }
            Marshaller marshaller = m_jc.createMarshaller();
            marshaller.setSchema(m_schema);
            marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.valueOf(indent));
            StringWriter sw = new StringWriter();
            marshaller.marshal(new JAXBElement<>(new QName("","deployment"), DeploymentType.class, deployment), sw);
            return sw.toString();
        } catch (JAXBException e) {
            // Convert some linked exceptions to more friendly errors.
            if (e.getLinkedException() instanceof java.io.FileNotFoundException) {
                hostLog.error(e.getLinkedException().getMessage());
                return null;
            } else if (e.getLinkedException() instanceof org.xml.sax.SAXParseException) {
                hostLog.error("Error schema validating deployment.xml file. " + e.getLinkedException().getMessage());
                return null;
            } else {
                throw new RuntimeException(e);
            }
        }
    }
768829
func (s *deploymentLister) Deployments(namespace string) DeploymentNamespaceLister {
	return deploymentNamespaceLister{indexer: s.indexer, namespace: namespace}
}
283239
public Container deploy() throws DeploymentException {
        Archive deployment = createDefaultDeployment();
        if (deployment == null) {
            throw new DeploymentException("Unable to create default deployment");
        } else {
            return deploy(deployment);
        }
    }
1331244
private Collection<FrameworkMethod> filterAndSort(List<FrameworkMethod> fms, boolean isStatic) throws Exception
   {
      SortedMap<Integer, FrameworkMethod> m = new TreeMap<>();

      for (FrameworkMethod fm : fms)
      {
         SecurityActions.setAccessible(fm.getMethod());

         if (Modifier.isStatic(fm.getMethod().getModifiers()) == isStatic)
         {
            Deployment deployment = (Deployment)fm.getAnnotation(Deployment.class);
            int order = deployment.order();

            if (order <= 0 || m.containsKey(Integer.valueOf(order)))
               throw new Exception("Incorrect order definition '" + order + "' on " +
                                   fm.getDeclaringClass().getName() + "#" + fm.getName());
            
            m.put(Integer.valueOf(order), fm);
         }
      }

      return m.values();
   }
1034969
private List<Deployment> archiveDeployments(List<Deployment> deployments) {
        List<Deployment> archives = new ArrayList<Deployment>();
        for (Deployment deployment : deployments) {
            if (deployment.getDescription().isArchiveDeployment()) {
                archives.add(deployment);
            }
        }
        return archives;
    }
213958
public static List<InetSocketAddress> getAddresses(Configuration conf,
      Collection<String> serviceIds, String defaultAddress, String... keys) {
    Collection<String> nameserviceIds = getNameServiceIds(conf);
    List<InetSocketAddress> isas = new ArrayList<InetSocketAddress>();

    // Configuration with a single namenode
    if (nameserviceIds == null || nameserviceIds.isEmpty()) {
      String address = getConfValue(defaultAddress, null, conf, keys);
      if (address == null) {
        return null;
      }
      isas.add(NetUtils.createSocketAddr(address));
    } else {
      // Get the namenodes for all the configured nameServiceIds
      for (String nameserviceId : nameserviceIds) {
        String address = getConfValue(null, nameserviceId, conf, keys);
        if (address == null) {
          return null;
        }
        isas.add(NetUtils.createSocketAddr(address));
      }
    }
    return isas;
  }
1023680
public void setDeploymentGroupNames(java.util.Collection<String> deploymentGroupNames) {
        if (deploymentGroupNames == null) {
            this.deploymentGroupNames = null;
            return;
        }

        this.deploymentGroupNames = new com.amazonaws.internal.SdkInternalList<String>(deploymentGroupNames);
    }
239317
public static DeploymentEntry enrich(DeploymentEntry deployment, Map<String, String> prefixedProperties) {
		final Map<String, String> enrichedProperties = new HashMap<>(deployment.asMap());

		prefixedProperties.forEach((k, v) -> {
			final String normalizedKey = k.toLowerCase();
			if (k.startsWith(DEPLOYMENT_ENTRY + '.')) {
				enrichedProperties.put(normalizedKey.substring(DEPLOYMENT_ENTRY.length() + 1), v);
			}
		});

		final DescriptorProperties properties = new DescriptorProperties(true);
		properties.putProperties(enrichedProperties);

		return new DeploymentEntry(properties);
	}
667652
def reverse_deployments(deployments=None):
        """"""
        if deployments is None:
            deployments = []

        reversed_deployments = []
        for i in deployments[::-1]:
            deployment = copy.deepcopy(i)
            for config in ['modules', 'regions']:
                if deployment.get(config):
                    deployment[config] = deployment[config][::-1]
            reversed_deployments.append(deployment)
        return reversed_deployments