MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / cmd_create_instance

Method cmd_create_instance

web/pgacloud/providers/azure.py:336–352  ·  view source on GitHub ↗

Deploy an Azure instance and firewall rule

(self, args)

Source from the content-addressed store, hash-verified

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 """

Callers

nothing calls this directly

Calls 4

_create_firewall_ruleMethod · 0.95
outputFunction · 0.90

Tested by

no test coverage detected