{ "$id": "deviceDocument", "description": "An imported device", "type": "object", "properties": { "_id": { "$ref": "common#/definitions/mongoObjectId" }, "name": { "$ref": "common#/definitions/standardName" }, "description": { "$ref": "common#/definitions/standardDescription" }, "lastSync": { "type": "string", "format": "date-time", "description": "Last date and time a device was synced to Policy Manager" }, "ipaddress": { "type": "string", "examples": [ "10.1.6.100" ] }, "port": { "type": "string", "examples": [ "22" ] }, "ostype": { "type": "string", "examples": [ "cisco-ios-xr" ] }, "targets": { "type": "array", "title": "targets", "description": "An array of targets on the device.", "items": { "type": "object", "description": "An individual target", "properties": { "name": { "$ref": "common#/definitions/standardName" }, "policyType": { "$ref": "common#/definitions/policyType" }, "policyReference": { "oneOf": [ { "type": "null" }, { "$ref": "common#/definitions/mongoObjectId" } ] }, "sourceNetworks": { "type": "array", "title": "sourceNetworks", "description:": "List of source addresses on the target", "items": { "type": "string", "oneOf": [ { "type": "string", "pattern": "^a.b.c.d/xy (TODO -- ipv4 cidr pattern)", "examples": [ "192.168.0.92", "192.168.000.92", "192.168.0.92/8" ] }, { "type": "string", "pattern": "^a.b.c.d/xy (TODO -- ipv6 cidr pattern)", "examples": [ "2001:db8:a0b:12f0::1/64" ] }, { "type": "string", "pattern": "^a.b.c.d/xy (TODO -- mac pattern)", "examples": [ "00:1B:44:11:3A:B7" ] } ] } }, "destinationNetworks": { "type": "array", "title": "destinationAddresses", "description:": "List of destination addresses on the target", "items": { "type": "string", "oneOf": [ { "type": "string", "pattern": "^a.b.c.d/xy (TODO -- ipv4 cidr pattern)", "examples": [ "192.168.0.92", "192.168.000.92", "192.168.0.92/8" ] }, { "type": "string", "pattern": "^a.b.c.d/xy (TODO -- ipv6 cidr pattern)", "examples": [ "2001:db8:a0b:12f0::1/64" ] }, { "type": "string", "pattern": "^a.b.c.d/xy (TODO -- mac pattern)", "examples": [ "00:1B:44:11:3A:B7" ] } ] } } } } }, "additionalProperties": true } }