Thanks for the update, good to know there was a way to work around the
issue already available.


On Wed, May 7, 2014 at 5:14 AM, James Masson <[email protected]> wrote:

>
> Thanks for the hint. This is what worked for us...
>
>     nat = connection.servers.create(
>       :vpc_id               => vpc.id,
>       :image_id             => 'ami-ed352799',
>       :flavor_id            => 't1.micro',
>       :tags                 => {'Name' => 'NAT::'+vpc.id
> +'::'+sn_public.subnet_id},
>       :network_interfaces   => [{
>                                   'DeviceIndex'               => '0',
>                                   'PrivateIpAddress'          =>
> '10.250.0.5',
>                                   'AssociatePublicIpAddress'  => true,
>                                   'SubnetId'                  =>
> sn_public.subnet_id
>                                }])
>
>     nat.wait_for{ ready? }
>
>
> regards
>
> James M
>
>
> On Wednesday, May 7, 2014 8:14:27 AM UTC+1, Suresh Prajapati wrote:
>
>> Hi James,
>>
>> I think you need to specify the network interface as well.
>>
>>
>>    # * 'AssociatePublicIpAddress'<~String> - Indicates whether to assign
>> a public IP address to an instance in a VPC. The public IP address is
>> assigned to a specific network interface
>> From fog code
>>
>> https://github.com/fog/fog/blob/master/lib/fog/aws/requests/compute/run_
>> instances.rb#L44
>>
>> My notion is that , while creating the instance , it getting confused
>> where to assign which IP.
>>
>>
>>
>>
>> On Tue, May 6, 2014 at 9:41 PM, James Masson <[email protected]>wrote:
>>
>>>
>>> Hi,
>>>
>>> we're trying to use Fog to create a new instance in a VPC, with
>>> simultaneous non-EIP Public and specific Private IPs.
>>>
>>> Command is of the format:
>>>
>>>  connection.servers.create(
>>>   :vpc_id               => vpc.id,
>>>   :subnet_id            => sn_public.subnet_id,
>>>   :image_id             => 'ami-ed352799',
>>>   :flavor_id            => 't1.micro',
>>>   :private_ip_address   => '10.250.0.5',
>>>   :associate_public_ip  => true,
>>>   :tags                 => {'Name' => 'NAT::'+vpc.id+'::'+sn_public.
>>> subnet_id})
>>>
>>>
>>> this blows up with:
>>>
>>> Fog::Compute::AWS::Error: InvalidParameterCombination => Network
>>> interfaces and an instance-level private IP address may not be specified on
>>> the same request
>>> from /Users/.rbenv/versions/2.0.0-p451/gemsets/ccp-api/gems/
>>> excon-0.33.0/lib/excon/middlewares/expects.rb:6:in `response_call'
>>>
>>> Some googling brings me - https://github.com/aws/aws-cli/pull/502
>>>
>>> If I remove either the request for the specific private ip
>>> (private_ip_address) - or the request for a private IP
>>> (associate_public_ip) - the request succeeds.
>>>
>>> I'm thinking that my use case requires some network object syntax magic
>>> for this combination to work. Any ideas?
>>>
>>> thanks
>>>
>>> James M
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "ruby-fog" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Suresh Prajapati
>> Mob No: +91-9000173245
>> ------------------------------------------------------------
>> ----------------------------
>> Theory is when you know all and nothing works. Practice is when all works
>> and nobody knows why. In this case we have put together theory and
>> practice: nothing works... and nobody knows why!
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "ruby-fog" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to