~ubuntu-branches/ubuntu/raring/eucalyptus/raring

« back to all changes in this revision

Viewing changes to storage/img.h

  • Committer: Package Import Robot
  • Author(s): Brian Thomason
  • Date: 2011-11-29 13:17:52 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 185.
  • Revision ID: package-import@ubuntu.com-20111129131752-rq31al3ntutv2vvl
Tags: upstream-3.0.999beta1
ImportĀ upstreamĀ versionĀ 3.0.999beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- mode: C; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
 
2
// vim: set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
 
3
 
 
4
#ifndef IMG_H
 
5
#define IMG_H
 
6
 
 
7
#define SIZE 512
 
8
 
 
9
typedef struct _img_creds {
 
10
    enum { NONE, PASSWORD, X509CREDS, SSHKEY } type;
 
11
    char login [SIZE];
 
12
    char password [SIZE];
 
13
    char pk_path [SIZE];
 
14
    char cert_path [SIZE];
 
15
    char ssh_key_path [SIZE];
 
16
} img_creds;
 
17
 
 
18
typedef struct _img_loc {
 
19
    enum { PATH, HTTP, HTTPS, VSPHERE, WALRUS, SFTP } type;
 
20
    char url [SIZE];
 
21
    char path [SIZE]; // dir/file
 
22
    char dir [SIZE];
 
23
    char file [SIZE];
 
24
    char host [SIZE];
 
25
    char params [SIZE];
 
26
    int port;
 
27
    char vsphere_dc [SIZE];
 
28
    char vsphere_ds [SIZE];
 
29
    char vsphere_vmx_ds [SIZE];
 
30
    char vsphere_vmx_path [SIZE];
 
31
    img_creds creds;
 
32
} img_loc;
 
33
 
 
34
typedef struct _img_spec {
 
35
    //    enum { EMI, EKI, ERI, DISK, VDDK } type;
 
36
    char id [SIZE];
 
37
    img_loc location;
 
38
    int size;
 
39
} img_spec;
 
40
 
 
41
int parse_img_spec (img_loc * loc, const char * str);
 
42
void print_img_spec (const char * name, const img_spec * spec);
 
43
 
 
44
#endif