feist/pcs — pull request #33 by roidelapluie (2014-01-17 08:47:04+00:00)
Title: validate the lenght of a ocf resource definition

This prevents the following traceback:

[root@nmdev078 ~]# pcs resource create mysql_vip-3 ocf:IPaddr2 cidr_netmask=22 ip=172.31.110.68
Traceback (most recent call last):
File "/usr/sbin/pcs", line 129, in
main(sys.argv[1:])
File "/usr/sbin/pcs", line 108, in main
resource.resource_cmd(argv)
File "/usr/lib/python2.6/site-packages/pcs/resource.py", line 71, in resource_cmd
resource_create(res_id, res_type, ra_values, op_values, meta_values, clone_opts)
File "/usr/lib/python2.6/site-packages/pcs/resource.py", line 286, in resource_create
new_ra_type = utils.is_valid_resource(ra_type, True)
File "/usr/lib/python2.6/site-packages/pcs/utils.py", line 503, in is_valid_resource
resource = resource_split[2]

it is only needed for ocf:resource because the startwith of the other resources alreay include : and they maximum 2 parts.