Пример #1
0
    def _setup_routes(self, mapper, ext_mgr):
        mapper.redirect("", "/")

        self.resources['sources'] = sources.create_resource(ext_mgr)
        mapper.resource("source", "sources",
                        controller=self.resources['sources'])

        self.resources['destinations'] = destinations.create_resource(ext_mgr)
        mapper.resource("destination", "destinations",
                        controller=self.resources['destinations'])

        self.resources['resources'] = resources.create_resource(ext_mgr)
        mapper.resource("resource", "resources",
                        controller=self.resources['resources'])

        self.resources['instances'] = instances.create_resource(ext_mgr)
        mapper.resource("instance", "instances",
                        controller=self.resources['instances'])

        self.resources['volumes'] = volumes.create_resource(ext_mgr)
        mapper.resource("volume", "volumes",
                        controller=self.resources['volumes'])

        self.resources['networks'] = networks.create_resource(ext_mgr)
        mapper.resource("network", "networks",
                        controller=self.resources['networks'])

        self.resources['migrations'] = migrations.create_resource(ext_mgr)
        mapper.resource("migration", "migrations",
                        controller=self.resources['migrations'])
Пример #2
0
    def _setup_routes(self, mapper, ext_mgr):
        mapper.redirect("", "/")

        self.resources['clouds'] = clouds.create_resource(ext_mgr)
        mapper.resource("cloud", "clouds",
                        controller=self.resources['clouds'],
                        collection={'detail': 'GET',
                                    'driver_info': 'GET',
                                    'fetch': 'POST',
                                    'properties_update': 'POST'})

        self.resources['resources'] = resources.create_resource(ext_mgr)
        mapper.resource("resource", "resources",
                        controller=self.resources['resources'],
                        collection={'detail': 'GET'})

        self.resources['migrations'] = migrations.create_resource(ext_mgr)
        mapper.resource("migration", "migrations",
                        controller=self.resources['migrations'],
                        collection={'detail': 'GET'})
Пример #3
0
    def _setup_routes(self, mapper, ext_mgr):
        mapper.redirect("", "/")

        self.resources["migrations"] = migrations.create_resource(ext_mgr)
        mapper.resource(
            "migration",
            "migrations",
            controller=self.resources["migrations"],
            collection={"detail": "GET"},
            member={"action": "POST"},
        )

        self.resources["types"] = types.create_resource(ext_mgr)
        mapper.resource("type", "types", controller=self.resources["types"])

        self.resources["sources"] = sources.create_resource(ext_mgr)
        mapper.resource("source", "sources", controller=self.resources["sources"])

        self.resources["vms"] = vms.create_resource(ext_mgr)
        mapper.resource(
            "vm", "vms", controller=self.resources["vms"], collection={"detail": "GET"}, member={"action": "POST"}
        )
Пример #4
0
    def _setup_routes(self, mapper, ext_mgr):
        mapper.redirect("", "/")

        self.resources['sources'] = sources.create_resource(ext_mgr)
        mapper.resource("source",
                        "sources",
                        controller=self.resources['sources'])

        self.resources['destinations'] = destinations.create_resource(ext_mgr)
        mapper.resource("destination",
                        "destinations",
                        controller=self.resources['destinations'])

        self.resources['resources'] = resources.create_resource(ext_mgr)
        mapper.resource("resource",
                        "resources",
                        controller=self.resources['resources'])

        self.resources['instances'] = instances.create_resource(ext_mgr)
        mapper.resource("instance",
                        "instances",
                        controller=self.resources['instances'])

        self.resources['volumes'] = volumes.create_resource(ext_mgr)
        mapper.resource("volume",
                        "volumes",
                        controller=self.resources['volumes'])

        self.resources['networks'] = networks.create_resource(ext_mgr)
        mapper.resource("network",
                        "networks",
                        controller=self.resources['networks'])

        self.resources['migrations'] = migrations.create_resource(ext_mgr)
        mapper.resource("migration",
                        "migrations",
                        controller=self.resources['migrations'])
Пример #5
0
    def _setup_routes(self, mapper, ext_mgr):
        mapper.redirect("", "/")

        self.resources['migrations'] = migrations.create_resource(ext_mgr)
        mapper.resource("migration",
                        "migrations",
                        controller=self.resources['migrations'],
                        collection={'detail': 'GET'},
                        member={'action': 'POST'})

        self.resources['types'] = types.create_resource(ext_mgr)
        mapper.resource("type", "types", controller=self.resources['types'])

        self.resources['sources'] = sources.create_resource(ext_mgr)
        mapper.resource("source",
                        "sources",
                        controller=self.resources['sources'])

        self.resources['vms'] = vms.create_resource(ext_mgr)
        mapper.resource("vm",
                        "vms",
                        controller=self.resources['vms'],
                        collection={'detail': 'GET'},
                        member={'action': 'POST'})