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