From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 28 18:36:18 2019 Received: (at 37083) by debbugs.gnu.org; 28 Sep 2019 22:36:19 +0000 Received: from localhost ([127.0.0.1]:51483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iELK6-00048l-Fk for submit@debbugs.gnu.org; Sat, 28 Sep 2019 18:36:18 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:34096) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iELK2-00048X-9e for 37083@debbugs.gnu.org; Sat, 28 Sep 2019 18:36:17 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 6646A9036D; Sun, 29 Sep 2019 00:36:12 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id upAQZKq-EljN; Sun, 29 Sep 2019 00:36:11 +0200 (CEST) Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 46AEC90347; Sun, 29 Sep 2019 00:36:11 +0200 (CEST) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) Subject: Re: [bug#37083] [PATCH] machine: Implement 'digital-ocean-environment-type'. References: <87ftlxf6q3.fsf@sdf.lonestar.org> <875zmirizk.fsf@gnu.org> <87y2z45knp.fsf@gnu.org> <87blvysuaz.fsf@sdf.lonestar.org> <87tv9nc1fz.fsf@sdf.lonestar.org> <87y2yy7f64.fsf@gnu.org> <87y2yh5px7.fsf@sdf.lonestar.org> <87sgonl8t4.fsf@gnu.org> <87ftkgno80.fsf@sdf.lonestar.org> <87blv4no6e.fsf_-_@sdf.lonestar.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 8 =?utf-8?Q?Vend=C3=A9miaire?= an 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sun, 29 Sep 2019 00:36:10 +0200 In-Reply-To: <87blv4no6e.fsf_-_@sdf.lonestar.org> (Jakob L. Kreuze's message of "Sat, 28 Sep 2019 16:47:21 -0400") Message-ID: <877e5sm4kl.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 37083 Cc: 37083@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi Jakob! zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) skribis: > gnu/machine/digital-ocean.scm: New file. > gnu/local.mk (GNU_SYSTEM_MODULES): Add it. > doc/guix.texi (Invoking 'guix deploy'): Add documentation for ^ Nitpick: please add a =E2=80=9C*=E2=80=9D before each bullet. :-) Apart from that, LGTM, woohoo! > +(define (fetch-endpoint endpoint) > + "Return the contents of the Digital Ocean API endpoint ENDPOINT as an > +alist. This procedure is quite a bit more specialized than 'json-fetch',= as it > +takes care to set headers such as 'Accept' and 'Authorization' appropria= tely." > + (define headers > + `((user-agent . "Guix Deploy") > + (Accept . "application/json") > + (Authorization . ,(format #f "Bearer ~a" (%digital-ocean-token))))) > + (json-fetch (string-append %api-base endpoint) #:headers headers)) Note for later: we could use =E2=80=98define-json-mapping=E2=80=99 to work = on Scheme records rather than on alists. > + (message (G_ "No Digital Ocean access token was provided. T= his \ > +may be fixed by setting the environment variable GUIX_DIGITAL_OCAEN_TOKE= N to \ ^^ Typo. Thank you! Ludo=E2=80=99.