Merge lp:~julian-edwards/gwacl/hacking into lp:gwacl

Proposed by Julian Edwards
Status: Merged
Approved by: Julian Edwards
Approved revision: 125
Merged at revision: 127
Proposed branch: lp:~julian-edwards/gwacl/hacking
Merge into: lp:gwacl
Diff against target: 101 lines (+63/-23)
2 files modified
HACKING.txt (+62/-0)
README (+1/-23)
To merge this branch: bzr merge lp:~julian-edwards/gwacl/hacking
Reviewer Review Type Date Requested Status
Gavin Panella Approve
Review via email: mp+170747@code.launchpad.net

Commit message

Add HACKING.txt and clean up README.

To post a comment you must log in.
lp:~julian-edwards/gwacl/hacking updated
124. By Julian Edwards

another cleanup

Revision history for this message
Gavin Panella (allenap) wrote :

Looks good!

[1]

+All branch submissions must be formatted using "make format".  They must
+also have a successful test run with "make check".  New features must
+always be accompanied by new tests.

You could use ``blah`` to get monospace here:

  All branch submissions must be formatted using ``make format``.  They must
  also have a successful test run with ``make check``.  New features must
  always be accompanied by new tests.

[2]

+You also need to install go-curl::
+
+   go get github.com/andelf/go-curl

Doesn't this get getted when getting gwacl? I know this is just a move
of what's already there, but it might be worth dropping now if it
really is superfluous.

[3]

+When adding new API entry points to the library, we have decided that all
+of these should take a single struct parameter, which itself contains one
+or more parameters.

The "we have decided" bit doesn't sound good. How about just stating
how it should be done:

  API functions should take a single struct parameter, which itself
  contains one or more parameters. Existing functions that do not
  follow this rule are historic and should not be copied.

review: Approve
lp:~julian-edwards/gwacl/hacking updated
125. By Julian Edwards

review comments

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'HACKING.txt'
2--- HACKING.txt 1970-01-01 00:00:00 +0000
3+++ HACKING.txt 2013-06-24 00:41:26 +0000
4@@ -0,0 +1,62 @@
5+==================================================
6+Hacking in GWACL (Go Windows Azure Client Library)
7+==================================================
8+
9+(this doc is a huge WIP)
10+
11+Submitting changes
12+------------------
13+
14+`GWACL`_ is hosted on Launchpad using `Bazaar`_. Submitting a change
15+requires you to create a merge proposal against the trunk branch and a
16+core committer will then review the branch. Once the branch is accepted,
17+it will be landed by the reviewer.
18+
19+All branch submissions must be formatted using ``make format``. They must
20+also have a successful test run with ``make check``. New features must
21+always be accompanied by new tests.
22+
23+.. _GWACL: https://launchpad.net/gwacl
24+.. _Bazaar: http://bazaar.canonical.com/
25+
26+
27+Prerequisites
28+-------------
29+
30+The code that communicates with Azure's management API uses *libcurl*, through
31+a Go language binding called *go-curl*. You need to install the libcurl
32+headers for your OS. On Ubuntu this is::
33+
34+ sudo apt-get install libcurl4-openssl-dev
35+
36+If you didn't ``go get`` gwacl you may also need to install go-curl::
37+
38+ go get github.com/andelf/go-curl
39+
40+On Ubuntu 12.10 at least, you specifically need the given version of libcurl.
41+With other versions you will receive unexpected "403" HTTP status codes
42+("Forbidden") from the Azure server.
43+
44+Why use libcurl? At the time of writing, Go's built-in http package does not
45+support TLS renegotiation. We find that Azure forces such a renegotiation
46+when we access the management API. The use of libcurl is embedded so that
47+future implementations can swap it out for a different http library without
48+breaking compatibility.
49+
50+
51+API philosophy
52+--------------
53+
54+API functions in the library should take a single struct parameter, which
55+itself contains one or more parameters. Existing functions that do not follow
56+this rule are historic and should not be copied.
57+
58+This brings several advantages::
59+
60+ 1. Keyword parameters improve callsite readability.
61+ 2. It allows for parameters to be defaulted if not supplied.
62+ 3. It's much easier to change the API later without breaking existing
63+ code, it just needs re-compiling in the case where you add new,
64+ optional, parameters.
65+
66+
67
68=== modified file 'README'
69--- README 2013-06-17 14:14:07 +0000
70+++ README 2013-06-24 00:41:26 +0000
71@@ -3,29 +3,7 @@
72 ===========================================
73
74
75-Random notes, clean this up later
76-=================================
77-
78-
79-Install libcurl
80----------------
81-
82-The code that communicates with Azure's management API uses *libcurl*, through
83-a Go language binding called *go-curl*. Install the libcurl headers and
84-go-curl::
85-
86- sudo apt-get install libcurl4-openssl-dev
87- go get github.com/andelf/go-curl
88-
89-On Ubuntu 12.10 at least, you specifically need the given version of libcurl.
90-With other versions you will receive unexpected "403" HTTP status codes
91-("Forbidden") from the Azure server.
92-
93-Why use libcurl? At the time of writing, Go's built-in http package does not
94-support TLS renegotiation. We find that Azure forces such a renegotiation
95-when we access the management API. The use of libcurl is embedded so that
96-future implementations can swap it out for a different http library without
97-breaking compatibility.
98+(Work In Progress)
99
100
101 Generate an x509 key to talk to Azure

Subscribers

People subscribed via source and target branches

to all changes: