AT&T ECOMP Vendor Event Listener library
0.1
|
Wrap the OpenStack metadata service. More...
#include <string.h>
#include <assert.h>
#include <malloc.h>
#include <curl/curl.h>
#include "evel.h"
#include "evel_internal.h"
#include "jsmn.h"
#include "metadata.h"
Go to the source code of this file.
Macros | |
#define | MAX_METADATA_STRING 64 |
Size of fields extracted from metadata service. More... | |
Functions | |
EVEL_ERR_CODES | openstack_metadata (int verbosity) |
Download metadata from the OpenStack metadata service. More... | |
void | openstack_metadata_initialize () |
Initialize default values for vm_name and vm_uuid - for testing purposes. More... | |
const char * | openstack_vm_name () |
Get the VM name provided by the metadata service. More... | |
const char * | openstack_vm_uuid () |
Get the VM UUID provided by the metadata service. More... | |
Wrap the OpenStack metadata service.
Copyright(c) <2016>, AT&T Intellectual Property. All other rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY AT&T INTELLECTUAL PROPERTY ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AT&T INTELLECTUAL PROPERTY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file metadata.c.
#define MAX_METADATA_STRING 64 |
Size of fields extracted from metadata service.
Definition at line 64 of file metadata.c.
EVEL_ERR_CODES openstack_metadata | ( | int | verbosity | ) |
Download metadata from the OpenStack metadata service.
verbosity | Controls whether to generate debug to stdout. Zero: none. Non-zero: generate debug. |
EVEL_SUCCESS | On success |
EVEL_ERR_CODES | On failure. |
Definition at line 105 of file metadata.c.
void openstack_metadata_initialize | ( | ) |
Initialize default values for vm_name and vm_uuid - for testing purposes.
Definition at line 328 of file metadata.c.
const char* openstack_vm_name | ( | ) |
Get the VM name provided by the metadata service.
Definition at line 594 of file metadata.c.
const char* openstack_vm_uuid | ( | ) |
Get the VM UUID provided by the metadata service.
Definition at line 604 of file metadata.c.