Skip to content

Commit

Permalink
mgmt, bug fix, container group without ports (#24418)
Browse files Browse the repository at this point in the history
  • Loading branch information
weidongxu-microsoft authored Sep 29, 2021
1 parent 95c0df8 commit 7441a50
Show file tree
Hide file tree
Showing 3 changed files with 294 additions and 295 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -459,10 +459,9 @@ public ContainerGroupImpl withExistingNetworkProfile(
@Override
public ContainerGroupImpl withExistingNetworkProfile(String networkProfileId) {
this.innerModel().withNetworkProfile(new ContainerGroupNetworkProfile().withId(networkProfileId));
if (this.innerModel().ipAddress() == null) {
this.innerModel().withIpAddress(new IpAddress());
if (this.innerModel().ipAddress() != null) {
this.innerModel().ipAddress().withType(ContainerGroupIpAddressType.PRIVATE);
}
this.innerModel().ipAddress().withType(ContainerGroupIpAddressType.PRIVATE);
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void testContainerGroupWithVirtualNetwork() {
.withLinux()
.withPublicImageRegistryOnly()
.withoutVolume()
.withContainerInstance("nginx", 80)
.withContainerInstance("nginx")
.withExistingNetworkProfile(containerGroup1.networkProfileId())
.create();

Expand Down
Loading

0 comments on commit 7441a50

Please sign in to comment.