1 | var mongoose = require('mongoose'),
|
2 | Schema = mongoose.Schema;
|
3 |
|
4 |
|
5 | var hostsSchema = new Schema({
|
6 | regionId: { type: String },
|
7 | hostId: { type: String },
|
8 | ipAddress: { type: String },
|
9 | ip_address: {local_ip: { type: String },
|
10 | public_ip : { type: String },
|
11 | private_federation_ip : { type: String }},
|
12 |
|
13 | hostname: { type: String },
|
14 |
|
15 |
|
16 | type: { type: String, enum:
|
17 | ['phy', 'vm']
|
18 | },
|
19 |
|
20 | description: { type: String },
|
21 | port_NAM: { type: String },
|
22 | ping_status: { type: Boolean },
|
23 | bdw_status: { type: Boolean },
|
24 | owd_status: { type: Boolean },
|
25 | packetLoss_status: { type: Boolean },
|
26 |
|
27 | OWD_endpoint_dest_schedule: [{ regionId: { type: String },
|
28 | hostId : { type: String },
|
29 | frequency: { type: Number },
|
30 | type: { type: String, enum:
|
31 | ['owd']
|
32 | }
|
33 | }],
|
34 |
|
35 | BDW_endpoint_dest_schedule: [{ regionId: { type: String },
|
36 | hostId : { type: String },
|
37 | frequency: { type: Number },
|
38 | type: { type: String, enum:
|
39 | ['bdw']
|
40 | }
|
41 |
|
42 | }]
|
43 |
|
44 |
|
45 | });
|
46 |
|
47 | module.exports = mongoose.model('hosts', hostsSchema); |
\ | No newline at end of file |