Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ibm cloud 如何使用RESTAPI部署vyatta_Ibm Cloud_Ibm Cloud Infrastructure - Fatal编程技术网

Ibm cloud 如何使用RESTAPI部署vyatta

Ibm cloud 如何使用RESTAPI部署vyatta,ibm-cloud,ibm-cloud-infrastructure,Ibm Cloud,Ibm Cloud Infrastructure,我正在尝试使用RESTAPI在软层环境中部署Vyatta,并希望了解如何实现它。我确实看到了一个python客户机来实现这一点,但是我们不能使用这两个选项中的任何一个,即python/PHP/JAVA,并且必须只使用RESTAPI来将网络设备部署到软层基础设施 我尝试使用CLI,但它不查询操作系统代码 有人知道如何使用RestAPI/CLI.部署vyatta吗?或者我如何查询操作系统代码和网络VLAN来部署vyatta 谢谢,, 安妮什 要使用slcliclient下单,您可以参考上述文档

我正在尝试使用RESTAPI在软层环境中部署Vyatta,并希望了解如何实现它。我确实看到了一个python客户机来实现这一点,但是我们不能使用这两个选项中的任何一个,即python/PHP/JAVA,并且必须只使用RESTAPI来将网络设备部署到软层基础设施

我尝试使用CLI,但它不查询操作系统代码



有人知道如何使用RestAPI/CLI.部署vyatta吗?或者我如何查询操作系统代码和网络VLAN来部署vyatta

谢谢,, 安妮什

要使用
slcli
client下单,您可以参考上述文档

但是,以下是一个专门用于订购Vyatta网关设备的示例:

$ slcli order package-list | grep -i gateway
Network Gateway Appliance                                               NETWORK_GATEWAY_APPLIANCE                               BARE_METAL_GATEWAY                                  
Network Gateway Appliance Cluster                                       NETWORK_GATEWAY_APPLIANCE_CLUSTER                       GATEWAY_RESOURCE_GROUP                              
Network Gateway Appliance (10 Gbps)                                     2U_NETWORK_GATEWAY_APPLIANCE_1O_GBPS                    BARE_METAL_GATEWAY                                  
Virtual Router Appliance                                                VIRTUAL_ROUTER_APPLIANCE_1_GPBS                         BARE_METAL_GATEWAY                                  
Virtual Router Appliance (10 Gpbs)                                      VIRTUAL_ROUTER_APPLIANCE_10_GPBS                        BARE_METAL_GATEWAY
上面的命令是一个关于如何验证Vyatta命令的示例。根据您想要订购的口味,命令可能会有所不同。 您需要在命令中指定每个必需的类别,如下表所示。 一旦您对订单满意,您可以删除
--验证
,它将实际下订单

$ slcli order category-list NETWORK_GATEWAY_APPLIANCE
:........................................:.......................:............:
:                  name                  :      categoryCode     : isRequired :
:........................................:.......................:............:
:                 Server                 :         server        :     Y      :
:               Surcharges               :        premium        :     N      :
:            Operating System            :           os          :     Y      :
:                  RAM                   :          ram          :     Y      :
:            Disk Controller             :    disk_controller    :     Y      :
:            First Hard Drive            :         disk0         :     Y      :
:           Second Hard Drive            :         disk1         :     N      :
:            Third Hard Drive            :         disk2         :     N      :
:             SRIOV Enabled              :     sriov_enabled     :     Y      :
:           Fourth Hard Drive            :         disk3         :     N      :
:            Public Bandwidth            :       bandwidth       :     Y      :
:           Uplink Port Speeds           :       port_speed      :     Y      :
:           Remote Management            :   remote_management   :     Y      :
:          Primary IP Addresses          :    pri_ip_addresses   :     Y      :
:         Primary IPv6 Addresses         :   pri_ipv6_addresses  :     Y      :
:               Monitoring               :       monitoring      :     Y      :
:              Notification              :      notification     :     Y      :
:                Response                :        response       :     Y      :
:    VPN Management - Private Network    :     vpn_management    :     Y      :
: Vulnerability Assessments & Management : vulnerability_scanner :     Y      :
:........................................:.......................:............:

要使用
slcli
client下单,您可以参考上述文档

但是,以下是一个专门用于订购Vyatta网关设备的示例:

$ slcli order package-list | grep -i gateway
Network Gateway Appliance                                               NETWORK_GATEWAY_APPLIANCE                               BARE_METAL_GATEWAY                                  
Network Gateway Appliance Cluster                                       NETWORK_GATEWAY_APPLIANCE_CLUSTER                       GATEWAY_RESOURCE_GROUP                              
Network Gateway Appliance (10 Gbps)                                     2U_NETWORK_GATEWAY_APPLIANCE_1O_GBPS                    BARE_METAL_GATEWAY                                  
Virtual Router Appliance                                                VIRTUAL_ROUTER_APPLIANCE_1_GPBS                         BARE_METAL_GATEWAY                                  
Virtual Router Appliance (10 Gpbs)                                      VIRTUAL_ROUTER_APPLIANCE_10_GPBS                        BARE_METAL_GATEWAY
上面的命令是一个关于如何验证Vyatta命令的示例。根据您想要订购的口味,命令可能会有所不同。 您需要在命令中指定每个必需的类别,如下表所示。 一旦您对订单满意,您可以删除
--验证
,它将实际下订单

$ slcli order category-list NETWORK_GATEWAY_APPLIANCE
:........................................:.......................:............:
:                  name                  :      categoryCode     : isRequired :
:........................................:.......................:............:
:                 Server                 :         server        :     Y      :
:               Surcharges               :        premium        :     N      :
:            Operating System            :           os          :     Y      :
:                  RAM                   :          ram          :     Y      :
:            Disk Controller             :    disk_controller    :     Y      :
:            First Hard Drive            :         disk0         :     Y      :
:           Second Hard Drive            :         disk1         :     N      :
:            Third Hard Drive            :         disk2         :     N      :
:             SRIOV Enabled              :     sriov_enabled     :     Y      :
:           Fourth Hard Drive            :         disk3         :     N      :
:            Public Bandwidth            :       bandwidth       :     Y      :
:           Uplink Port Speeds           :       port_speed      :     Y      :
:           Remote Management            :   remote_management   :     Y      :
:          Primary IP Addresses          :    pri_ip_addresses   :     Y      :
:         Primary IPv6 Addresses         :   pri_ipv6_addresses  :     Y      :
:               Monitoring               :       monitoring      :     Y      :
:              Notification              :      notification     :     Y      :
:                Response                :        response       :     Y      :
:    VPN Management - Private Network    :     vpn_management    :     Y      :
: Vulnerability Assessments & Management : vulnerability_scanner :     Y      :
:........................................:.......................:............:

正如
@Xiang Wang
所评论的,应该可以使用
slcli order
命令进行订购

还有一些python和go中的示例,您可以尝试:

休息

下面是一个JSON结构的示例,您可以使用它来构建订单,考虑到价格可能会因包和位置的不同而变化,而且其中一些可能存在冲突

要检索价格列表,可以使用或

准备订购时,请使用placeOrder而不是verifyOrder

POST:
https://api.softlayer.com/rest/v3/SoftLayer_Product_Order/verifyOrder

PAYLOAD:

{
    "parameters": [{
        "orderContainers": [{
            "complexType": "SoftLayer_Container_Product_Order_Hardware_Server_Gateway_Appliance",
            "hardware": [
                {
                    "hostname": "gateway",
                    "domain": "softlayer.com"
                }
            ],
            "quantity": 1,
            "location": "AMSTERDAM",
            "packageId": 1055,
            "prices": [
                {
                    "id": 206251,
                    "item": { "description": "Single Intel Xeon E3-1270 v6 (4 Cores, 3.80 GHz)" }
                }, 
                {
                    "id": 209453,
                    "item": { "description": "16 GB RAM" }
                }, 
                {
                    "id": 201199,
                    "item": { "description": "Virtual Router Appliance 5.x (up to 2 Gbps) Subscription Edition (64 Bit)" }
                }, 
                {
                    "id": 32927,
                    "item": { "description": "Non-RAID" }
                }, 
                {
                    "id": 83483,
                    "item": { "description": "2.00 TB SATA" }
                }, 
                {
                    "id": 33867,
                    "item": { "description": "20000 GB Bandwidth Allotment" }
                }, 
                {
                    "id": 96817,
                    "item": { "description": "1 Gbps Public & Private Network Uplinks" }
                }, 
                {
                    "id": 80263,
                    "item": { "description": "Host Ping and TCP Service Monitoring" }
                }, 
                {
                    "id": 32627,
                    "item": { "description": "Automated Notification" }
                }, 
                {
                    "id": 35310,
                    "item": { "description": "Nessus Vulnerability Assessment & Reporting" }
                }, 
                {
                    "id": 32500,
                    "item": { "description": "Email and Ticket" }
                }, 
                {
                    "id": 25014,
                    "item": { "description": "Reboot / KVM over IP" }
                }, 
                {
                    "id": 212715,
                    "item": { "description": "SRIOV Enabled" }
                }, 
                {
                    "id": 34807,
                    "item": { "description": "1 IP Address" }
                }, 
                {
                    "id": 33483,
                    "item": { "description": "Unlimited SSL VPN Users & 1 PPTP VPN User per account" }
                }
            ]
        }]
    }]
}

如果需要高可用性设备(HA),则需要在
硬件
参数中指定两个硬件对象,数量必须为2。

正如
@Xiang Wang
所评论的,应该可以使用
slcli order
命令进行订购

还有一些python和go中的示例,您可以尝试:

休息

下面是一个JSON结构的示例,您可以使用它来构建订单,考虑到价格可能会因包和位置的不同而变化,而且其中一些可能存在冲突

要检索价格列表,可以使用或

准备订购时,请使用placeOrder而不是verifyOrder

POST:
https://api.softlayer.com/rest/v3/SoftLayer_Product_Order/verifyOrder

PAYLOAD:

{
    "parameters": [{
        "orderContainers": [{
            "complexType": "SoftLayer_Container_Product_Order_Hardware_Server_Gateway_Appliance",
            "hardware": [
                {
                    "hostname": "gateway",
                    "domain": "softlayer.com"
                }
            ],
            "quantity": 1,
            "location": "AMSTERDAM",
            "packageId": 1055,
            "prices": [
                {
                    "id": 206251,
                    "item": { "description": "Single Intel Xeon E3-1270 v6 (4 Cores, 3.80 GHz)" }
                }, 
                {
                    "id": 209453,
                    "item": { "description": "16 GB RAM" }
                }, 
                {
                    "id": 201199,
                    "item": { "description": "Virtual Router Appliance 5.x (up to 2 Gbps) Subscription Edition (64 Bit)" }
                }, 
                {
                    "id": 32927,
                    "item": { "description": "Non-RAID" }
                }, 
                {
                    "id": 83483,
                    "item": { "description": "2.00 TB SATA" }
                }, 
                {
                    "id": 33867,
                    "item": { "description": "20000 GB Bandwidth Allotment" }
                }, 
                {
                    "id": 96817,
                    "item": { "description": "1 Gbps Public & Private Network Uplinks" }
                }, 
                {
                    "id": 80263,
                    "item": { "description": "Host Ping and TCP Service Monitoring" }
                }, 
                {
                    "id": 32627,
                    "item": { "description": "Automated Notification" }
                }, 
                {
                    "id": 35310,
                    "item": { "description": "Nessus Vulnerability Assessment & Reporting" }
                }, 
                {
                    "id": 32500,
                    "item": { "description": "Email and Ticket" }
                }, 
                {
                    "id": 25014,
                    "item": { "description": "Reboot / KVM over IP" }
                }, 
                {
                    "id": 212715,
                    "item": { "description": "SRIOV Enabled" }
                }, 
                {
                    "id": 34807,
                    "item": { "description": "1 IP Address" }
                }, 
                {
                    "id": 33483,
                    "item": { "description": "Unlimited SSL VPN Users & 1 PPTP VPN User per account" }
                }
            ]
        }]
    }]
}

如果您想要高可用性设备(HA),则需要在
硬件
参数中指定两个硬件对象,数量必须为2。

感谢您提供的命令。您是否有类似的rest API………..它失败并出现错误。slcli订单位置--验证网络网关设备清洗07 OS_VYATTA_5600_5_X_UP_至1GBPS_订阅版本64位必须随订单指定复杂类型。我假设还有其他需要指定的参数,我尝试了一些组合,但失败了,出现了类似的错误。添加
--复杂类型的SoftLayer\u Container\u Product\u Order\u Hardware\u Server\u Gateway\u Appliance
,最后与我更新答案的示例类似,它有一个REST结构的示例,您可以使用它来构建订单谢谢您的命令。您是否有类似的REST API…………它失败了,出现了错误。slcli订单位置--验证网络网关设备清洗07 OS_VYATTA_5600_5_X_UP_至1GBPS_订阅版本64位必须随订单指定复杂类型。我假设还有其他需要指定的参数,我尝试了一些组合,但失败了,出现了类似的错误。添加
--复杂类型的SoftLayer\u Container\u Product\u Order\u Hardware\u Server\u Gateway\u Appliance
,最后与我更新答案的示例类似,它有一个可以用来构建订单的REST结构示例
POST:
https://api.softlayer.com/rest/v3/SoftLayer_Product_Order/verifyOrder

PAYLOAD:

{
    "parameters": [{
        "orderContainers": [{
            "complexType": "SoftLayer_Container_Product_Order_Hardware_Server_Gateway_Appliance",
            "hardware": [
                {
                    "hostname": "gateway",
                    "domain": "softlayer.com"
                }
            ],
            "quantity": 1,
            "location": "AMSTERDAM",
            "packageId": 1055,
            "prices": [
                {
                    "id": 206251,
                    "item": { "description": "Single Intel Xeon E3-1270 v6 (4 Cores, 3.80 GHz)" }
                }, 
                {
                    "id": 209453,
                    "item": { "description": "16 GB RAM" }
                }, 
                {
                    "id": 201199,
                    "item": { "description": "Virtual Router Appliance 5.x (up to 2 Gbps) Subscription Edition (64 Bit)" }
                }, 
                {
                    "id": 32927,
                    "item": { "description": "Non-RAID" }
                }, 
                {
                    "id": 83483,
                    "item": { "description": "2.00 TB SATA" }
                }, 
                {
                    "id": 33867,
                    "item": { "description": "20000 GB Bandwidth Allotment" }
                }, 
                {
                    "id": 96817,
                    "item": { "description": "1 Gbps Public & Private Network Uplinks" }
                }, 
                {
                    "id": 80263,
                    "item": { "description": "Host Ping and TCP Service Monitoring" }
                }, 
                {
                    "id": 32627,
                    "item": { "description": "Automated Notification" }
                }, 
                {
                    "id": 35310,
                    "item": { "description": "Nessus Vulnerability Assessment & Reporting" }
                }, 
                {
                    "id": 32500,
                    "item": { "description": "Email and Ticket" }
                }, 
                {
                    "id": 25014,
                    "item": { "description": "Reboot / KVM over IP" }
                }, 
                {
                    "id": 212715,
                    "item": { "description": "SRIOV Enabled" }
                }, 
                {
                    "id": 34807,
                    "item": { "description": "1 IP Address" }
                }, 
                {
                    "id": 33483,
                    "item": { "description": "Unlimited SSL VPN Users & 1 PPTP VPN User per account" }
                }
            ]
        }]
    }]
}