On 14 Nov 2016 8:39 am, "Marcin Kulisz" <[email protected]> wrote: > > On 2016-11-13 20:58:02, Thomas Lange wrote: > > Hi Lars, > > > > I'm really wondering why you want to use YAML for this? > > I can talk just for my self but my pros would be: cleanliness, machine > parcebility, human redeability, neat python integration, simple templating > integration (jinja2) with programming languages. So I suppose Lars > would agree with those and possibly add something else. > > > Your examples > > look like things you could easily implement in shell, if you provide > > some functions, subroutines or external programs that implement your > > steps. Then your DSL would just be a shell script that the user has to > > write. > > > > > > create_raw_file $size $image > > create_partition_table msdos > > create_partition $bootsize ext2 /boot bootable > > create_partition rest ext4 / > > mount_all > > Above doesn't look so neat to me like well structured schema based yaml. > > > and so on. > > > > > The "step:" key specifies the step to execute. The other keys are > > > parameters for the step. The {{...}} parts are where Jinja2 is used > > > to expand variable values. > > These things are very similar to calling commands with parameters in a > > shell script without the need of YAML and Jinja2. > > Yes, but IMO yaml and jinja2 allow for creating very simple and nice > integration and extending capabilities with minimal effort. > > > Much easier and more common for sysadmins IMO. > > I can agree that this may be the case for some people but it's hard to deny > that there are restrictions on bash which can't be overcome due to bash nature > and which does not exist in python as this is fully blown programming language. > > And yes I know Thomas your approach to object orientated programming :-) > > What Lars is proposing I see as a very reasonable thing to do. Providing well design > and maintained tool with easy extensibility and a way to accommodate eventual > future requirements. > > IMO what Lars is trying to achieve is much easier to do in python then in bash > and with properly abstracted logic there should be no need to anybody using > this tool to even know python (what for me is a bit odd for sysadmins) to create > images with vmdb. > Knowledge of available options and basics of yaml would suffice and I think > this is even lower threshold for entry level then knowing bash.
These days golang is the go, excuse the pun and the fact it compiles to a single executable means the language and extra packages such as jinja2 are not required. > -- > > |_|0|_| | > |_|_|0| "Panta rei" | > |0|0|0| -------- kuLa -------- | > > gpg --keyserver pgp.mit.edu --recv-keys 0x686930DD58C338B3 > 3DF1 A4DF C732 4688 38BC F121 6869 30DD 58C3 38B3
