Jelajahi Sumber

Update API documentation

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
Mihaela Balutoiu 1 tahun lalu
induk
melakukan
2f3e549119
31 mengubah file dengan 168 tambahan dan 42 penghapusan
  1. 29 1
      coriolis/api-refs/api_samples/diagnostics/diagnostics-get-resp.json
  2. 4 2
      coriolis/api-refs/api_samples/endpoint/endpoint-instance-list-resp.json
  3. 2 1
      coriolis/api-refs/api_samples/endpoint/endpoint-instance-show-resp.json
  4. 4 2
      coriolis/api-refs/api_samples/endpoint/endpoint-network-list-resp.json
  5. 12 0
      coriolis/api-refs/api_samples/endpoint/openstack-endpoint-source-minion-pool-options-list-resp.json
  6. 4 2
      coriolis/api-refs/api_samples/endpoint/openstack-endpoint-source-options-list-resp.json
  7. 1 0
      coriolis/api-refs/api_samples/migration/openstack-migration-create-req.json
  8. 8 2
      coriolis/api-refs/api_samples/migration/openstack-migration-create-resp.json
  9. 1 0
      coriolis/api-refs/api_samples/migration/openstack-migration-from-replica-resp.json
  10. 8 2
      coriolis/api-refs/api_samples/migration/openstack-migration-get-resp.json
  11. 11 1
      coriolis/api-refs/api_samples/migration/openstack-migration-list-detail-resp.json
  12. 1 0
      coriolis/api-refs/api_samples/minion_pool/minion-pool-list-resp.json
  13. 1 0
      coriolis/api-refs/api_samples/minion_pool/openstack-minion-pool-allocate-resp.json
  14. 1 0
      coriolis/api-refs/api_samples/minion_pool/openstack-minion-pool-create-resp.json
  15. 1 0
      coriolis/api-refs/api_samples/minion_pool/openstack-minion-pool-deallocate-resp.json
  16. 1 0
      coriolis/api-refs/api_samples/minion_pool/openstack-minion-pool-refresh-resp.json
  17. 1 0
      coriolis/api-refs/api_samples/minion_pool/openstack-minion-pool-show.json
  18. 1 1
      coriolis/api-refs/api_samples/minion_pool/openstack-minion-pool-update-resp.json
  19. 1 0
      coriolis/api-refs/api_samples/replica/openstack-replica-create-resp.json
  20. 1 0
      coriolis/api-refs/api_samples/replica/openstack-replica-get-resp.json
  21. 11 1
      coriolis/api-refs/api_samples/replica/replica-list-resp.json
  22. 1 0
      coriolis/api-refs/api_samples/replica/replica-update-resp.json
  23. 2 2
      coriolis/api-refs/api_samples/service/service-create-req.json
  24. 2 2
      coriolis/api-refs/api_samples/service/service-create-resp.json
  25. 3 0
      coriolis/api-refs/source/diagnostics.inc
  26. 6 3
      coriolis/api-refs/source/endpoint.inc
  27. 1 1
      coriolis/api-refs/source/migration.inc
  28. 30 0
      coriolis/api-refs/source/parameters.yaml
  29. 4 4
      coriolis/api-refs/source/replica.inc
  30. 12 12
      coriolis/policies/endpoints.py
  31. 3 3
      coriolis/policies/migrations.py

+ 29 - 1
coriolis/api-refs/api_samples/diagnostics/diagnostics-get-resp.json

@@ -59,7 +59,35 @@
                         ]
                     }
                 }
-            ]
+            ],
+            "licensing_status": {
+                "appliance_id": "123e4567-e89b-12d3-a456-426614176000",
+                "earliest_licence_expiry_time": "2024-09-07T13:09:21Z",
+                "latest_licence_expiry_time": "2024-09-07T13:09:21Z",
+                "current_performed_migrations": 0,
+                "current_performed_replicas": 0,
+                "lifetime_performed_migrations": 2,
+                "lifetime_performed_replicas": 1,
+                "current_available_migrations": 10,
+                "current_available_replicas": 10,
+                "lifetime_available_migrations": 10,
+                "lifetime_available_replicas": 10
+            },
+            "licences": [
+                {
+                    "id": "e7b8a9f0-4d3b-4a6a-8c1d-2f8e4d9a9b1f",
+                    "appliance_id": "123e4567-e89b-12d3-a456-476614174000",
+                    "issue_date": "2024-09-03T09:53:44Z",
+                    "licence_version": "v2",
+                    "migrations": 10,
+                    "replicas": 10,
+                    "period_start": "2024-09-03T09:54:21Z",
+                    "period_duration": 20,
+                    "period_end": "2024-09-07T13:09:21Z",
+                    "application_date": "2024-09-03T09:53:56Z"
+                }
+            ],
+            "reservations": []
         },
         {
             "application": "coriolis-replica-cron",

+ 4 - 2
coriolis/api-refs/api_samples/endpoint/endpoint-instance-list-resp.json

@@ -9,7 +9,8 @@
       "id": "3ba07383-6726-4bf8-82d5-d5ce871519bc",
       "flavor_name": "m1.small",
       "os_type": "linux",
-      "firmware_type": "BIOS"
+      "firmware_type": "BIOS",
+      "secure_boot": false
     },
     {
       "num_cpu": 4,
@@ -20,7 +21,8 @@
       "id": "e93f6d38-9240-4dec-b738-61ca225aba6a",
       "flavor_name": "windows2012",
       "os_type": "windows",
-      "firmware_type": "EFI"
+      "firmware_type": "EFI",
+      "secure_boot": false
     }
   ]
 }

+ 2 - 1
coriolis/api-refs/api_samples/endpoint/endpoint-instance-show-resp.json

@@ -36,6 +36,7 @@
       "controllers": []
     },
     "os_type": "linux",
-    "firmware_type": "BIOS"
+    "firmware_type": "BIOS",
+    "secure_boot": false
   }
 }

+ 4 - 2
coriolis/api-refs/api_samples/endpoint/endpoint-network-list-resp.json

@@ -2,11 +2,13 @@
   "networks": [
     {
       "id": "2734b848-1e4a-4e94-b566-71060d913f80",
-      "name": "shared"
+      "name": "shared",
+      "port_security_enabled": true
     },
     {
       "id": "a57e180a-5626-459e-b59b-bd5491ebef6d",
-      "name": "public"
+      "name": "public",
+      "port_security_enabled": true
     }
   ]
 }

+ 12 - 0
coriolis/api-refs/api_samples/endpoint/openstack-endpoint-source-minion-pool-options-list-resp.json

@@ -46,6 +46,18 @@
             ],
             "config_default": "m1.small"
         },
+        {
+            "name": "migr_worker_availability_zone",
+            "values": [
+                {
+                    "name": "internal"
+                },
+                {
+                    "id": "nova"
+                }
+            ],
+            "config_default": null
+        },
         {
             "name": "migr_worker_volume_type",
             "values": [

+ 4 - 2
coriolis/api-refs/api_samples/endpoint/openstack-endpoint-source-options-list-resp.json

@@ -5,11 +5,13 @@
             "values": [
                 {
                     "name": "ws2008",
-                    "id": "5051a788-f133-4a84-af64-fd35e4c36f24"
+                    "id": "5051a788-f133-4a84-af64-fd35e4c36f24",
+                    "os_type": "windows"
                 },
                 {
                     "name": "debian8",
-                    "id": "f298bc1b-a631-47cc-beef-ffd13e572226"
+                    "id": "f298bc1b-a631-47cc-beef-ffd13e572226",
+                    "os_type": "linux"
                 }
             ],
             "config_default": null

+ 1 - 0
coriolis/api-refs/api_samples/migration/openstack-migration-create-req.json

@@ -7,6 +7,7 @@
     "instances": ["ubuntu-xenial", "windows2012r2"],
     "storage_mappings": {},
     "destination_environment": {
+      "migr_flavor_name": "m1.small",
       "storage_mappings": {
         "lvmdriver-1": "lvm-1"
       },

+ 8 - 2
coriolis/api-refs/api_samples/migration/openstack-migration-create-resp.json

@@ -8,6 +8,7 @@
     "user_id": "7cf9b4745d514517b3eae440438136bc",
     "project_id": "ffc16db2011e41f28152897c279b6bcc",
     "destination_environment": {
+        "migr_flavor_name": "m1.small",
         "storage_mappings": {
           "lvmdriver-1": "lvm-1"
         },
@@ -19,7 +20,10 @@
         },
         "migr_network": "provider-net",
         "port_reuse_policy": "keep_mac",
-        "set_dhcp": true
+        "set_dhcp": true,
+        "network_map": {
+          "private": "provider-net"
+        }
     },
     "type": "migration",
     "instances": ["ubuntu-xenial", "windows2012r2"],
@@ -28,7 +32,9 @@
     "origin_endpoint_id": "b59051a2-bbf3-4fb7-a1eb-539db55339dc",
     "destination_endpoint_id": "6258fa20-5d1f-44fa-ae12-c94122263fa3",
     "transfer_result": null,
-    "network_map": {},
+    "network_map": {
+      "private": "provider-net"
+    },
     "storage_mappings": {},
     "source_environment": {},
     "id": "1e31443d-5eb1-403f-9f15-c67a2c372bc3",

+ 1 - 0
coriolis/api-refs/api_samples/migration/openstack-migration-from-replica-resp.json

@@ -8,6 +8,7 @@
     "user_id": "7cf9b4745d514517b3eae440438136bc",
     "project_id": "ffc16db2011e41f28152897c279b6bcc",
     "destination_environment": {
+      "migr_flavor_name": "m1.small",
       "storage_mappings": {
         "lvmdriver-1": "lvm-1"
       },

+ 8 - 2
coriolis/api-refs/api_samples/migration/openstack-migration-get-resp.json

@@ -8,6 +8,7 @@
     "user_id": "7cf9b4745d514517b3eae440438136bc",
     "project_id": "ffc16db2011e41f28152897c279b6bcc",
     "destination_environment": {
+        "migr_flavor_name": "m1.small",
         "storage_mappings": {
           "lvmdriver-1": "lvm-1"
         },
@@ -19,7 +20,10 @@
         },
         "migr_network": "provider-net",
         "port_reuse_policy": "keep_mac",
-        "set_dhcp": true
+        "set_dhcp": true,
+        "network_map": {
+          "private": "provider-net"
+      }
     },
     "type": "migration",
     "instances": ["windows"],
@@ -28,7 +32,9 @@
     "origin_endpoint_id": "b59051a2-bbf3-4fb7-a1eb-539db55339dc",
     "destination_endpoint_id": "6258fa20-5d1f-44fa-ae12-c94122263fa3",
     "transfer_result": null,
-    "network_map": {},
+    "network_map": {
+      "private": "provider-net"
+    },
     "storage_mappings": {},
     "source_environment": {},
     "id": "1e31443d-5eb1-403f-9f15-c67a2c372bc3",

+ 11 - 1
coriolis/api-refs/api_samples/migration/openstack-migration-list-detail-resp.json

@@ -9,6 +9,7 @@
       "user_id": "7cf9b4745d514517b3eae440438136bc",
       "project_id": "ffc16db2011e41f28152897c279b6bcc",
       "destination_environment": {
+        "migr_flavor_name": "m1.small",
         "network_map": {
           "VM Network": "0e83bf34-9cc7-4580-9189-a9d9c3c7abb8"
         },
@@ -25,7 +26,16 @@
               "destination": "lvmdriver-1"
             }
           ]
-        }
+        },
+        "keypair_name": "new-key",
+        "delete_disks_on_vm_termination": false,
+        "migr_image_map": {
+          "linux": "ubuntu-xenial-img",
+          "windows": "63d8f1a4-3192-4edc-b113-0d099b4bc458"
+        },
+        "migr_network": "provider-net",
+        "port_reuse_policy": "keep_mac",
+        "set_dhcp": true
       },
       "type": "migration",
       "instances": [

+ 1 - 0
coriolis/api-refs/api_samples/minion_pool/minion-pool-list-resp.json

@@ -6,6 +6,7 @@
             "notes": "",
             "endpoint_id": "8e9b6b0b-ef3b-4127-ac32-a18a30e67749",
             "environment_options": {
+                "data_transfer_mechanism": "HTTPS",
                 "list_all_destination_networks": false,
                 "migr_worker_use_config_drive": false,
                 "migr_image": "bionic",

+ 1 - 0
coriolis/api-refs/api_samples/minion_pool/openstack-minion-pool-allocate-resp.json

@@ -14,6 +14,7 @@
         "os_type": "linux",
         "platform": "source",
         "environment_options": {
+            "data_transfer_mechanism": "HTTPS",
             "list_all_destination_networks": false,
             "migr_worker_use_config_drive": false,
             "migr_image": "bionic",

+ 1 - 0
coriolis/api-refs/api_samples/minion_pool/openstack-minion-pool-create-resp.json

@@ -14,6 +14,7 @@
         "os_type": "linux",
         "platform": "source",
         "environment_options": {
+            "data_transfer_mechanism": "HTTPS",
             "list_all_destination_networks": false,
             "migr_worker_use_config_drive": false,
             "migr_image": "bionic",

+ 1 - 0
coriolis/api-refs/api_samples/minion_pool/openstack-minion-pool-deallocate-resp.json

@@ -14,6 +14,7 @@
         "os_type": "linux",
         "platform": "source",
         "environment_options": {
+            "data_transfer_mechanism": "HTTPS",
             "list_all_destination_networks": false,
             "migr_worker_use_config_drive": false,
             "migr_image": "bionic",

+ 1 - 0
coriolis/api-refs/api_samples/minion_pool/openstack-minion-pool-refresh-resp.json

@@ -14,6 +14,7 @@
         "os_type": "linux",
         "platform": "source",
         "environment_options": {
+            "data_transfer_mechanism": "HTTPS",
             "list_all_destination_networks": false,
             "migr_worker_use_config_drive": false,
             "migr_image": "bionic",

+ 1 - 0
coriolis/api-refs/api_samples/minion_pool/openstack-minion-pool-show.json

@@ -14,6 +14,7 @@
         "os_type": "linux",
         "platform": "source",
         "environment_options": {
+            "data_transfer_mechanism": "HTTPS",
             "list_all_destination_networks": false,
             "migr_worker_use_config_drive": false,
             "migr_image": "bionic",

+ 1 - 1
coriolis/api-refs/api_samples/minion_pool/openstack-minion-pool-update-resp.json

@@ -22,7 +22,7 @@
             "migr_worker_use_fip": true,
             "migr_worker_boot_from_volume": false,
             "migr_fip_pool_name": "b2f0b98e-03a1-4f13-92aa-ece55f34ebf8/038a72ea-1413-493b-82da-4c75a9077fbf",
-            "data_transfer_mechanism": "SSH"
+            "data_transfer_mechanism": "HTTPS"
         },
         "status": "DEALLOCATED",
         "shared_resources": null,

+ 1 - 0
coriolis/api-refs/api_samples/replica/openstack-replica-create-resp.json

@@ -8,6 +8,7 @@
     "user_id": "7cf9b4745d514517b3eae440438136bc",
     "project_id": "ffc16db2011e41f28152897c279b6bcc",
     "destination_environment": {
+      "migr_flavor_name": "m1.small",
       "network_map": {
         "private": "provider-net"
       },

+ 1 - 0
coriolis/api-refs/api_samples/replica/openstack-replica-get-resp.json

@@ -8,6 +8,7 @@
     "user_id": "7cf9b4745d514517b3eae440438136bc",
     "project_id": "ffc16db2011e41f28152897c279b6bcc",
     "destination_environment": {
+      "migr_flavor_name": "m1.small",
       "network_map": {
         "private": "provider-net"
       },

+ 11 - 1
coriolis/api-refs/api_samples/replica/replica-list-resp.json

@@ -9,6 +9,7 @@
       "user_id": "7cf9b4745d514517b3eae440438136bc",
       "project_id": "ffc16db2011e41f28152897c279b6bcc",
       "destination_environment": {
+        "migr_flavor_name": "m1.small",
         "network_map": {
           "VM Network": "0a6b9c01-9ff8-4afa-afba-fa2058fe6cd2"
         },
@@ -25,7 +26,16 @@
               "destination": "lvmdriver-1"
             }
           ]
-        }
+        },
+        "keypair_name": "new-key",
+        "delete_disks_on_vm_termination": false,
+        "migr_image_map": {
+          "linux": "ubuntu-xenial-img",
+          "windows": "63d8f1a4-3192-4edc-b113-0d099b4bc458"
+        },
+        "migr_network": "VM Network",
+        "port_reuse_policy": "keep_mac",
+        "set_dhcp": true
       },
       "type": "replica",
       "instances": [

+ 1 - 0
coriolis/api-refs/api_samples/replica/replica-update-resp.json

@@ -8,6 +8,7 @@
     "action_id": "0460aa4d-6b16-4c98-bd56-27ee186e4a22",
     "status": "RUNNING",
     "number": 2,
+    "type": "replica_update",
     "tasks": [
       {
         "created_at": "2019-07-23T17:18:38.000000",

+ 2 - 2
coriolis/api-refs/api_samples/service/service-create-req.json

@@ -1,8 +1,8 @@
 {
     "service": {
         "host": "coriolis-worker-ONbgH1NV",
-        "binary": "coriolis-worker",
-        "topic": "coriolis_worker",
+        "binary": "coriolis-worker-test",
+        "topic": "coriolis_worker-test",
         "mapped_regions": ["5e31066c-3512-4e8d-9e68-0a5de3d35c5f"],
         "enabled": false
     }

+ 2 - 2
coriolis/api-refs/api_samples/service/service-create-resp.json

@@ -6,8 +6,8 @@
         "deleted": "0",
         "id": "07c3343b-970d-437a-b670-e88e78dab3fc",
         "host": "coriolis-worker-ONbgH1NV",
-        "binary": "coriolis-worker",
-        "topic": "coriolis_worker",
+        "binary": "coriolis-worker-test",
+        "topic": "coriolis_worker-test",
         "enabled": false,
         "status": "UP",
         "providers": {

+ 3 - 0
coriolis/api-refs/source/diagnostics.inc

@@ -29,7 +29,10 @@ Response
   - os_info : diagnostic_os_info
   - hostname : diagnostic_hostname
   - ip_addresses : diagnostic_ip_addresses
+  - licensing_status : diagnostic_licensing_status
   - packages : diagnostic_packages
+  - licences : diagnostic_licences
+  - reservations : diagnostic_reservations
 
 **Example of a Diagnostics List**
 

+ 6 - 3
coriolis/api-refs/source/endpoint.inc

@@ -98,7 +98,7 @@ Response
 Create Endpoint
 ===============
 
-.. rest_method:: POST /endpoints/
+.. rest_method:: POST /endpoints
 
 Creates a cloud endpoint.
 
@@ -204,7 +204,7 @@ Response
 Delete Endpoint
 ===============
 
-.. rest_method:: DELETE endpoints/{endpoint_id}
+.. rest_method:: DELETE /endpoints/{endpoint_id}
 
 Deletes an endpoint.
 
@@ -268,6 +268,7 @@ Response
   - os_type : instance_os_type
   - flavor_name : instance_flavor
   - firmware_type : instance_firmware_type
+  - secure_boot : instance_secure_boot
 
 **Example Instance List on Openstack Endpoint**
   .. literalinclude:: ../api_samples/endpoint/endpoint-instance-list-resp.json
@@ -316,6 +317,7 @@ Response
   - flavor_name : instance_flavor
   - devices : instance_devices
   - firmware_type : instance_firmware_type
+  - secure_boot : instance_secure_boot
 
 **Example Instance Show On Openstack Endpoint**
 
@@ -433,6 +435,7 @@ Response
   - networks : networks_array
   - name : network_name
   - id : network_id
+  - port_security_enabled : network_port_security_enabled
 
 **Example Get Endpoint Networks**
 
@@ -443,7 +446,7 @@ Response
 Get Endpoint Storage
 ====================
 
-.. rest_method:: GET endpoints/{endpoint_id}/storage
+.. rest_method:: GET /endpoints/{endpoint_id}/storage
 
 Lists all available storage backends on a given destination endpoint.
 

+ 1 - 1
coriolis/api-refs/source/migration.inc

@@ -259,7 +259,7 @@ Response
 
 Delete Migration
 ================
-.. rest_method:: DELETE migrations/{migration_id}
+.. rest_method:: DELETE /migrations/{migration_id}
 
 Deletes an non-running migration.
 

+ 30 - 0
coriolis/api-refs/source/parameters.yaml

@@ -149,6 +149,18 @@ diagnostic_ip_addresses:
   in: body
   type: object
   required: true
+diagnostic_licences:
+  description: |
+    The list of licenses installed on the Coriolis appliance.
+  in: body
+  type: object
+  required: true
+diagnostic_licensing_status:
+  description: |
+    The licensing status of the Coriolis appliance.
+  in: body
+  type: object
+  required: true
 diagnostic_os_info:
   description: |
     The Coriolis appliance's host OS information.
@@ -161,6 +173,12 @@ diagnostic_packages:
   in: body
   type: array
   required: true
+diagnostic_reservations:
+  description: |
+    The list of reservations made by the Coriolis appliance.
+  in: body
+  type: object
+  required: false
 diagnostics_array:
   description: |
     Array of diagnostics objects.
@@ -317,6 +335,12 @@ instance_osmorphing_minion_pool_mappings:
   in: body
   type: object
   required: true
+instance_secure_boot:
+  description: |
+    Whether the machine has UEFI Secure Boot enabled or not.
+  in: body
+  type: boolean
+  required: false
 maximum_minions:
   description: |
     Maximum number of minion machines allowed to be allocated for the minion pool.
@@ -639,6 +663,12 @@ network_name:
   type: string
   in: body
   required: true
+network_port_security_enabled:
+  description: |
+    Boolean value representing whether the port security is enabled or not for the listed network.
+  in: body
+  type: boolean
+  required: true
 networks_array:
   description: |
     An array of ``network`` objects.

+ 4 - 4
coriolis/api-refs/source/replica.inc

@@ -413,7 +413,7 @@ Replica Actions
 Delete Replica Disks
 ====================
 
-.. rest_method:: POST replicas/{replica_id}/actions
+.. rest_method:: POST /replicas/{replica_id}/actions
 
 Deletes a replicas disks on the destination environment.
 
@@ -456,7 +456,7 @@ Replica Execution Actions
 Cancel Replica Execution
 ========================
 
-.. rest_method:: POST /replicas/{replica_id}/executions/{execution_id}
+.. rest_method:: POST /replicas/{replica_id}/executions/{execution_id}/actions
 
 Cancels an ongoing replica execution.
 
@@ -490,7 +490,7 @@ There is no response to a successful replicas execution cancellation.
 
 Delete Replica Execution
 ========================
-.. rest_method:: DELETE replicas/{replica_id}/executions/{replica_tasks_execution_id}
+.. rest_method:: DELETE /replicas/{replica_id}/executions/{execution_id}
 
 Deletes an replica execution.
 
@@ -509,7 +509,7 @@ Request
 .. rest_parameters:: parameters.yaml
 
     - replica_id : replica_id_path
-    - replica_tasks_execution_id : replica_tasks_execution_id_path
+    - execution_id : execution_id_path
 
 Response
 --------

+ 12 - 12
coriolis/policies/endpoints.py

@@ -45,7 +45,7 @@ ENDPOINTS_POLICY_DEFAULT_RULES = [
         "Show details for endpoint",
         [
             {
-                "path": "/endpoint/{endpoint_id}",
+                "path": "/endpoints/{endpoint_id}",
                 "method": "GET"
             }
         ]
@@ -57,7 +57,7 @@ ENDPOINTS_POLICY_DEFAULT_RULES = [
         "Update details for endpoint",
         [
             {
-                "path": "/endpoint/{endpoint_id}",
+                "path": "/endpoints/{endpoint_id}",
                 "method": "PUT"
             }
         ]
@@ -68,7 +68,7 @@ ENDPOINTS_POLICY_DEFAULT_RULES = [
         "Delete endpoint",
         [
             {
-                "path": "/endpoint/{endpoint_id}",
+                "path": "/endpoints/{endpoint_id}",
                 "method": "DELETE"
             }
         ]
@@ -79,7 +79,7 @@ ENDPOINTS_POLICY_DEFAULT_RULES = [
         "Validate endpoint connection info",
         [
             {
-                "path": "/endpoint/{endpoint_id}/action",
+                "path": "/endpoints/{endpoint_id}/actions",
                 "method": "POST"
             }
         ]
@@ -90,7 +90,7 @@ ENDPOINTS_POLICY_DEFAULT_RULES = [
         "List instances available for migration/replication",
         [
             {
-                "path": "/endpoint/{endpoint_id}/instances",
+                "path": "/endpoints/{endpoint_id}/instances",
                 "method": "GET"
             }
         ]
@@ -101,7 +101,7 @@ ENDPOINTS_POLICY_DEFAULT_RULES = [
         "Get details for given instance available for migration/replication",
         [
             {
-                "path": "/endpoint/{endpoint_id}/instances/{instance_name}",
+                "path": "/endpoints/{endpoint_id}/instances/{instance_name}",
                 "method": "GET"
             }
         ]
@@ -112,7 +112,7 @@ ENDPOINTS_POLICY_DEFAULT_RULES = [
         "List networks available on the given endpoint",
         [
             {
-                "path": "/endpoint/{endpoint_id}/networks",
+                "path": "/endpoints/{endpoint_id}/networks",
                 "method": "GET"
             }
         ]
@@ -123,7 +123,7 @@ ENDPOINTS_POLICY_DEFAULT_RULES = [
         "List storage types available on the given endpoint",
         [
             {
-                "path": "/endpoint/{endpoint_id}/storage",
+                "path": "/endpoints/{endpoint_id}/storage",
                 "method": "GET"
             }
         ]
@@ -134,7 +134,7 @@ ENDPOINTS_POLICY_DEFAULT_RULES = [
         "List available destination options for endpoint",
         [
             {
-                "path": "/endpoint/{endpoint_id}/destination-options",
+                "path": "/endpoints/{endpoint_id}/destination-options",
                 "method": "GET"
             }
         ]
@@ -145,7 +145,7 @@ ENDPOINTS_POLICY_DEFAULT_RULES = [
         "List available source options for endpoint",
         [
             {
-                "path": "/endpoint/{endpoint_id}/source-options",
+                "path": "/endpoints/{endpoint_id}/source-options",
                 "method": "GET"
             }
         ]
@@ -156,7 +156,7 @@ ENDPOINTS_POLICY_DEFAULT_RULES = [
         "List available source minion pool options for endpoint",
         [
             {
-                "path": "/endpoint/{endpoint_id}/source-minion-pool-options",
+                "path": "/endpoints/{endpoint_id}/source-minion-pool-options",
                 "method": "GET"
             }
         ]
@@ -168,7 +168,7 @@ ENDPOINTS_POLICY_DEFAULT_RULES = [
         [
             {
                 "path": (
-                    "/endpoint/{endpoint_id}/destination-minion-pool-options"),
+                    "/endpoints/{endpoint_id}/destination-minion-pool-options"), # noqa
                 "method": "GET"
             }
         ]

+ 3 - 3
coriolis/policies/migrations.py

@@ -44,7 +44,7 @@ MIGRATIONS_POLICY_DEFAULT_RULES = [
         "Show details for a migration",
         [
             {
-                "path": "/migration/{migration_id}",
+                "path": "/migrations/{migration_id}",
                 "method": "GET"
             }
         ]
@@ -57,7 +57,7 @@ MIGRATIONS_POLICY_DEFAULT_RULES = [
         "Cancel a running Migration",
         [
             {
-                "path": "/migrations/{migration_id}/actions/",
+                "path": "/migrations/{migration_id}/actions",
                 "method": "POST"
             }
         ]
@@ -68,7 +68,7 @@ MIGRATIONS_POLICY_DEFAULT_RULES = [
         "Delete Migration",
         [
             {
-                "path": "/migration/{migration_id}",
+                "path": "/migrations/{migration_id}",
                 "method": "DELETE"
             }
         ]