-
Notifications
You must be signed in to change notification settings - Fork 1
/
mano_records.go
152 lines (131 loc) · 7.35 KB
/
mano_records.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
package catalogue
type LinkStatus string
const (
LinkDown = LinkStatus("LINKDOWN")
LinkNormalOperation = LinkStatus("NORMALOPERATION")
LinkDegradeOperation = LinkStatus("DEGRADEDOPERATION")
LinkOfflineThroughManagementAction = LinkStatus("OFFLINETHROUGHMANAGEMENTACTION")
)
// Component represents a generic component.
type Component interface{}
// NetworkServiceRecord as defined by ETSI GS NFV-MAN 001 V1.1.1 (2014-12)
type NetworkServiceRecord struct {
ID string `json:"id,omitempty"`
AutoScalePolicy []*AutoScalePolicy `json:"auto_scale_policy"`
ConnectionPoint []*ConnectionPoint `json:"connection_point"`
MonitoringParameter []string `json:"monitoring_parameterid"`
ServiceDeploymentFlavour NetworkServiceDeploymentFlavour `json:"service_deployment_flavour"`
Vendor string `json:"vendor"`
ProjectID string `json:"projectId"`
Task string `json:"task"`
Version string `json:"version"`
VLR []*VirtualLinkRecord `json:"vlr"`
VNFR []*VirtualNetworkFunctionRecord `json:"vnfr"`
VNFDependency []*VNFRecordDependency `json:"vnf_dependency"`
LifecycleEvents LifecycleEvents `json:"lifecycle_event"`
VNFFGR []*VNFForwardingGraphRecord `json:"vnffgr"`
PNFR []*PhysicalNetworkFunctionRecord `json:"pnfr"`
FaultManagementPolicy []*FaultManagementPolicy `json:"faultManagementPolicy"`
DescriptorReference string `json:"descriptor_reference"`
ResourceReservation string `json:"resource_reservation"`
RuntimePolicyInfo string `json:"runtime_policy_info"`
Status Status `json:"status"`
Notification string `json:"notification"`
LifecycleEventHistory LifecycleEvents `json:"lifecycle_event_history"`
AuditLog string `json:"audit_log"`
CreatedAt string `json:"createdAt"`
KeyNames []string `json:"keyNames"`
Name string `json:"name"`
}
// PhysicalNetworkFunctionRecord based on ETSI GS NFV-MAN 001 V1.1.1 (2014-12)
type PhysicalNetworkFunctionRecord struct {
ID string `json:"id,omitempty"`
Vendor string `json:"vendor"`
Version string `json:"version"`
Description string `json:"description"`
ProjectID string `json:"projectId"`
ConnectionPoint []*ConnectionPoint `json:"connection_point"`
ParentNSID string `json:"parent_ns_id"`
DescriptorReference string `json:"descriptor_reference"`
VNFFGR []*VNFForwardingGraphRecord `json:"vnffgr"`
OamReference string `json:"oam_reference"`
ConnectedVirtualLink []*VirtualLinkRecord `json:"connected_virtual_link"`
PNFAddress []string `json:"pnf_address"`
}
type Policy struct {
ID string `json:"id,omitempty"`
Version int `json:"version"`
}
type Status string
const (
// Error
StatusError = Status("ERROR")
// Null
StatusNull = Status("NULL")
//Instantiated - Not Configured
StatusInitialized = Status("INITIALIZED")
// Inactive - Configured
StatusInactive = Status("INACTIVE")
// Scaling
StatusScaling = Status("SCALING")
// Active - Configured
StatusActive = Status("ACTIVE")
// Terminated
StatusTerminated = Status("TERMINATED")
// Resuming
StatusResuming = Status("RESUMING")
)
type VirtualLinkRecord struct {
VirtualLink
Vendor string `json:"vendor"`
Version string `json:"version"`
NumberOfEndpoints int `json:"number_of_endpoints"`
ParentNs string `json:"parent_ns"`
VNFFGRReference []*VNFForwardingGraphRecord `json:"vnffgr_reference"`
DescriptorReference string `json:"descriptor_reference"`
VimID string `json:"vim_id"`
AllocatedCapacity []string `json:"allocated_capacity"`
Status LinkStatus `json:"status"`
Notification []string `json:"notification"`
LifecycleEventHistory LifecycleEvents `json:"lifecycle_event_history"`
AuditLog []string `json:"audit_log"`
Connection []string `json:"connection"`
}
type VNFCInstance struct {
VNFComponent
VIMID string `json:"vim_id"`
VCID string `json:"vc_id"`
Hostname string `json:"hostname"`
State string `json:"state"`
NestedVNFComponent *VNFComponent `json:"vnfComponent,omitempty"`
FloatingIPs []*Ip `json:"floatingIps"`
IPs []*Ip `json:"ips"`
}
// Based on ETSI GS NFV-MAN 001 V1.1.1 (2014-12)
type VNFForwardingGraphRecord struct {
ID string `json:"id,omitempty"`
DescriptorReference *VNFForwardingGraphDescriptor `json:"descriptor_reference"`
ParentNS *NetworkServiceRecord `json:"parent_ns"`
DependentVirtualLink []*VirtualLinkRecord `json:"dependent_virtual_link"`
Status *Status `json:"status,omitempty"`
Notification []string `json:"notification"`
LifecycleEventHistory LifecycleEvents `json:"lifecycle_event_history"`
AuditLog string `json:"audit_log"`
NetworkForwardingPath *NetworkForwardingPath `json:"network_forwarding_path,omitempty"`
ConnectionPoint []*VNFDConnectionPoint `json:"connection_point"`
MemberVNFs []*VirtualNetworkFunctionRecord `json:"member_vnfs"`
Vendor string `json:"vendor"`
Version string `json:"version"`
NumberOfEndpoints int `json:"number_of_endpoints"`
NumberOfVNFs int `json:"number_of_vnfs"`
NumberOfPNFs int `json:"number_of_pnfs"`
NumberOfVirtualLinks int `json:"number_of_virtual_links"`
}
type VNFRecordDependency struct {
ID string `json:"id,omitempty"`
Version int `json:"version"`
Target string `json:"target"`
Parameters map[string]*DependencyParameters `json:"parameters"`
VNFCParameters map[string]*VNFCDependencyParameters `json:"vnfcParameters"`
IDType map[string]string `json:"idType"`
}