文档首页 > > API参考> API> 边缘节点管理> 注册边缘节点

注册边缘节点

分享
更新时间: 2019/11/18 GMT+08:00

功能介绍

该API用于注册一个边缘节点。

接口调用成功后,您可以将响应消息体中node.package字段使用base64解码成tar.gz文件,并下载边缘核心软件纳管边缘节点,具体方法请参见https://console.huaweicloud.com/ief2.0/#/app/coreSoftware

URI

POST /v2/{project_id}/edgemgr/nodes
表1 参数描述

名称

是否必选

描述

project_id

项目ID,获取方法请参见获取项目ID

请求消息

请求参数
表2 参数描述

参数

是否必选

类型

描述

name

String

边缘节点名称,只允许中文字符、英文字母、数字、下划线、中划线,最大长度64

Name为必填字段,且本账号中唯一。

description

String

边缘节点描述,最大长度255,不允许^ ~ # $ % & * < > ( ) [ ] { } ' " \

enable_gpu

Boolean

边缘节点是否开启GPU,默认为false

log_configs

Array of 表2 object

边缘设备日志配置

device_infos

Array of 表3 object

关联设备信息

enable_npu

Boolean

边缘节点是否开启NPU,true表示开启,false表示不开启,默认为false

attributes

Array of 表27 object

边缘节点属性,关联属性个数最多为32个

enable_docker

Boolean

边缘节点时候启用Docker,默认为true

tags

Array of 表28 object

边缘节点标签,标签个数最多为20个

请求示例:

{
    "node": {
        "name": "node_test7",
        "description": "This is a test node",
        "enable_gpu": false,
        "enable_npu": false,
        "log_configs": [
            {
                "component": "app",
                "type": "local",
                "level": "debug",
                "size": 100,
                "rotate_num": 5,
                "rotate_period": "daily"
            }
        ],
        "device_infos": [
            {
                "relation": "cameraDevice",
                "comment": "Factory",
                "device_ids": [
                    "e90f14d8-207a-4ce2-8160-e5a9aca2c480"
                ]
            }
        ],
        "tags": [
            {
                "key": "ief-node-type",
                "value": "test"
            }
        ]
    }
}

响应消息

响应参数:
表3 参数描述

参数

类型

描述

node

表1 object

边缘节点详细信息

响应参数示例:

{
    "node": {
        "enable_npu": false,
        "edged_version": "2.7.0",
        "mqtt_internal": "tls://0.0.0.0:8883",
        "ca": "Ca...",
        "certificate": "Certificate...",
        "private_key": "Private_key...",
        "updated_at": "2019-11-06T13:00:26.724285+08:00",
        "node_type": null,
        "docker_enable": true,
        "device_infos": [],
        "upgrade_history": [
            {
                "to_version": "2.7.0",
                "upgrade_time": 1573041390,
                "result": "install_success",
                "id": 0
            }
        ],
        "pause_docker_image": null,
        "ntp_configs": {
            "ntp_servers": [
                "127.127.1.0",
                "ntp.example.com"
            ],
            "ntp_enabled": true
        },
        "ief_node_version": "2.7.0",
        "id": "57f3fa2a-cf07-4958-88d3-8479282ea716",
        "device_num": 0,
        "nics": [
            {
                "interface": "eth0",
                "ip": "192.168.0.121"
            }
        ],
        "gpu_num": 0,
        "os_version": "3.10.0-957.21.3.el7.x86_64",
        "state": "RUNNING",
        "error_reason": null,
        "memory": 1837,
        "mqtt_mode": "internal",
        "project_id": "42f7e2d36787473a90979d4d5a0a57bb",
        "os_name": "CentOS Linux 7 (Core)",
        "description": "",
        "gpu_info": [],
        "mqtt_external": null,
        "arch": "x86_64",
        "host_ips": [
            "192.168.0.121"
        ],
        "enable_gpu": false,
        "name": "ief_node_test",
        "deployment_num": 0,
        "package": null,
        "container_runtime_version": "docker://18.09.8",
        "created_at": "2019-11-06T11:54:25.402541+08:00",
        "cpu": 1,
        "product_id": null,
        "host_name": "liufen3",
        "attributes": [],
        "os_type": "linux",
        "log_configs": [
            {
                "level": "on",
                "rotate_num": 5,
                "component": "app",
                "rotate_period": "daily",
                "type": "local",
                "id": "6d0c7497-0042-4330-8765-2dbf96a05afe",
                "size": 50
            },
            {
                "level": "off",
                "rotate_num": 5,
                "component": "system",
                "rotate_period": "yearly",
                "type": "LTS",
                "id": "0b853ca4-9831-43e5-ba54-0313a63f9e89",
                "size": 50
            },
            {
                "level": "off",
                "rotate_num": 5,
                "component": "app",
                "rotate_period": "yearly",
                "type": "LTS",
                "id": "bb4ac8d0-1a43-43ae-8642-c358db9171e1",
                "size": 50
            },
            {
                "level": "info",
                "rotate_num": 5,
                "component": "system",
                "rotate_period": "daily",
                "type": "local",
                "id": "bb5772a9-0734-4785-b80a-4b2723c58f68",
                "size": 50
            }
        ]
    }
}

状态码

状态码请参见状态码

分享:

    相关文档

    相关产品

文档是否有解决您的问题?

提交成功!

非常感谢您的反馈,我们会继续努力做到更好!

反馈提交失败,请稍后再试!

*必选

请至少选择或填写一项反馈信息

字符长度不能超过200

提交反馈 取消

如您有其它疑问,您也可以通过华为云社区问答频道来与我们联系探讨

跳转到云社区