Bending and tensile deformation of metallic nanowires