spectrometer.api.gerrit.
branches
()¶Returns a list of branches in a given repository by querying Gerrit.
GET /gerrit/branches?param=<value>
Parameters: | project (str) – Project to query branches from. (required) |
---|
JSON:
{
"branches": [
{
"ref": "refs/heads/stable/beryllium",
"revision": "8f72284f3808328604bdff7f91a6999094f7c6d7"
},
...
]
}
spectrometer.api.gerrit.
merged_changes
()¶Returns a list of merged changes in a given repository by querying Gerrit.
GET /gerrit/changes?param=<value>
Parameters: |
|
---|
JSON:
{
"changes": [
{
"_number": 37706,
"branch": "master",
"change_id": "I4168e023b77bfddbb6f72057e849925ba2dffa17",
"created": "2016-04-18 02:42:33.000000000",
"deletions": 0,
"hashtags": [],
"id": "spectrometer~master~I4168e023b77bfddbb6f72057e849925ba2dffa17",
"insertions": 119,
"owner": {
"_account_id": 2759
},
"project": "spectrometer",
"status": "MERGED",
"subject": "Add API to return commits since ref",
"submittable": false,
"topic": "git-api",
"updated": "2016-04-19 09:03:03.000000000"
},
...
]
}
spectrometer.api.gerrit.
projects
()¶Returns a list of projects by querying Gerrit.
GET /gerrit/projects
JSON:
{
"projects": [
"groupbasedpolicy",
"spectrometer",
"releng/autorelease",
"snmp4sdn",
"ovsdb",
"nemo",
...
]
}
Returns a list of tags in a given repository by querying Gerrit.
GET /gerrit/tags?param=<value>
Parameters: | project (str) – Project to query tags from. (required) |
---|
JSON:
{
"tags": [
{
"message": "OpenDaylight Beryllium-SR1 release",
"object": "f76cc0a12dc8f06dae3cedc31d06add72df8de5d",
"ref": "refs/tags/release/beryllium-sr1",
"revision": "8b92d614ee48b4fc5ba11c3f38c92dfa14d43655",
"tagger": {
"date": "2016-03-23 13:34:09.000000000",
"email": "thanh.ha@linuxfoundation.org",
"name": "Thanh Ha",
"tz": -240
}
},
...
]
}
spectrometer.api.git.
branches
()¶Returns a list of branches in a given repository.
GET /git/branches?param=<value>
Parameters: | project (str) – Project to query commits from. (required) |
---|
JSON:
{
"branches": [
"master",
"stable/beryllium",
"stable/helium",
"stable/lithium",
...
]
}
spectrometer.api.git.
commits
()¶Returns a list of commit messages in a repository.
GET /git/commits?param=<value>
Parameters: |
|
---|
JSON:
{
"commits": [
{
"author": "Thanh Ha",
"author_email": "thanh.ha@linuxfoundation.org",
"author_tz_offset": 14400,
"authored_date": 1460316386,
"committed_date": 1460392605,
"committer": "Thanh Ha",
"committer_email": "thanh.ha@linuxfoundation.org",
"committer_tz_offset": 14400,
"hash": "1e409af62fd99413c5be86c5b43ad602a8cebc1e",
"lines": {
"deletions": 55,
"files": 7,
"insertions": 103,
"lines": 158
},
"message": "Refactor Gerrit API into a Flask Blueprint..."
},
...
]
}
Note
date: | The date represented in seconds since epoch |
---|---|
tz_offset: | The seconds offset west of UTC. |
spectrometer.api.git.
commits_since_ref
()¶Returns a list of commits in branch until common parent of ref.
Searches Git for a common_parent between ref1 and ref2 and returns a the commit log of all the commits until the common parent excluding the common_parent commit itself.
GET /git/commits_since_ref?param=<value>
Parameters: |
|
---|
JSON:
{
"commits": [
{
"author": "Thanh Ha",
"author_email": "thanh.ha@linuxfoundation.org",
"author_tz_offset": 14400,
"authored_date": 1460316386,
"committed_date": 1460392605,
"committer": "Thanh Ha",
"committer_email": "thanh.ha@linuxfoundation.org",
"committer_tz_offset": 14400,
"hash": "1e409af62fd99413c5be86c5b43ad602a8cebc1e",
"lines": {
"deletions": 55,
"files": 7,
"insertions": 103,
"lines": 158
},
"message": "Refactor Gerrit API into a Flask Blueprint..."
},
...
]
}
spectrometer.api.git.
project_info
()¶Provides meta information on project.
Refer to the specfile located here: https://opendaylight-spectrometer.readthedocs.io/en/latest/project-info-spec.html