(self, args, **kwargs)
| 282 | |
| 283 | @resource.add_auth_token_to_kwargs_from_cli |
| 284 | def run(self, args, **kwargs): |
| 285 | instance = KeyValuePair() |
| 286 | instance.id = args.name # TODO: refactor and get rid of id |
| 287 | instance.name = args.name |
| 288 | instance.scope = args.scope |
| 289 | instance.user = args.user |
| 290 | |
| 291 | if not args.value: |
| 292 | instance.value = input("Please insert value for key: ") |
| 293 | else: |
| 294 | instance.value = args.value |
| 295 | |
| 296 | if args.secret: |
| 297 | instance.secret = args.secret |
| 298 | |
| 299 | if args.encrypted: |
| 300 | instance.encrypted = args.encrypted |
| 301 | |
| 302 | if args.ttl: |
| 303 | instance.ttl = args.ttl |
| 304 | |
| 305 | return self.manager.update(instance, **kwargs) |
| 306 | |
| 307 | def run_and_print(self, args, **kwargs): |
| 308 | instance = self.run(args, **kwargs) |
no test coverage detected