Skip to content

Commit 6d87ef5

Browse files
committed
Merge pull request #12 from djs55/interface-changes
Prepare to release 0.2.0
2 parents d03e0d6 + 7b4ddf2 commit 6d87ef5

File tree

6 files changed

+35
-55
lines changed

6 files changed

+35
-55
lines changed

.travis-ci.sh

Lines changed: 0 additions & 39 deletions
This file was deleted.

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
language: c
2-
script: bash -ex .travis-ci.sh
2+
install: wget https://raw.githubusercontent.com/ocaml/ocaml-travisci-skeleton/master/.travis-opam.sh
3+
script: bash -ex .travis-opam.sh
4+
sudo: true
35
env:
4-
- OCAML_VERSION=4.01.0 OPAM_VERSION=1.1.0
6+
- OCAML_VERSION=4.01 PACKAGE=xapi-storage-script FORK_USER=djs55 EXTRA_REMOTE=git://github.com/xapi-project/opam-repo-dev

CHANGES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
0.2.0 (4-Apr-2015)
2+
- Update to SMAPIv2 with o_direct, o_direct_reason
3+
- Update to using json marshalling for exception backtraces
4+
- Use modern travis configuration
5+
- Add opam file for development
6+
17
0.1.2 (19-Oct-2014)
28
- Treat VDI.epoch_{begin,end} as no-ops
39
- Write the pidfile when daemonizing

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.2
1+
0.2.0

main.ml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,10 @@ let backend_error name args =
4242
Exception.rpc_of_exnty exnty
4343

4444
let backend_backtrace_error name args error =
45-
match List.zip error.files error.lines with
46-
| None -> backend_error "SCRIPT_FAILED" [ "malformed backtrace in error output" ]
47-
| Some pairs ->
48-
let backtrace =
49-
pairs
50-
|> List.map ~f:(fun (filename, line) -> { B.Interop.filename; line })
51-
|> B.Interop.to_backtrace
52-
|> B.sexp_of_t
53-
|> Sexplib.Sexp.to_string in
54-
let open Storage_interface in
55-
let exnty = Exception.Backend_error_with_backtrace(name, backtrace :: args) in
56-
Exception.rpc_of_exnty exnty
45+
let error = rpc_of_error error |> Jsonrpc.to_string in
46+
let open Storage_interface in
47+
let exnty = Exception.Backend_error_with_backtrace(name, error :: args) in
48+
Exception.rpc_of_exnty exnty
5749

5850
let missing_uri () =
5951
backend_error "MISSING_URI" [ "Please include a URI in the device-config" ]
@@ -361,7 +353,9 @@ let process root_dir name x =
361353
| Storage.D.Types.Tapdisk3 p -> "vbd3", p in
362354
let attach_info = {
363355
params;
364-
xenstore_data = [ "backend-kind", backend ]
356+
xenstore_data = [ "backend-kind", backend ];
357+
o_direct = true;
358+
o_direct_reason = "";
365359
} in
366360
Deferred.Result.return (R.success (Args.VDI.Attach.rpc_of_response attach_info))
367361
| { R.name = "VDI.activate"; R.params = [ args ] } ->

opam

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
opam-version: "1"
2+
maintainer: "[email protected]"
3+
build: [
4+
[make]
5+
[make "install" "BINDIR=%{bin}%" "MANDIR=%{man}%"]
6+
]
7+
remove: [
8+
[make "uninstall" "BINDIR=%{bin}%" "MANDIR=%{man}%"]
9+
]
10+
depends: [
11+
"xapi-idl" {>= "0.10.0" }
12+
"xapi-storage"
13+
"async" {= "111.25.00" }
14+
"async_inotify" {= "111.28.00" }
15+
"core"
16+
"message-switch"
17+
]

0 commit comments

Comments
 (0)