Deploy an Azure instance and firewall rule
(self, args)
| 334 | # User commands |
| 335 | ########################################################################## |
| 336 | def cmd_create_instance(self, args): |
| 337 | """ Deploy an Azure instance and firewall rule """ |
| 338 | rg = self._create_resource_group(args) |
| 339 | instance = self._create_azure_instance(args) |
| 340 | self._create_firewall_rule(args) |
| 341 | |
| 342 | data = {'instance': { |
| 343 | 'Id': instance['id'], |
| 344 | 'ResourceGroupId': rg['name'], |
| 345 | 'Location': instance['location'], |
| 346 | 'Hostname': instance['fully_qualified_domain_name'], |
| 347 | 'Port': 5432, |
| 348 | 'Database': "postgres", |
| 349 | 'Username': instance['administrator_login'] |
| 350 | }} |
| 351 | |
| 352 | output(data) |
| 353 | |
| 354 | def cmd_delete_instance(self, args): |
| 355 | """ Delete an Azure instance """ |
nothing calls this directly
no test coverage detected