2

Is there a way to assign multiple IPs from a subnet to a server using heat templates? I defined a resource for a port using fixed IPs, like below. I then used this resource to create a port on a OS::Nova::Server. But I see only one IP from the subnet assigned. Is there a way to assign to IPs from the subnet?

resources: a_port: type: OS::Neutron::Port properties: network: "a_network" fixed_ips: [ { "subnet_id" : "a_subnet_id", "subnet_id" : "a_subnet_id" } ]

skp
  • 23
  • 4

1 Answers1

1

Running on our system, I was able to use something like this to get a couple of IP addresses:

resources: a_port: type: OS::Neutron::Port properties: network_id: "a_network" fixed_ips: - subnet_id: a_subnet_id - subnet_id: a_subnet_id

I think the problem you've got is both your subnet_id definitions are within the same map? (NB, there seems to have been some property name changes to drop _id in later releases.)

boyvinall
  • 1,807
  • 11
  • 8
  • yes,, you are right. both subnet_id were the same map. I had a feeling this would not work, but I was trying it out. Our software requires 2 ips on that interface and the network i had access to did not have two subnets defined on it. But anyways, i paln to do this another way now. Thanx for your reply. – skp Aug 07 '15 at 21:47
  • cool, no probs. could you accept the answer if it's good for you? cheers, Matt – boyvinall Aug 10 '15 at 09:22