diff options
| author | KubeEdge Bot <48982446+kubeedge-bot@users.noreply.github.com> | 2020-07-28 10:30:06 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-28 10:30:06 +0800 |
| commit | 6236a744620b16974f42739fb6e95912ae85e100 (patch) | |
| tree | 8f2539426c936d426b58a5a9dcdd8c9b7ef61e18 /build | |
| parent | Merge pull request #1970 from Congrool/master (diff) | |
| parent | add v1alpha1 device crd back (diff) | |
| download | kubeedge-6236a744620b16974f42739fb6e95912ae85e100.tar.gz | |
Merge pull request #1985 from fisherxu/add-v1alpha1
Add v1alpha1 device crd back
Diffstat (limited to 'build')
| -rw-r--r-- | build/crds/devices/devices_v1alpha1_device.yaml | 216 | ||||
| -rw-r--r-- | build/crds/devices/devices_v1alpha1_devicemodel.yaml | 225 |
2 files changed, 441 insertions, 0 deletions
diff --git a/build/crds/devices/devices_v1alpha1_device.yaml b/build/crds/devices/devices_v1alpha1_device.yaml new file mode 100644 index 000000000..c13a97ae6 --- /dev/null +++ b/build/crds/devices/devices_v1alpha1_device.yaml @@ -0,0 +1,216 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + labels: + controller-tools.k8s.io: "1.0" + name: devices.devices.kubeedge.io +spec: + group: devices.kubeedge.io + names: + kind: Device + plural: devices + scope: Namespaced + validation: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + deviceModelRef: + description: 'Required: DeviceModelRef is reference to the device model + used as a template to create the device instance.' + type: object + nodeSelector: + description: NodeSelector indicates the binding preferences between + devices and nodes. Refer to k8s.io/kubernetes/pkg/apis/core NodeSelector + for more details + type: object + protocol: + description: 'Required: The protocol configuration used to connect to + the device.' + properties: + bluetooth: + description: Protocol configuration for bluetooth + properties: + macAddress: + description: Unique identifier assigned to the device. + type: string + type: object + modbus: + description: Protocol configuration for modbus + properties: + rtu: + properties: + baudRate: + description: Required. BaudRate 115200|57600|38400|19200|9600|4800|2400|1800|1200|600|300|200|150|134|110|75|50 + format: int64 + type: integer + enum: + - 115200 + - 57600 + - 38400 + - 19200 + - 9600 + - 4800 + - 2400 + - 1800 + - 1200 + - 600 + - 300 + - 200 + - 150 + - 134 + - 110 + - 75 + - 50 + dataBits: + description: Required. Valid values are 8, 7, 6, 5. + format: int64 + type: integer + enum: + - 8 + - 7 + - 6 + - 5 + parity: + description: Required. Valid options are "none", "even", + "odd". Defaults to "none". + type: string + enum: + - none + - even + - odd + serialPort: + description: Required. + type: string + slaveID: + description: Required. 0-255 + format: int64 + type: integer + minimum: 0 + maximum: 255 + stopBits: + description: Required. Bit that stops 1|2 + format: int64 + type: integer + enum: + - 1 + - 2 + required: + - baudRate + - dataBits + - parity + - serialPort + - slaveID + - stopBits + type: object + tcp: + properties: + ip: + description: Required. + type: string + port: + description: Required. + format: int64 + type: integer + slaveID: + description: Required. + type: string + required: + - ip + - port + - slaveID + type: object + type: object + opcua: + description: Protocol configuration for opc-ua + properties: + certificate: + description: Certificate for access opc server. + type: string + password: + description: Password for access opc server. + type: string + privateKey: + description: PrivateKey for access opc server. + type: string + securityMode: + description: Defaults to "none". + type: string + securityPolicy: + description: Defaults to "none". + type: string + timeout: + description: Timeout seconds for the opc server connection.??? + format: int64 + type: integer + url: + description: 'Required: The URL for opc server endpoint.' + type: string + userName: + description: Username for access opc server. + type: string + required: + - url + type: object + type: object + required: + - deviceModelRef + - nodeSelector + type: object + status: + properties: + twins: + description: A list of device twins containing desired/reported desired/reported + values of twin properties. A passive device won't have twin properties + and this list could be empty. + items: + properties: + desired: + description: 'Required: the desired property value.' + properties: + metadata: + description: Additional metadata like timestamp when the value + was reported etc. + type: object + value: + description: 'Required: The value for this property.' + type: string + required: + - value + type: object + propertyName: + description: 'Required: The property name for which the desired/reported + values are specified. This property should be present in the + device model.' + type: string + reported: + description: 'Required: the reported property value.' + properties: + metadata: + description: Additional metadata like timestamp when the value + was reported etc. + type: object + value: + description: 'Required: The value for this property.' + type: string + required: + - value + type: object + required: + - propertyName + type: object + type: array + type: object + version: v1alpha1 diff --git a/build/crds/devices/devices_v1alpha1_devicemodel.yaml b/build/crds/devices/devices_v1alpha1_devicemodel.yaml new file mode 100644 index 000000000..6e87e2004 --- /dev/null +++ b/build/crds/devices/devices_v1alpha1_devicemodel.yaml @@ -0,0 +1,225 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: devicemodels.devices.kubeedge.io +spec: + group: devices.kubeedge.io + names: + kind: DeviceModel + plural: devicemodels + scope: Namespaced + validation: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + properties: + description: 'Required: List of device properties.' + items: + properties: + description: + description: The device property description. + type: string + name: + description: 'Required: The device property name.' + type: string + type: + description: 'Required: PropertyType represents the type and data + validation of the property.' + properties: + int: + properties: + accessMode: + description: 'Required: Access mode of property, ReadWrite + or ReadOnly.' + type: string + enum: + - ReadOnly + - ReadWrite + defaultValue: + format: int64 + type: integer + maximum: + format: int64 + type: integer + minimum: + format: int64 + type: integer + unit: + description: The unit of the property + type: string + required: + - accessMode + type: object + string: + properties: + accessMode: + description: 'Required: Access mode of property, ReadWrite + or ReadOnly.' + type: string + enum: + - ReadOnly + - ReadWrite + defaultValue: + type: string + required: + - accessMode + type: object + type: object + required: + - name + - type + type: object + type: array + propertyVisitors: + description: 'Required: List of property visitors which describe how + to access the device properties. PropertyVisitors must unique by propertyVisitor.propertyName.' + items: + properties: + bluetooth: + description: Bluetooth represents a set of additional visitor + config fields of bluetooth protocol. + properties: + characteristicUUID: + description: 'Required: Unique ID of the corresponding operation' + type: string + dataConverter: + description: Responsible for converting the data being read + from the bluetooth device into a form that is understandable + by the platform + properties: + endIndex: + description: 'Required: Specifies the end index of incoming + byte stream to be considered to convert the data the + value specified should be inclusive for example if 3 + is specified it includes the third index' + format: int64 + type: integer + orderOfOperations: + description: Specifies in what order the operations(which + are required to be performed to convert incoming data + into understandable form) are performed + items: + properties: + operationType: + description: 'Required: Specifies the operation + to be performed to convert incoming data' + type: string + enum: + - Add + - Subtract + - Multiply + - Divide + operationValue: + description: 'Required: Specifies with what value + the operation is to be performed' + format: double + type: number + type: object + type: array + shiftLeft: + description: Refers to the number of bits to shift left, + if left-shift operation is necessary for conversion + format: int64 + type: integer + shiftRight: + description: Refers to the number of bits to shift right, + if right-shift operation is necessary for conversion + format: int64 + type: integer + startIndex: + description: 'Required: Specifies the start index of the + incoming byte stream to be considered to convert the + data. For example: start-index:2, end-index:3 concatenates + the value present at second and third index of the incoming + byte stream. If we want to reverse the order we can + give it as start-index:3, end-index:2' + format: int64 + type: integer + required: + - endIndex + - startIndex + type: object + dataWrite: + description: 'Responsible for converting the data coming from + the platform into a form that is understood by the bluetooth + device For example: "ON":[1], "OFF":[0]' + type: object + required: + - characteristicUUID + type: object + modbus: + description: Modbus represents a set of additional visitor config + fields of modbus protocol. + properties: + isRegisterSwap: + description: Indicates whether the high and low register swapped. + Defaults to false. + type: boolean + isSwap: + description: Indicates whether the high and low byte swapped. + Defaults to false. + type: boolean + limit: + description: 'Required: Limit number of registers to read/write.' + format: int64 + type: integer + offset: + description: 'Required: Offset indicates the starting register + number to read/write data.' + format: int64 + type: integer + register: + description: 'Required: Type of register' + type: string + enum: + - CoilRegister + - DiscreteInputRegister + - InputRegister + - HoldingRegister + scale: + description: The scale to convert raw property data into final + units. Defaults to 1.0 + format: double + type: number + required: + - limit + - offset + - register + type: object + opcua: + description: Opcua represents a set of additional visitor config + fields of opc-ua protocol. + properties: + browseName: + description: The name of opc-ua node + type: string + nodeID: + description: 'Required: The ID of opc-ua node, e.g. "ns=1,i=1005"' + type: string + required: + - nodeID + type: object + propertyName: + description: 'Required: The device property name to be accessed. + This should refer to one of the device properties defined in + the device model.' + type: string + required: + - propertyName + type: object + type: array + type: object + version: v1alpha1 |
