当前位置: 首页>>代码示例>>Java>>正文


Java DeploymentList类代码示例

本文整理汇总了Java中io.fabric8.kubernetes.api.model.extensions.DeploymentList的典型用法代码示例。如果您正苦于以下问题:Java DeploymentList类的具体用法?Java DeploymentList怎么用?Java DeploymentList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DeploymentList类属于io.fabric8.kubernetes.api.model.extensions包,在下文中一共展示了DeploymentList类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onRequest

import io.fabric8.kubernetes.api.model.extensions.DeploymentList; //导入依赖的package包/类
@Override
public SpeechletResponse onRequest(IntentRequest request, Session session) throws SpeechletException {
    IntentContext<BaseOperation<Deployment, DeploymentList, ?, ?>> ctx = createContext(request.getIntent(), session);
    String namespace = ctx.getVariable(Variable.Namespace, getKubernetesClient().getNamespace());
    LOGGER.info("Listing all deployments for namespace:" + namespace);

    try {
        List<String> deployments = list(ctx)
                .getItems()
                .stream()
                .map(d -> d.getMetadata().getName()).collect(Collectors.toList());

        if (deployments.isEmpty()) {
            return newResponse("No deployments found.");
        } else {
            return newResponse("The available deployments are: " + join(deployments, ","));
        }
    } catch (KubernetesClientException e) {
        return newFailureNotice(e.getStatus().getMessage());
    }
}
 
开发者ID:fabric8io,项目名称:kubernetes-alexa,代码行数:22,代码来源:GetDeployments.java

示例2: newOperation

import io.fabric8.kubernetes.api.model.extensions.DeploymentList; //导入依赖的package包/类
@Override
public BaseOperation<Deployment, DeploymentList, ?, ?> newOperation() {
    return (BaseOperation<Deployment, DeploymentList, ?, ?>) getKubernetesClient().extensions().deployments();
}
 
开发者ID:fabric8io,项目名称:kubernetes-alexa,代码行数:5,代码来源:GetDeployments.java

示例3: retrieveDeployments

import io.fabric8.kubernetes.api.model.extensions.DeploymentList; //导入依赖的package包/类
public static DeploymentList retrieveDeployments(KubernetesClient kubernetesClient, KubernetesResource resource) {
    return kubernetesClient.extensions().deployments().inNamespace(resource.getNamespace()).list();
}
 
开发者ID:qaware,项目名称:gradle-cloud-deployer,代码行数:4,代码来源:KubernetesClientUtil.java


注:本文中的io.fabric8.kubernetes.api.model.extensions.DeploymentList类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。