aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/roles/check_openstack_services/tasks/main.yml
blob: bfd9e1193aef312afda49242ea1e9ec54e9223cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Copyright (c) 2017 Intel Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
- name: Check images
  shade_api:
    method: search_images
    fact_name: openstack_images
    args:
      - ~
  environment: "{{ openrc }}"

- name: Check servers
  os_server_facts: {}
#  environment: "{{ openrc }}"

- name: Check stacks
  shade_api:
    method: list_stacks
    fact_name: openstack_stacks
  environment: "{{ openrc }}"
'#n318'>318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475
ADAPTER = 'openstack'
METADATA = {
    'security': {
        '_self': {
            'required_in_whole_config': True,
        },
        'service_credentials': {
            '_self': {
                'required_in_whole_config': True,
                'key_extensions': {
                '$service': ['image', 'compute', 'dashboard', 'identity', 'metering', 'network', 'rabbitmq', 'volume', 'mysql', 'heat', 'alarming', 'policy']
                },
                'mapping_to': 'service_credentials'
            },
            '$service': {
               '_self': {
                   'required_in_whole_config': True,
                   'mapping_to': '$service'
               },
               'username': {
                   '_self': {
                       'is_required': True,
                       'field': 'username',
                       'mapping_to': 'username'
                   }
               },
               'password': {
                   '_self': {
                       'is_required': True,
                       'field': 'password',
                       'mapping_to': 'password'
                   }
               }
            }
        },
        'console_credentials': {
            '_self': {
                'required_in_whole_config': True,
                'key_extensions': {
                    '$console': ['admin', 'demo', 'compute', 'dashboard', 'image', 'identity', 'metering', 'network', 'object-store', 'volume', 'heat', 'alarming', 'policy']
                },
                'mapping_to': 'console_credentials'
            },
            '$console': {
                '_self': {
                    'required_in_whole_config': True,
                    'mapping_to': '$console'
                },
                'username': {
                    '_self': {
                        'is_required': True,
                        'field': 'username',
                        'mapping_to': 'username'
                    }
                },
                'password': {
                    '_self': {
                        'is_required': True,
                        'field': 'password',
                        'mapping_to': 'password'
                    }
                }
            }
        }
    },

    'enable_secgroup': {
        '_self': {
            'mapping_to': 'enable_secgroup',
            'field': 'anytype',
            'is_required':False,
            'default_value': True
        }
    },

    'enable_fwaas': {
        '_self': {
            'mapping_to': 'enable_fwaas',
            'field': 'anytype',
            'is_required':False,
            'default_value': True
        }
    },
    'enable_vpnaas': {
        '_self': {
            'mapping_to': 'enable_vpnaas',
            'field': 'anytype',
            'is_required':False,
            'default_value': True
        }
    },
    'odl_l3_agent': {
        '_self': {
            'mapping_to': 'odl_l3_agent',
            'field': 'anytype',
            'is_required':False,
            'default_value': 'Disable'
        }
    },
    'onos_sfc': {
        '_self': {
            'mapping_to': 'onos_sfc',
            'field': 'anytype',
            'is_required':False,
            'default_value': 'Disable'
        }
    },
    'odl_sfc': {
        '_self': {
            'mapping_to': 'odl_sfc',
            'field': 'anytype',
            'is_required':False,
            'default_value': 'Disable'
        }
    },
    'moon': {
        '_self': {
            'mapping_to': 'moon',
            'field': 'anytype',
            'is_required':False,
            'default_value': 'Disable'
        }
    },
    'plugins': {
        '_self': {
            'mapping_to': 'plugins',
            'field': 'general_list',
            'is_required':False,
            'default_value': '[]'
        }
    },
    'ha_network': {
        '_self': {
            'mapping_to': 'ha_network',
            'field': 'anytype',
            'is_required':False,
            'default_value': 'Disable'
        }
    },
    'network_cfg': {
        '_self': {
            'mapping_to': 'network_cfg'
        },

        'nic_mappings': {
            '_self': {
                'mapping_to': 'nic_mappings',
                'field': 'general_list'
            }
        },

        'bond_mappings': {
            '_self': {
                'mapping_to': 'bond_mappings',
                'field': 'general_list'
            }
        },

        'sys_intf_mappings': {
            '_self': {
                'mapping_to': 'sys_intf_mappings',
                'field': 'general_list'
            }
        },

        'ip_settings': {
             '_self': {
                 'mapping_to': 'ip_settings',
                 'field': 'general_list'
             }
        },

        'provider_net_mappings': {
            '_self': {
                'mapping_to': 'provider_net_mappings',
                'field': 'general_list'
            }
        },

        'ceph_disk': {
            '_self': {
                'mapping_to': 'ceph_disk',
                'field': 'general',
                'is_required':False
            }
        },

        'public_vip': {
        '_self': {
            'mapping_to': 'public_vip',
            'is_required': False
        },

        'ip': {
            '_self': {
            'mapping_to': 'ip',
            'is_required': True,
            'field': 'general',
            }
        },
        'netmask': {
            '_self': {
            'mapping_to': 'netmask',
            'is_required': True,
            'field': 'general',
            }
        },
        'interface': {
            '_self': {
            'mapping_to': 'interface',
            'is_required': True,
            'field': 'general',
            }
        }
        },

        'internal_vip': {
        '_self': {
            'mapping_to': 'internal_vip',
            'is_required': False
        },

        'ip': {
            '_self': {
            'mapping_to': 'ip',
            'is_required': True,
            'field': 'general',
            }
        },
        'netmask': {
            '_self': {
            'mapping_to': 'netmask',
            'is_required': True,
            'field': 'general',
            }
        },
        'interface': {
            '_self': {
            'mapping_to': 'interface',
            'is_required': True,
            'field': 'general',
            }
        }
    },

    'onos_nic': {
        '_self': {
            'mapping_to': 'onos_nic',
            'is_required': False,
            'field': 'general',
            'default_value': 'eth2'
        }
    },

    'openo_net': {
        '_self': {
            'mapping_to': 'openo_net',
            'is_required': False
        },

        'openo_ip': {
            '_self': {
            'mapping_to': 'openo_ip',
            'is_required': False,
            'field': 'general',
            }
        },
        'openo_docker_gw': {
            '_self': {
            'mapping_to': 'openo_docker_gw',
            'is_required': False,
            'field': 'general',
            }
        },
        'openo_docker_cidr': {
            '_self': {
            'mapping_to': 'openo_docker_cidr',
            'is_required': False,
            'field': 'general',
            }
        }
    },


    'public_net_info': {
        '_self': {
            'mapping_to': 'public_net_info'
        },

        'enable': {
            '_self': {
            'mapping_to': 'enable',
            'is_required': False,
            'field': 'anytype',
            'default_value': True
            }
        },

        'network': {
            '_self': {
            'mapping_to': 'network',
            'is_required': True,
            'field': 'general',
            'default_value': 'ext-net'
            }
        },

        'type': {
            '_self': {
            'mapping_to': 'type',
            'is_required': True,
            'field': 'general',
            'options': ['flat', 'vlan'],
            'default_value': 'vlan'
            }
        },

        'segment_id': {
            '_self': {
            'mapping_to': 'segment_id',
            'is_required': False,
            'field': 'anytype'
            }
        },

        'subnet': {
            '_self': {
            'mapping_to': 'subnet',
            'is_required': True,
            'field': 'general',
            'default_value': 'ext-subnet'
            }
        },

        'provider_network': {
            '_self': {
            'mapping_to': 'provider_network',
            'is_required': True,
            'field': 'general',
            'default_value': 'physnet'
            }
        },

        'router': {
            '_self': {
            'mapping_to': 'router',
            'is_required': True,
            'field': 'general',
            'default_value': 'ext-router'
            }
        },

        'enable_dhcp': {
            '_self': {
            'mapping_to': 'enable_dhcp',
            'is_required': True,
            'field': 'anytype'
            }
        },

        'no_gateway': {
            '_self': {
            'mapping_to': 'no_gateway',
            'is_required': True,
            'field': 'anytype'
            }
        },

        'external_gw': {
            '_self': {
            'mapping_to': 'external_gw',
            'is_required': False,
            'field': 'general'
            }
        },

        'floating_ip_cidr': {
            '_self': {
            'mapping_to': 'floating_ip_cidr',
            'is_required': True,
            'field': 'general'
            }
        },

        'floating_ip_start': {
            '_self': {
            'mapping_to': 'floating_ip_start',
            'is_required': True,
            'field': 'general'
            }
        },

        'floating_ip_end': {
            '_self': {
            'mapping_to': 'floating_ip_end',
            'is_required': True,
            'field': 'general'
            }
        }
    },
    },
    'neutron_config': {
        '_self': {
            'mapping_to': 'neutron_config'
        },
        'openvswitch': {
            '_self': {
                'mapping_to': 'openvswitch',
                'required_in_whole_config': True
            },
            'tenant_network_type': {
                '_self': {
                    'mapping_to': 'tenant_network_type',
                    'is_required': True,
                    'field': 'general',
                    'options': ['gre', 'vlan'],
                    'default_value': 'gre'
                }
            },
            'network_vlan_ranges': {
                '_self': {
                    'mapping_to': 'vlan_ranges',
                    'is_required': False,
                    'field': 'general_list',
                    'default_value': ['physnet1:2700:2999']
                }
            },
            'bridge_mappings': {
                '_self': {
                    'mapping_to': 'bridge_mappings',
                    'is_required': False,
                    'field': 'general_list',
                    'default_value': ['physnet1:br-eth1']
                }
            },
            'tunnel_id_ranges': {
                '_self': {
                    'mapping_to': 'tunnel_id_ranges',
                    'is_required': False,
                    'field': 'general_list',
                    'default_value': ['1:1000']
                }
            }
        }
    },
    'network_mapping': {
        '_self': {
            'required_in_whole_config': True,
                'key_extensions': {
                '$interface_type': ['install']
            }
        },
        '$interface_type': {
            '_self': {
                'required_in_whole_config': True,
                'field': 'anytype',
                'autofill_callback': autofill_network_mapping,
                'mapping_to': '$interface_type'
            },
            'interface': {
                '_self': {
                    'is_required': True,
                    'field': 'general',
                }
            },
            'subnet': {
                '_self': {
                    'is_required': False,
                    'field': 'general'
                }
            }
        }
    },

}