glennmatthews / cot

Common OVF Tool
MIT License
92 stars 23 forks source link

any CONFIG_FILE format example ? #75

Closed frbayart closed 6 years ago

frbayart commented 6 years ago

Hi,

I would like to edit my OVF with COT, I have multiple properties to edit and I would like to use --config-file but I don't find the file format, someone have an example ?

And someone know if is it possible to use "edit-properties" and "edit-product" at the sametime (no 2 commands lines) ?

glennmatthews commented 6 years ago

The --config-file option is intended for platforms that allow the use of OVF properties to specify lines of configuration CLI - IIRC Cisco CSR 1000V is the platform this feature was added for and the only platform that currently supports this functionality. The config file is simply a plaintext file containing the desired CLI, a la:

interface GigabitEthernet1
 ip address 10.1.1.1 255.255.255.0
 no shutdown

which then gets translated into OVF properties:

<ovf:Property ovf:key="ios-config-0001" ovf:type="string" ovf:userConfigurable="true" ovf:value="interface GigabitEthernet1"/>
<ovf:Property ovf:key="ios-config-0002" ovf:type="string" ovf:userConfigurable="true" ovf:value=" ip address 10.1.1.1 255.255.255.0"/>
<ovf:Property ovf:key="ios-config-0003" ovf:type="string" ovf:userConfigurable="true" ovf:value=" no shutdown"/>

Regarding your second question - it's not currently possible to specify multiple actions in a single command, but this is a wish-list item, #22.

frbayart commented 6 years ago

Oh ok so --config-file is not for me :) I'm using packer to build OVF on VMWare and I use cot to add product informations and properties. Thx !