Skip to content

Commit

Permalink
Merge pull request apache#7623 from petrovic-d/add-container-reposito…
Browse files Browse the repository at this point in the history
…ry-to-cloud-asset-view

Adding container repository from Cloud Assets View
  • Loading branch information
jhorvath authored Jul 31, 2024
2 parents c2fec53 + cfff4e9 commit 03aa32d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public Set<SuggestedItem> findSuggestions(Project[] projects) {
}
result.add(SuggestedItem.forPath("Cluster"));
result.add(SuggestedItem.forPath("ComputeInstance"));
result.add(SuggestedItem.forPath("ContainerRepository"));
return result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"SelectVault=Select OCI Vault",
"SelectBucket=Select Object Storage Bucket",
"SelectCluster=Select Oracle Container Engine for Kubernetes",
"SelectCompute=Select Compute Instance"
"SelectCompute=Select Compute Instance",
"SelectContainerRepository=Select Container Repository"
})
public final class SuggestedItem extends OCIItem {

Expand Down Expand Up @@ -66,6 +67,8 @@ public static SuggestedItem forPath(String path) {
return new SuggestedItem("Cluster", Bundle.SelectCluster(), Collections.singleton("ComputeInstance")); //NOI18N
case "ComputeInstance": //NOI18N
return new SuggestedItem("ComputeInstance", Bundle.SelectCompute(), Collections.singleton("Cluster")); //NOI18N
case "ContainerRepository": //NOI18N
return new SuggestedItem("ContainerRepository", Bundle.SelectContainerRepository(), Collections.singleton("ContainerRepository")); //NOI18N
default:
throw new IllegalArgumentException("");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import static org.junit.Assert.*;
import org.netbeans.modules.cloud.oracle.compute.ClusterItem;
import org.netbeans.modules.cloud.oracle.database.DatabaseItem;
import org.netbeans.modules.cloud.oracle.developer.ContainerRepositoryItem;
import org.netbeans.modules.cloud.oracle.items.OCID;

/**
Expand All @@ -37,6 +38,7 @@ public void testStoreLoad() throws URISyntaxException {
instance.loadAssets();
instance.addItem(new DatabaseItem(OCID.of("db-ocid", "Databases"), "db-comp-id", "DB1", "http://test", "DB1"));
instance.addItem(new ClusterItem(OCID.of("cluster-ocid", "Cluster"), "cluster-comp-id", "Cluster1"));
instance.addItem(new ContainerRepositoryItem(OCID.of("container-repo-ocid", "ContainerRepository"), "container-repo-comp-id", "Repo1", "reg", "namespace", true, 2));
instance.storeAssets();

CloudAssets instance1 = new CloudAssets();
Expand Down

0 comments on commit 03aa32d

Please sign in to comment.