1 #ifndef METADATA_INCLUDED
2 #define METADATA_INCLUDED
3 /*************************************************************************//**
5 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 ****************************************************************************/
20 /**************************************************************************//**
22 * Wrap the OpenStack metadata service.
24 ****************************************************************************/
28 /**************************************************************************//**
29 * Download metadata from the OpenStack metadata service.
31 * @param verbosity Controls whether to generate debug to stdout. Zero:
32 * none. Non-zero: generate debug.
33 * @returns Status code
34 * @retval EVEL_SUCCESS On success
35 * @retval ::EVEL_ERR_CODES On failure.
36 *****************************************************************************/
37 EVEL_ERR_CODES openstack_metadata(int verbosity);
39 /**************************************************************************//**
40 * Initialize default values for vm_name and vm_uuid - for testing purposes.
41 *****************************************************************************/
42 void openstack_metadata_initialize();
44 /**************************************************************************//**
45 * Get the VM name provided by the metadata service.
48 *****************************************************************************/
49 const char *openstack_vm_name();
51 /**************************************************************************//**
52 * Get the VM UUID provided by the metadata service.
55 *****************************************************************************/
56 const char *openstack_vm_uuid();