Add License to VES library
[demo.git] / vnfs / VES / code / evel_library / metadata.h
1 #ifndef METADATA_INCLUDED
2 #define METADATA_INCLUDED
3 /**************************************************************************//**
4  * @file
5  * Wrap the OpenStack metadata service.
6  *
7  * License
8  * -------
9  *
10  * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
11  *
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
16  *
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  *****************************************************************************/
23
24
25 #include "evel.h"
26
27 /**************************************************************************//**
28  * Download metadata from the OpenStack metadata service.
29  *
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);
37
38 /**************************************************************************//**
39  * Initialize default values for vm_name and vm_uuid - for testing purposes.
40  *****************************************************************************/
41 void openstack_metadata_initialize();
42
43 /**************************************************************************//**
44  * Get the VM name provided by the metadata service.
45  *
46  * @returns VM name
47  *****************************************************************************/
48 const char *openstack_vm_name();
49
50 /**************************************************************************//**
51  * Get the VM UUID provided by the metadata service.
52  *
53  * @returns VM UUID
54  *****************************************************************************/
55 const char *openstack_vm_uuid();
56
57 #endif