From notifications-return-15136-archive-asf-public=cust-asf.ponee.io@libcloud.apache.org Thu Feb 14 15:56:05 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id F2813180626 for ; Thu, 14 Feb 2019 16:56:04 +0100 (CET) Received: (qmail 88252 invoked by uid 500); 14 Feb 2019 15:56:04 -0000 Mailing-List: contact notifications-help@libcloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@libcloud.apache.org Delivered-To: mailing list notifications@libcloud.apache.org Received: (qmail 88243 invoked by uid 99); 14 Feb 2019 15:56:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Feb 2019 15:56:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 87214C0289 for ; Thu, 14 Feb 2019 15:56:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.49 X-Spam-Level: X-Spam-Status: No, score=-109.49 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_FILL_THIS_FORM_SHORT=0.01, URIBL_BLOCKED=0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id zFUBP0s0BYrF for ; Thu, 14 Feb 2019 15:56:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 528BB60E30 for ; Thu, 14 Feb 2019 15:56:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C2586E27B5 for ; Thu, 14 Feb 2019 15:56:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 739AE244C3 for ; Thu, 14 Feb 2019 15:56:00 +0000 (UTC) Date: Thu, 14 Feb 2019 15:56:00 +0000 (UTC) From: "Daniel Estevez (JIRA)" To: notifications@libcloud.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LIBCLOUD-1033) Cannot create a network interface on Azure MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LIBCLOUD-1033?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1= 6768460#comment-16768460 ]=20 Daniel Estevez commented on LIBCLOUD-1033: ------------------------------------------ There's a problem with the script when creating the network interface, the = parameter for _resourcegroup_ should be _resourcegroup.*name*_: =C2=A0 {code:java} network_interface =3D driver.ex_create_network_interface( name=3D'test-1-ni= c', subnet=3Dsubnet, resource_group=3Dresource_group.name, location=3Dlocat= ion, ){code} =C2=A0 =C2=A0 Passing the whole _resourcegroup_ object causes the parser to build an inva= lid URI that ARM interprets as a call to another REST entity (not the netwo= rk interface) and therefore throws that misleading error message =C2=A0 {code:java} The api-version '2015-06-15' is invalid.{code} =C2=A0 =C2=A0 Please try the suggested modification > Cannot create a network interface on Azure > ------------------------------------------ > > Key: LIBCLOUD-1033 > URL: https://issues.apache.org/jira/browse/LIBCLOUD-1033 > Project: Libcloud > Issue Type: Bug > Components: Compute > Affects Versions: 2.4.0 > Reporter: Mitar > Priority: Blocker > > It seems calling ex_create_network_interface is failing now with: > =C2=A0 > {noformat} > libcloud.common.exceptions.BaseHTTPError: [InvalidApiVersionParameter] Th= e api-version '2015-06-15' is invalid. The supported versions are '2018-11-= 01,2018-09-01,2018-08-01,2018-07-01,2018-06-01,2018-05-01,2018-02-01,2018-0= 1-01,2017-12-01,2017-08-01,2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016= -09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-pr= eview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.{noformat} > =C2=A0 > I have a script like: > {noformat} > for location in driver.list_locations(): > if location.name =3D=3D 'East US': > break > else: > raise Exception("Location could not be found.") > for size in driver.list_sizes(location=3Dlocation): > if size.name =3D=3D 'Standard_D64s_v3': > break > else: > raise Exception("Size could not be found.") > for image in sorted(driver.list_images(location=3Dlocation, ex_publisher= =3D'Canonical', ex_offer=3D'UbuntuServer', ex_sku=3D'18.04-LTS'), key=3Dlam= bda i: i.version, reverse=3DTrue): > break > else: > raise Exception("Image could not be found.") > for resource_group in driver.ex_list_resource_groups(): > if resource_group.location =3D=3D location.id and resource_group.name= =3D=3D 'shared': > break > else: > raise Exception("Resource group could not be found.") > for network in driver.ex_list_networks(): > if network.location =3D=3D location.id and network.name =3D=3D 'test'= : > break > else: > raise Exception("Network could not be found.") > for subnet in driver.ex_list_subnets(network=3Dnetwork): > if subnet.name =3D=3D 'default': > break > else: > raise Exception("Subnet could not be found.") > network_interface =3D driver.ex_create_network_interface( > name=3D'test-1-nic', > subnet=3Dsubnet, > resource_group=3Dresource_group, > location=3Dlocation, > ){noformat} > =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)