@classmethod<EOL><INDENT>def update(cls, args):<DEDENT>
inspector = SDKInspector(args.version)<EOL>name = Utils.get_singular_name(args.name)<EOL>instance = inspector.get_instance(name)<EOL>instance.id = args.id<EOL>attributes = cls._get_attributes(args.params)<EOL>inspector.get_user_session(args)<EOL>try:<EOL><INDENT>(instance, connection) = instance.fetch()<EOL><DEDENT>except Exception as e:<EOL><INDENT>Printer.raise_error("<STR_LIT>" % (name, args.id, e))<EOL><DEDENT>cls._fill_instance_with_attributes(instance, attributes)<EOL>try:<EOL><INDENT>(instance, connection) = instance.save()<EOL><DEDENT>except Exception as e:<EOL><INDENT>Printer.raise_error("<STR_LIT>" % (name, e))<EOL><DEDENT>if not args.json:<EOL><INDENT>Printer.success("<STR_LIT>" % (name, instance.id))<EOL><DEDENT>Printer.output(instance, json=args.json)<EOL>
Update an existing object