[sanlock] 04/08: python: Extract create_resource() helper