Search in sources :

Example 1 with Createable

use of io.fabric8.kubernetes.client.dsl.Createable in project jointware by isdream.

the class KubernetesModelGenerator method doCreate.

@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
protected Object doCreate(Object client, String kind, Map<String, Map<String, Object>> params) throws Exception {
    Createable instance = (Createable) getKindModel(client, kind);
    Object param = generateParameters(params, kind);
    return instance.create(param);
}
Also used : Createable(io.fabric8.kubernetes.client.dsl.Createable)

Example 2 with Createable

use of io.fabric8.kubernetes.client.dsl.Createable in project jointware by isdream.

the class KubernetesExecutor method doCreate.

/**
 **********************************************************************************
 *
 ***********************************************************************************
 */
@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
protected Object doCreate(Object client, String kind, Map<String, Map<String, Object>> params) throws Exception {
    Createable instance = (Createable) getKindModel(client, kind);
    KubernetesModelGenerator generator = new KubernetesModelGenerator(getObjectRef());
    Object param = generator.toObject(params, kind);
    return instance.create(param);
}
Also used : Createable(io.fabric8.kubernetes.client.dsl.Createable) KubernetesModelGenerator(com.github.isdream.jointware.kubernetes.KubernetesModelGenerator)

Aggregations

Createable (io.fabric8.kubernetes.client.dsl.Createable)2 KubernetesModelGenerator (com.github.isdream.jointware.kubernetes.KubernetesModelGenerator)1