Skip to content

Commit

Permalink
refactor: openshift-model-whereabouts generated from OpenAPI schemas
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <[email protected]>
  • Loading branch information
manusa committed Oct 3, 2024
1 parent caa39cc commit d732f7e
Show file tree
Hide file tree
Showing 18 changed files with 828 additions and 609 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ openapi-generate-java-classes:
cd kubernetes-model-generator/openshift-model-machineconfiguration && mvn -Pgenerate clean install
cd kubernetes-model-generator/openshift-model-monitoring && mvn -Pgenerate clean install
cd kubernetes-model-generator/openshift-model-tuned && mvn -Pgenerate clean install
cd kubernetes-model-generator/openshift-model-whereabouts && mvn -Pgenerate clean install

# Legacy generation of the model: TODO: remove
.PHONY: generate-model-legacy
Expand Down
1 change: 0 additions & 1 deletion kubernetes-model-generator/generateModel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ ABSOLUTE_BASEDIR=$(realpath "$BASEDIR")
declare -a modules=(
"openshift-model-hive"
"openshift-model-installer"
"openshift-model-whereabouts"
"openshift-model-storageversionmigrator"
"../extensions/knative/generator"
"../extensions/certmanager/generator-v1"
Expand Down
27 changes: 0 additions & 27 deletions kubernetes-model-generator/openshift-model-whereabouts/Makefile

This file was deleted.

This file was deleted.

46 changes: 19 additions & 27 deletions kubernetes-model-generator/openshift-model-whereabouts/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,41 +43,33 @@
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-core</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-common</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>openshift-model</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-artifacts</id>
<configuration>
<skipAttach>false</skipAttach>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>generate</id>
<build>
<plugins>
<plugin>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
<groupId>io.fabric8</groupId>
<artifactId>openapi-model-generator-maven-plugin</artifactId>
<configuration >
<settings combine.self="append">
<urls>
<url>https://raw.githubusercontent.com/k8snetworkplumbingwg/whereabouts/5bb9e1542cf987458db181bedee7c051a1538dc1/doc/crds/whereabouts.cni.cncf.io_ippools.yaml</url>
<url>https://raw.githubusercontent.com/k8snetworkplumbingwg/whereabouts/5bb9e1542cf987458db181bedee7c051a1538dc1/doc/crds/whereabouts.cni.cncf.io_nodeslicepools.yaml</url>
<url>https://raw.githubusercontent.com/k8snetworkplumbingwg/whereabouts/5bb9e1542cf987458db181bedee7c051a1538dc1/doc/crds/whereabouts.cni.cncf.io_overlappingrangeipreservations.yaml</url>
</urls>
<packageMappings combine.self="append">
<io.cncf.cni.whereabouts.ippools>io.fabric8.openshift.api.model.whereabouts</io.cncf.cni.whereabouts.ippools>
<io.cncf.cni.whereabouts.nodeslicepools>io.fabric8.openshift.api.model.whereabouts</io.cncf.cni.whereabouts.nodeslicepools>
<io.cncf.cni.whereabouts.overlappingrangeipreservations>io.fabric8.openshift.api.model.whereabouts</io.cncf.cni.whereabouts.overlappingrangeipreservations>
</packageMappings>
<includeGenerationRegexes>
<includeGenerationRegex>^io\.cncf\.cni\.whereabouts\..*$</includeGenerationRegex>
</includeGenerationRegexes>
</settings>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
Loading

0 comments on commit d732f7e

Please sign in to comment.