Set new material and its options in "Cycles Render" from python (Blender 2.67)

Hi,
I am using the render engine “Cycles Render” (Blender 2.67) and I want to create a glass surface.
This is achieved very easily with the graphical interface, I just need to go on material, then “new”, then choose “Surface: Glass BSDF”.

Now I would like to do the same using python.

Can anyone post here a python script which creates a plane and sets its surface to Glass BSDF?

Thanks a lot
Cheers

try this
###################
import bpy

matName = ‘planeGlass’
bpy.ops.mesh.primitive_plane_add()
bpy.data.materials.new(matName)
bpy.data.materials[matName].use_nodes = True
bpy.data.materials[matName].node_tree.nodes.new(type=‘ShaderNodeBsdfGlass’)
inp = bpy.data.materials[matName].node_tree.nodes[‘Material Output’].inputs[‘Surface’]
outp = bpy.data.materials[matName].node_tree.nodes[‘Glass BSDF’].outputs[‘BSDF’]
bpy.data.materials[matName].node_tree.links.new(inp,outp)
bpy.data.objects[‘Plane’].active_material = bpy.data.materials[matName]

#####################

How to create a new Node Group with Python ?
I can’t find a list of names of all avaible Cycle Material Nodes like for example ‘ShaderNodeBsdfGlass’.

Where do you get those informations ?

Kind regards
Alain