use of io.fabric8.maven.generator.api.Generator in project jointware by isdream.
the class NamespaceTest method testCreateNamespace.
public void testCreateNamespace() throws Exception {
DefaultKubernetesClient client = new DefaultKubernetesClient("http://118.190.46.58:9888");
KubernetesModelGenerator generator = new KubernetesModelGenerator();
generator.create(client, "Namespace", params);
}
use of io.fabric8.maven.generator.api.Generator in project jointware by isdream.
the class NamespaceTest method testDeleteNamespace.
public void testDeleteNamespace() throws Exception {
DefaultKubernetesClient client = new DefaultKubernetesClient("http://118.190.46.58:9888");
KubernetesModelGenerator generator = new KubernetesModelGenerator();
generator.delete(client, "Namespace", "test431");
}
use of io.fabric8.maven.generator.api.Generator in project jointware by isdream.
the class DeploymentTest method testUpdateDeployment.
// public void testCreateDeployment() throws Exception {
// DefaultKubernetesClient client = new DefaultKubernetesClient("http://118.190.46.58:9888");
// KubernetesModelParametersGenerator generator = new KubernetesModelParametersGenerator();
// generator.create(client, KubernetesConstants.KIND_DEPLOYMENT, params);
//
// }
public void testUpdateDeployment() throws Exception {
DefaultKubernetesClient client = new DefaultKubernetesClient("http://118.190.46.58:9888");
KubernetesModelGenerator generator = new KubernetesModelGenerator();
generator.scaleTo(client, "Deployment", "default", "busybox-dm", 4);
}
use of io.fabric8.maven.generator.api.Generator in project jointware by isdream.
the class DeploymentTest method testDeleteDeployment.
public void testDeleteDeployment() throws Exception {
DefaultKubernetesClient client = new DefaultKubernetesClient("http://118.190.46.58:9888");
KubernetesModelGenerator generator = new KubernetesModelGenerator();
generator.delete(client, "Deployment", "default", "busybox-dm");
}
use of io.fabric8.maven.generator.api.Generator in project jointware by isdream.
the class KubernetesExecutor method doCreateOrReplace.
@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
protected Object doCreateOrReplace(Object client, String kind, Map<String, Map<String, Object>> params) throws Exception {
CreateOrReplaceable instance = (CreateOrReplaceable) getKindModel(client, kind);
KubernetesModelGenerator generator = new KubernetesModelGenerator(getObjectRef());
Object param = generator.toObject(params, kind);
return instance.createOrReplace(param);
}
Aggregations