cplane-networks / dvnd-juju

Juju Charms installation of DVNd
2 stars 6 forks source link

Validate package manager JSON and Net Interfaces #5

Closed thedac closed 8 years ago

thedac commented 8 years ago

This is just an example. Please feel free to reject this pull request. No feelings hurt :)

When pulling the package manager JSON validate the JSON and provide feedback to the end user if it is invalid. When getting net interfaces data validate what is expected and provide feedback when expected data is missing.

We would then get status outputs like the following in error scenarios: juju status-history neutron-openvswitch-cplane/0

TIME TYPE STATUS MESSAGE 25 Aug 2016 09:53:58-07:00 juju-unit executing running install hook 25 Aug 2016 10:09:34-07:00 workload blocked JSON Error: Expecting property name: line 56 column 13 (char 2519) 25 Aug 2016 10:10:50-07:00 workload maintenance installing charm software

TIME TYPE STATUS MESSAGE 25 Aug 2016 10:10:50-07:00 juju-unit executing running install hook 25 Aug 2016 10:15:02-07:00 workload blocked Interface eth1 does not have an address in the address family 2 25 Aug 2016 10:15:02-07:00 juju-unit error hook failed: "install"

amarendrameher commented 8 years ago

Validate package manager JSON and Net Interfaces and creating the lib directory