class CloudModule(): It is a wizard which inherits PgAdminModule class and define methods to load its own javascript file.
| 35 | |
| 36 | |
| 37 | class CloudModule(PgAdminModule): |
| 38 | """ |
| 39 | class CloudModule(): |
| 40 | |
| 41 | It is a wizard which inherits PgAdminModule |
| 42 | class and define methods to load its own |
| 43 | javascript file. |
| 44 | |
| 45 | """ |
| 46 | |
| 47 | def get_exposed_url_endpoints(self): |
| 48 | """ |
| 49 | Returns: |
| 50 | list: URL endpoints for cloud module |
| 51 | """ |
| 52 | return ['cloud.deploy_on_cloud', |
| 53 | 'cloud.update_cloud_server', |
| 54 | 'cloud.update_cloud_process', |
| 55 | 'cloud.get_host_ip', |
| 56 | 'cloud.clear_cloud_session'] |
| 57 | |
| 58 | def register(self, app, options): |
| 59 | """ |
| 60 | Override the default register function to automagically register |
| 61 | sub-modules at once. |
| 62 | """ |
| 63 | super().register(app, options) |
| 64 | |
| 65 | from .azure import blueprint as module |
| 66 | app.register_blueprint(module) |
| 67 | |
| 68 | from .rds import blueprint as module |
| 69 | app.register_blueprint(module) |
| 70 | |
| 71 | from .google import blueprint as module |
| 72 | app.register_blueprint(module) |
| 73 | |
| 74 | |
| 75 | # Create blueprint for CloudModule class |