From fc66a1703bb504624bcec3c43172989d8190c9f0 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 22 Mar 2017 07:56:46 -0500 Subject: [PATCH] Update repo for zuulv3 Move special jobs into the tree. This also includes a few build system updates that were needed to handle code bitrot. Most notably it moves the generated go source code files into the top source dir because having them share the oaktreemodel directory makes import paths awkward and also breaks the build because go refuses to build the dir since it has C++ files it doesn't understand. Change-Id: Iee5f9b54d5c456ad5925f485b80f8e70accf962a --- .gitignore | 4 + .zuul.yaml | 19 + Makefile.am | 38 +- README.rst | 14 +- bootstrap.sh | 10 +- oaktreemodel/common.pb.go => common.pb.go | 117 ++++-- doc/requirements.txt | 2 + doc/source/conf.py | 85 ++++ doc/source/contributor/index.rst | 4 + doc/source/index.rst | 35 ++ doc/source/install/index.rst | 26 ++ doc/source/reference/index.rst | 6 + doc/source/user/index.rst | 5 + flavor.pb.go | 168 ++++++++ floating_ip.pb.go | 171 ++++++++ glide.lock | 11 + glide.yaml | 10 + image.pb.go | 393 ++++++++++++++++++ oaktree.pb.go | 42 ++ oaktreemodel/common.proto | 3 +- oaktreemodel/flavor.pb.go | 113 ----- oaktreemodel/flavor.proto | 5 +- oaktreemodel/floating_ip.pb.go | 137 ------ oaktreemodel/floating_ip.proto | 5 +- oaktreemodel/image.pb.go | 284 ------------- oaktreemodel/image.proto | 5 +- oaktreemodel/oaktree.pb.go | 60 --- oaktreemodel/oaktree.proto | 15 +- oaktreemodel/security_group.pb.go | 200 --------- oaktreemodel/security_group.proto | 5 +- playbooks/distcheck.yaml | 21 + security_group.pb.go | 267 ++++++++++++ setup.cfg | 6 + test-requirements.txt | 10 - install_proto3.sh => tools/install-proto3.sh | 28 +- tools/test-setup.sh | 37 ++ .../tox-install-python.sh | 0 tox.ini | 13 +- 38 files changed, 1473 insertions(+), 901 deletions(-) create mode 100644 .zuul.yaml rename oaktreemodel/common.pb.go => common.pb.go (68%) create mode 100644 doc/requirements.txt create mode 100755 doc/source/conf.py create mode 100644 doc/source/contributor/index.rst create mode 100644 doc/source/index.rst create mode 100644 doc/source/install/index.rst create mode 100644 doc/source/reference/index.rst create mode 100644 doc/source/user/index.rst create mode 100644 flavor.pb.go create mode 100644 floating_ip.pb.go create mode 100644 glide.lock create mode 100644 glide.yaml create mode 100644 image.pb.go create mode 100644 oaktree.pb.go delete mode 100644 oaktreemodel/flavor.pb.go delete mode 100644 oaktreemodel/floating_ip.pb.go delete mode 100644 oaktreemodel/image.pb.go delete mode 100644 oaktreemodel/oaktree.pb.go delete mode 100644 oaktreemodel/security_group.pb.go create mode 100644 playbooks/distcheck.yaml create mode 100644 security_group.pb.go rename install_proto3.sh => tools/install-proto3.sh (67%) create mode 100755 tools/test-setup.sh rename tox_install_python.sh => tools/tox-install-python.sh (100%) diff --git a/.gitignore b/.gitignore index aa5e89c..5c3225d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ liboaktreemodel*.tar.gz # Python protos *pb2.py +*pb2_grpc.py # autotools Makefile @@ -88,3 +89,6 @@ ChangeLog # Protobuf Generated Files oaktree/rpc/*_pb2.py + +# glide vendor dir +vendor diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 0000000..85a0073 --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,19 @@ +- job: + name: oaktreemodel-distcheck + parent: unittests + description: | + Run make distcheck on oaktreemodel + run: playbooks/distcheck.yaml + +- project: + name: openstack/oaktreemodel + # TODO(mordred) Once the base jobs are reworked, we need an oaktreemodel + # version of PyPI publication because we need to do code-gen first. + templates: + - publish-openstack-sphinx-docs + check: + jobs: + - oaktreemodel-distcheck + gate: + jobs: + - oaktreemodel-distcheck diff --git a/Makefile.am b/Makefile.am index e764703..457acaa 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,6 +15,7 @@ ACLOCAL_AMFLAGS = -I m4 +PYTHON ?= python3 SUFFIXES = lib_LTLIBRARIES = liboaktreemodel.la noinst_LTLIBRARIES = @@ -29,7 +30,9 @@ EXTRA_DIST= \ config/pandora_vc_revinfo \ ${top_srcdir}/m4/*m4 -CLEANFILES= ${BUILT_SOURCES} +CLEANFILES= \ + $(top_builddir)/oaktree-go-stamp \ + ${BUILT_SOURCES} DISTCLEANFILES= config/top.h MAINTAINERCLEANFILES= @@ -101,27 +104,29 @@ BUILT_SOURCES += \ oaktreemodel/security_group.pb.h \ oaktreemodel/security_group_pb2.py +GO_BUILT_FILES = \ + common.pb.go \ + flavor.pb.go \ + floating_ip.pb.go \ + image.pb.go \ + oaktree.pb.go \ + security_group.pb.go if HAVE_GO_PLUGIN -BUILT_SOURCES += \ - oaktreemodel/common.pb.go \ - oaktreemodel/flavor.pb.go \ - oaktreemodel/floating_ip.pb.go \ - oaktreemodel/image.pb.go \ - oaktreemodel/oaktree.pb.go \ - oaktreemodel/security_group.pb.go +BUILT_SOURCES += $(GO_BUILT_FILES) endif -EXTRA_DIST += \ +PROTO_FILES = \ oaktreemodel/common.proto \ oaktreemodel/flavor.proto \ oaktreemodel/floating_ip.proto \ oaktreemodel/image.proto \ oaktreemodel/security_group.proto \ oaktreemodel/oaktree.proto +EXTRA_DIST += $(PROTO_FILES) SUFFIXES += .proto .grpc.pb.cc .grpc.pb.h .pb.cc .pb.h py .pb.go -PROTOS_PATH=${top_srcdir}/oaktreemodel -PROTO_OUTPUT=${top_builddir}/oaktreemodel +PROTOS_PATH=${top_srcdir} +PROTO_OUTPUT=${top_builddir} .proto.grpc.pb.cc: $(PROTOC) -I $(PROTOS_PATH) \ --grpc_out=${PROTO_OUTPUT} \ @@ -132,16 +137,19 @@ PROTO_OUTPUT=${top_builddir}/oaktreemodel --plugin=protoc-gen-grpc=${GRPC_CPP_PLUGIN} $< .proto.pb.cc: $(PROTOC) -I $(PROTOS_PATH) --cpp_out=${PROTO_OUTPUT} $< - $(PROTOC) -I $(PROTOS_PATH) --go_out=${PROTO_OUTPUT} $< + .proto.pb.h: $(PROTOC) -I $(PROTOS_PATH) --cpp_out=${PROTO_OUTPUT} $< -.proto.pb.go: - $(PROTOC) -I $(PROTOS_PATH) --go_out=${PROTO_OUTPUT} $< +oaktree-go-stamp: $(GO_BUILT_FILES) + go build $(top_srcdir) && touch oaktree-go-stamp + +$(GO_BUILT_FILES): $(PROTO_FILES) + $(PROTOC) -I $(PROTOS_PATH) --go_out=${GOPATH}/src $(PROTOS_PATH)/oaktreemodel/*.proto # Have to do this with make matching not automake matching # Yay _pb2.py extension! %_pb2.py: %.proto - python -m grpc.tools.protoc -I $(PROTOS_PATH) \ + $(PYTHON) -m grpc_tools.protoc -I $(PROTOS_PATH) \ --python_out=${PROTO_OUTPUT} \ --grpc_python_out=${PROTO_OUTPUT} $< diff --git a/README.rst b/README.rst index 147e6ac..b5c39f0 100644 --- a/README.rst +++ b/README.rst @@ -15,10 +15,9 @@ With go, the generated files are checked in to the git repo, because that's how go dependencies work. With C++ and python, they are not, as we exepct the unit of consumption to -be a built library and header files for C++ or a PyPI package for Ruby. It's -the most likely that as we add structure for more languages that they will -follow the C++/Python approach and not the go approach - but the decision -will be made on a per-language basis and reported back here. +be a built library and header files for C++ or a PyPI package for Python. +It's most likely that as we add structure for more languages that they will +follow the C++/Python approach and not the go approach. Note on API compat ------------------ @@ -67,11 +66,10 @@ First you need some dependencies: .. code-block:: bash - pip install bindep + python3 -m pip install bindep apt-get install $(bindep -b) - pip install -f requirements.txt - pip install grpcio-tools - go get -u github.com/golang/protobuf/protoc-gen-go + python3 -m pip install --user -r test-requirements.txt + bash tools/test-setup.sh Then you can build the code: diff --git a/bootstrap.sh b/bootstrap.sh index 710c405..a5dc181 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,5 +1,5 @@ -#!/bin/sh -# Copyright (c) 2016 Red Hat, Inc. +#!/bin/bash +# Copyright (c) 2017 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,10 +14,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -if ! protoc --version | grep -q 3\. ; then - echo "Protobuf v3 required - installing" - bash install_proto3.sh -fi -pip install pbr - autoreconf -fi diff --git a/oaktreemodel/common.pb.go b/common.pb.go similarity index 68% rename from oaktreemodel/common.pb.go rename to common.pb.go index dfd3f74..cd2f236 100644 --- a/oaktreemodel/common.pb.go +++ b/common.pb.go @@ -1,19 +1,35 @@ -// Code generated by protoc-gen-go. -// source: common.proto -// DO NOT EDIT! +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: oaktreemodel/common.proto /* -Package oaktree is a generated protocol buffer package. +Package oaktreemodel is a generated protocol buffer package. It is generated from these files: - common.proto + oaktreemodel/common.proto + oaktreemodel/flavor.proto + oaktreemodel/floating_ip.proto + oaktreemodel/image.proto + oaktreemodel/oaktree.proto + oaktreemodel/security_group.proto It has these top-level messages: Project Location Filter + Flavor + FlavorList + FloatingIP + FloatingIPList + DiskFormat + ContainerFormat + Image + ImageList + SecurityGroupRule + SecurityGroupRuleList + SecurityGroup + SecurityGroupList */ -package oaktree +package oaktreemodel import proto "github.com/golang/protobuf/proto" import fmt "fmt" @@ -232,6 +248,27 @@ func (m *Location) String() string { return proto.CompactTextString(m func (*Location) ProtoMessage() {} func (*Location) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (m *Location) GetCloud() string { + if m != nil { + return m.Cloud + } + return "" +} + +func (m *Location) GetRegion() string { + if m != nil { + return m.Region + } + return "" +} + +func (m *Location) GetZone() string { + if m != nil { + return m.Zone + } + return "" +} + func (m *Location) GetProject() *Project { if m != nil { return m.Project @@ -258,6 +295,20 @@ func (m *Filter) GetLocation() *Location { return nil } +func (m *Filter) GetNameOrId() string { + if m != nil { + return m.NameOrId + } + return "" +} + +func (m *Filter) GetJmespath() string { + if m != nil { + return m.Jmespath + } + return "" +} + func (m *Filter) GetFilter() map[string]string { if m != nil { return m.Filter @@ -266,34 +317,36 @@ func (m *Filter) GetFilter() map[string]string { } func init() { - proto.RegisterType((*Project)(nil), "oaktree.Project") - proto.RegisterType((*Location)(nil), "oaktree.Location") - proto.RegisterType((*Filter)(nil), "oaktree.Filter") + proto.RegisterType((*Project)(nil), "oaktreemodel.Project") + proto.RegisterType((*Location)(nil), "oaktreemodel.Location") + proto.RegisterType((*Filter)(nil), "oaktreemodel.Filter") } -func init() { proto.RegisterFile("common.proto", fileDescriptor0) } +func init() { proto.RegisterFile("oaktreemodel/common.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 326 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x4c, 0x91, 0xc1, 0x4e, 0xf3, 0x30, - 0x0c, 0xc7, 0xbf, 0x6e, 0xfb, 0xba, 0xce, 0xe5, 0x30, 0x2c, 0x84, 0xa6, 0x01, 0x12, 0xec, 0x84, - 0x90, 0xd8, 0x61, 0xbb, 0x00, 0xc7, 0x49, 0x20, 0x90, 0x10, 0xa0, 0xbc, 0xc0, 0x14, 0xba, 0x00, - 0xdd, 0xda, 0xb8, 0x0a, 0x19, 0x62, 0x3c, 0x01, 0xaf, 0xc9, 0x9b, 0x90, 0x26, 0x5e, 0xc5, 0x29, - 0xf6, 0xdf, 0x8e, 0xfe, 0x3f, 0xdb, 0xb0, 0x93, 0x51, 0x59, 0x92, 0x1e, 0x57, 0x86, 0x2c, 0x61, - 0x97, 0xe4, 0xca, 0x1a, 0xa5, 0x46, 0xdf, 0x11, 0x74, 0x9f, 0x0c, 0x2d, 0x55, 0x66, 0xb1, 0x0f, - 0xad, 0x7c, 0x31, 0x88, 0x8e, 0xa3, 0xd3, 0xde, 0xed, 0x3f, 0xe1, 0x62, 0xdc, 0x83, 0x8e, 0x96, - 0xa5, 0x1a, 0xb4, 0x58, 0xf3, 0x19, 0x1e, 0x41, 0x6f, 0x41, 0xa5, 0xcc, 0xf5, 0xdc, 0xb5, 0xb7, - 0x7d, 0x29, 0x12, 0x49, 0x90, 0xee, 0x16, 0x78, 0x02, 0x29, 0x97, 0xfd, 0xdf, 0x0e, 0x37, 0x40, - 0x10, 0x1f, 0x9c, 0x36, 0xeb, 0x41, 0xb7, 0x0a, 0xa6, 0xb3, 0x04, 0xe2, 0x50, 0x18, 0x7d, 0x42, - 0x72, 0x4f, 0x99, 0xb4, 0x39, 0x69, 0x67, 0xfc, 0x3f, 0x2b, 0x68, 0xcd, 0x34, 0x22, 0x24, 0xb8, - 0x0f, 0xb1, 0x51, 0xaf, 0xae, 0x1e, 0x80, 0x04, 0x67, 0x88, 0xd0, 0xf9, 0x22, 0xad, 0x02, 0x8b, - 0xf0, 0x31, 0x9e, 0x35, 0x16, 0x9e, 0x20, 0x9d, 0xf4, 0xc7, 0x3c, 0xf3, 0x98, 0xe7, 0x15, 0xdb, - 0x86, 0xd1, 0x4f, 0x04, 0xf1, 0x4d, 0x5e, 0x58, 0x65, 0xf0, 0x1c, 0x92, 0x82, 0x21, 0xbc, 0x77, - 0x3a, 0xd9, 0x6d, 0xfe, 0x6d, 0xe9, 0x44, 0xd3, 0x82, 0x87, 0x00, 0xf5, 0x90, 0x73, 0x32, 0xf5, - 0x2e, 0x02, 0x55, 0x52, 0x2b, 0x8f, 0xc6, 0x6d, 0x62, 0x08, 0xc9, 0xb2, 0x54, 0xef, 0x95, 0xb4, - 0x6f, 0xcc, 0xd6, 0xe4, 0x38, 0x85, 0xf8, 0xc5, 0x5b, 0x3a, 0xbc, 0xb6, 0xb3, 0x39, 0x68, 0x6c, - 0x02, 0x09, 0x3f, 0xd7, 0xda, 0x9a, 0x8d, 0xe0, 0xd6, 0xe1, 0x25, 0xa4, 0x7f, 0x64, 0x77, 0xb0, - 0xf6, 0x4a, 0x6d, 0x78, 0x47, 0x75, 0x58, 0xef, 0xed, 0x43, 0x16, 0x6b, 0xbe, 0x98, 0x08, 0xc9, - 0x55, 0xeb, 0x22, 0x7a, 0x8e, 0xfd, 0xe1, 0xa7, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x07, 0x5f, - 0x60, 0xca, 0x08, 0x02, 0x00, 0x00, + // 366 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x92, 0x41, 0x8b, 0xdb, 0x30, + 0x10, 0x85, 0x6b, 0xc7, 0x75, 0x9c, 0x71, 0x0f, 0x41, 0xa4, 0xc1, 0x0d, 0x2d, 0xa4, 0x39, 0xe5, + 0x64, 0x83, 0x4b, 0x69, 0xda, 0xde, 0x02, 0x2d, 0x0d, 0x94, 0xb6, 0xe8, 0xd8, 0x4b, 0xd0, 0xda, + 0xda, 0xac, 0x12, 0x5b, 0x63, 0x14, 0x65, 0x21, 0x0b, 0x7b, 0xdf, 0xff, 0xba, 0x7f, 0x62, 0xb1, + 0xa4, 0x18, 0xe7, 0x64, 0xbd, 0x37, 0x23, 0xde, 0x37, 0x63, 0xc1, 0x3b, 0x64, 0x07, 0xad, 0x38, + 0xaf, 0xb1, 0xe4, 0x55, 0x56, 0x60, 0x5d, 0xa3, 0x4c, 0x1b, 0x85, 0x1a, 0xc9, 0x9b, 0x7e, 0x69, + 0xf1, 0xe4, 0xc1, 0xf0, 0x9f, 0xc2, 0x3d, 0x2f, 0x34, 0x19, 0x83, 0x2f, 0xca, 0xc4, 0x9b, 0x7b, + 0xcb, 0xd1, 0xaf, 0x57, 0xd4, 0x17, 0x25, 0x99, 0x40, 0x20, 0x59, 0xcd, 0x13, 0xdf, 0x79, 0x46, + 0x91, 0x0f, 0x30, 0x2a, 0xb1, 0x66, 0x42, 0x6e, 0x45, 0x99, 0x0c, 0x4c, 0xc9, 0xa3, 0x91, 0xb5, + 0x36, 0x25, 0xf9, 0x08, 0xb1, 0x2b, 0x9b, 0xbb, 0x81, 0x6b, 0x00, 0x6b, 0xfe, 0x61, 0x35, 0x5f, + 0x8f, 0x60, 0xd8, 0xd8, 0xd0, 0x75, 0x04, 0xa1, 0x2d, 0x2c, 0x1e, 0x21, 0xfa, 0x8d, 0x05, 0xd3, + 0x02, 0x25, 0x99, 0xc0, 0xeb, 0xa2, 0xc2, 0x93, 0xa3, 0xa1, 0x56, 0x90, 0x29, 0x84, 0x8a, 0xef, + 0x04, 0x4a, 0x0b, 0x44, 0x9d, 0x22, 0x04, 0x82, 0x07, 0x94, 0xdc, 0xb2, 0x50, 0x73, 0x26, 0x59, + 0x17, 0x61, 0x08, 0xe2, 0xfc, 0x6d, 0xda, 0x1f, 0x3c, 0x75, 0x43, 0xd3, 0x4b, 0xd7, 0xe2, 0xd9, + 0x83, 0xf0, 0xa7, 0xa8, 0x34, 0x57, 0x24, 0x87, 0xa8, 0x72, 0x24, 0x06, 0x20, 0xce, 0xa7, 0xd7, + 0x97, 0x2f, 0x9c, 0xb4, 0xeb, 0x23, 0xef, 0x01, 0xda, 0x71, 0xb7, 0xa8, 0xda, 0xad, 0x58, 0xbe, + 0xa8, 0x75, 0xfe, 0xaa, 0x4d, 0x49, 0x66, 0x10, 0xed, 0x6b, 0x7e, 0x6c, 0x98, 0xbe, 0x73, 0x94, + 0x9d, 0x26, 0x2b, 0x08, 0x6f, 0x4d, 0x6e, 0x12, 0xcc, 0x07, 0xcb, 0x38, 0x9f, 0x5f, 0x67, 0x59, + 0x26, 0xf7, 0xf9, 0x21, 0xb5, 0x3a, 0x53, 0xd7, 0x3f, 0xfb, 0x0a, 0x71, 0xcf, 0x26, 0x63, 0x18, + 0x1c, 0xf8, 0xd9, 0xad, 0xac, 0x3d, 0xb6, 0x6b, 0xbc, 0x67, 0xd5, 0xc9, 0xfd, 0x40, 0x6a, 0xc5, + 0x37, 0x7f, 0xe5, 0xad, 0xbf, 0xfc, 0xff, 0xbc, 0x13, 0x3a, 0xc5, 0x86, 0xcb, 0xa3, 0x66, 0xc5, + 0x21, 0x45, 0xb5, 0xcb, 0x3a, 0x95, 0xf5, 0x09, 0xbe, 0xf7, 0xc5, 0x4d, 0x68, 0x5e, 0xd1, 0xa7, + 0x97, 0x00, 0x00, 0x00, 0xff, 0xff, 0x57, 0x22, 0xea, 0x46, 0x62, 0x02, 0x00, 0x00, } diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000..3c822d2 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,2 @@ +sphinx>=1.6.2 # BSD +openstackdocstheme>=1.17.0 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py new file mode 100755 index 0000000..70a2f04 --- /dev/null +++ b/doc/source/conf.py @@ -0,0 +1,85 @@ +# -*- coding: utf-8 -*- +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os +import sys + +import openstackdocstheme + +sys.path.insert(0, os.path.abspath('../..')) +# -- General configuration ---------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = [ + 'sphinx.ext.autodoc', + 'openstackdocstheme', +] + +# openstackdocstheme options +repository_name = 'openstack/oaktreemodel' +bug_project = '856' +bug_tag = '' +html_last_updated_fomt = '%Y-%m-%d %H:%M' +html_theme = 'openstackdocs' + +# autodoc generation is a bit aggressive and a nuisance when doing heavy +# text edit cycles. +# execute "export SPHINX_DEBUG=1" in your terminal to disable + +# The suffix of source filenames. +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'oaktreemodel' +copyright = u'2017, various OpenStack developers' + +# If true, '()' will be appended to :func: etc. cross-reference text. +add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +add_module_names = True + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# -- Options for HTML output -------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. Major themes that come with +# Sphinx are currently 'default' and 'sphinxdoc'. +# html_theme_path = ["."] +# html_theme = '_theme' +# html_static_path = ['static'] +html_theme = 'openstackdocs' +html_theme_path = [openstackdocstheme.get_html_theme_path()] + +# Output file base name for HTML help builder. +htmlhelp_basename = '%sdoc' % project + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass +# [howto/manual]). +latex_documents = [ + ('index', + '%s.tex' % project, + u'%s Documentation' % project, + u'Various OpenStack Developers', 'manual'), +] + +# Example configuration for intersphinx: refer to the Python standard library. +#intersphinx_mapping = {'http://docs.python.org/': None} diff --git a/doc/source/contributor/index.rst b/doc/source/contributor/index.rst new file mode 100644 index 0000000..2aa0707 --- /dev/null +++ b/doc/source/contributor/index.rst @@ -0,0 +1,4 @@ +============ +Contributing +============ +.. include:: ../../../CONTRIBUTING.rst diff --git a/doc/source/index.rst b/doc/source/index.rst new file mode 100644 index 0000000..ad94c1f --- /dev/null +++ b/doc/source/index.rst @@ -0,0 +1,35 @@ +============ +oaktreemodel +============ + +oaktree is a gRPC interface for interacting with OpenStack clouds that is +inherently interoperable and multi-cloud aware. + +oaktreemodel is the protobuf definitions and the libraries and/or code +generated from that to make it possible for people of all languages to +interact with the gRPC system without developing a python dependency anywhere. + +At start, go, C++ and python are supported. + +With go, the generated files are checked in to the git repo, because that's +how go dependencies work. + +With C++ and python, they are not, as we exepct the unit of consumption to +be a built library and header files for C++ or a PyPI package for Python. +It's most likely that as we add structure for more languages that they will +follow the C++/Python approach and not the go approach. + +.. toctree:: + :maxdepth: 2 + + install/index + user/index + reference/index + contributor/index + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/doc/source/install/index.rst b/doc/source/install/index.rst new file mode 100644 index 0000000..a690e1b --- /dev/null +++ b/doc/source/install/index.rst @@ -0,0 +1,26 @@ +============ +Installation +============ + +Python +------ + +At the command line:: + + $ pip install oaktreemodel + +Or, if you have virtualenvwrapper installed:: + + $ mkvirtualenv oaktreemodel + $ pip install oaktreemodel + +Go +-- + +At the command line:: + + $ go get git.openstack.org/openstack/oaktreemodel + +In code:: + + import git.openstack.org/openstack/oaktreemodel diff --git a/doc/source/reference/index.rst b/doc/source/reference/index.rst new file mode 100644 index 0000000..52741fa --- /dev/null +++ b/doc/source/reference/index.rst @@ -0,0 +1,6 @@ +============= +API Reference +============= + +.. module:: oaktreemodel + :synopsis: oaktree gRPC API diff --git a/doc/source/user/index.rst b/doc/source/user/index.rst new file mode 100644 index 0000000..7011add --- /dev/null +++ b/doc/source/user/index.rst @@ -0,0 +1,5 @@ +==================== + Using oaktreemodel +==================== + +.. note:: Write these docs. diff --git a/flavor.pb.go b/flavor.pb.go new file mode 100644 index 0000000..f17201a --- /dev/null +++ b/flavor.pb.go @@ -0,0 +1,168 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: oaktreemodel/flavor.proto + +package oaktreemodel + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +type Flavor struct { + Location *Location `protobuf:"bytes,1,opt,name=location" json:"location,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` + IsPublic bool `protobuf:"varint,4,opt,name=is_public,json=isPublic" json:"is_public,omitempty"` + Disabled bool `protobuf:"varint,5,opt,name=disabled" json:"disabled,omitempty"` + Ram uint32 `protobuf:"varint,6,opt,name=ram" json:"ram,omitempty"` + Vcpus uint32 `protobuf:"varint,7,opt,name=vcpus" json:"vcpus,omitempty"` + Disk uint64 `protobuf:"varint,8,opt,name=disk" json:"disk,omitempty"` + Ephemeral uint32 `protobuf:"varint,9,opt,name=ephemeral" json:"ephemeral,omitempty"` + Swap uint64 `protobuf:"varint,10,opt,name=swap" json:"swap,omitempty"` + RxtxFactor float32 `protobuf:"fixed32,11,opt,name=rxtx_factor,json=rxtxFactor" json:"rxtx_factor,omitempty"` + Properties map[string]string `protobuf:"bytes,99,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *Flavor) Reset() { *m = Flavor{} } +func (m *Flavor) String() string { return proto.CompactTextString(m) } +func (*Flavor) ProtoMessage() {} +func (*Flavor) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } + +func (m *Flavor) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *Flavor) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Flavor) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Flavor) GetIsPublic() bool { + if m != nil { + return m.IsPublic + } + return false +} + +func (m *Flavor) GetDisabled() bool { + if m != nil { + return m.Disabled + } + return false +} + +func (m *Flavor) GetRam() uint32 { + if m != nil { + return m.Ram + } + return 0 +} + +func (m *Flavor) GetVcpus() uint32 { + if m != nil { + return m.Vcpus + } + return 0 +} + +func (m *Flavor) GetDisk() uint64 { + if m != nil { + return m.Disk + } + return 0 +} + +func (m *Flavor) GetEphemeral() uint32 { + if m != nil { + return m.Ephemeral + } + return 0 +} + +func (m *Flavor) GetSwap() uint64 { + if m != nil { + return m.Swap + } + return 0 +} + +func (m *Flavor) GetRxtxFactor() float32 { + if m != nil { + return m.RxtxFactor + } + return 0 +} + +func (m *Flavor) GetProperties() map[string]string { + if m != nil { + return m.Properties + } + return nil +} + +type FlavorList struct { + Flavors []*Flavor `protobuf:"bytes,1,rep,name=flavors" json:"flavors,omitempty"` +} + +func (m *FlavorList) Reset() { *m = FlavorList{} } +func (m *FlavorList) String() string { return proto.CompactTextString(m) } +func (*FlavorList) ProtoMessage() {} +func (*FlavorList) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} } + +func (m *FlavorList) GetFlavors() []*Flavor { + if m != nil { + return m.Flavors + } + return nil +} + +func init() { + proto.RegisterType((*Flavor)(nil), "oaktreemodel.Flavor") + proto.RegisterType((*FlavorList)(nil), "oaktreemodel.FlavorList") +} + +func init() { proto.RegisterFile("oaktreemodel/flavor.proto", fileDescriptor1) } + +var fileDescriptor1 = []byte{ + // 376 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xcb, 0xeb, 0xd3, 0x30, + 0x1c, 0x27, 0xed, 0x1e, 0xed, 0xb7, 0xbe, 0x08, 0x43, 0xe2, 0x14, 0x2c, 0xc3, 0x43, 0x4f, 0x1d, + 0x4c, 0x44, 0xf1, 0x71, 0x11, 0xdd, 0x69, 0x87, 0x91, 0xa3, 0x97, 0x91, 0xb5, 0xd9, 0x0c, 0x7d, + 0x24, 0x24, 0xd9, 0xdc, 0xfe, 0x28, 0xff, 0x47, 0x69, 0xb2, 0xcd, 0xee, 0xc7, 0xef, 0xf6, 0x79, + 0x92, 0xe4, 0xd3, 0xc2, 0x2b, 0xc9, 0x2a, 0xab, 0x39, 0x6f, 0x64, 0xc9, 0xeb, 0xf9, 0xae, 0x66, + 0x47, 0xa9, 0x73, 0xa5, 0xa5, 0x95, 0xf8, 0x49, 0xdf, 0x9a, 0xde, 0x07, 0x0b, 0xd9, 0x34, 0xb2, + 0xf5, 0xc1, 0xd9, 0xdf, 0x10, 0x46, 0x4b, 0xd7, 0xc4, 0x0b, 0x88, 0x6a, 0x59, 0x30, 0x2b, 0x64, + 0x4b, 0x50, 0x8a, 0xb2, 0x64, 0xf1, 0x32, 0xef, 0x17, 0xf3, 0xd5, 0xc5, 0xa5, 0xb7, 0x1c, 0x7e, + 0x06, 0x81, 0x28, 0x49, 0x90, 0xa2, 0x2c, 0xa6, 0x81, 0x28, 0x31, 0x86, 0x41, 0xcb, 0x1a, 0x4e, + 0x42, 0xa7, 0x38, 0x8c, 0x5f, 0x43, 0x2c, 0xcc, 0x46, 0x1d, 0xb6, 0xb5, 0x28, 0xc8, 0x20, 0x45, + 0x59, 0x44, 0x23, 0x61, 0xd6, 0x8e, 0xe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xf5, 0x7e, 0x7e, 0x63, + 0xf3, 0x7e, 0xf7, 0x4b, 0x9f, 0x6c, 0x47, 0xee, 0x6f, 0x79, 0xff, 0x2f, 0x00, 0x00, 0xff, 0xff, + 0x70, 0xcc, 0x98, 0x75, 0x73, 0x02, 0x00, 0x00, +} diff --git a/floating_ip.pb.go b/floating_ip.pb.go new file mode 100644 index 0000000..a17ff2f --- /dev/null +++ b/floating_ip.pb.go @@ -0,0 +1,171 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: oaktreemodel/floating_ip.proto + +package oaktreemodel + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +type FloatingIP_Status int32 + +const ( + FloatingIP_active FloatingIP_Status = 0 + FloatingIP_down FloatingIP_Status = 1 + FloatingIP_error FloatingIP_Status = 2 +) + +var FloatingIP_Status_name = map[int32]string{ + 0: "active", + 1: "down", + 2: "error", +} +var FloatingIP_Status_value = map[string]int32{ + "active": 0, + "down": 1, + "error": 2, +} + +func (x FloatingIP_Status) String() string { + return proto.EnumName(FloatingIP_Status_name, int32(x)) +} +func (FloatingIP_Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{0, 0} } + +type FloatingIP struct { + Location *Location `protobuf:"bytes,1,opt,name=location" json:"location,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` + IsAttached bool `protobuf:"varint,3,opt,name=is_attached,json=isAttached" json:"is_attached,omitempty"` + FixedIpAddress string `protobuf:"bytes,4,opt,name=fixed_ip_address,json=fixedIpAddress" json:"fixed_ip_address,omitempty"` + FloatingIpAddress string `protobuf:"bytes,5,opt,name=floating_ip_address,json=floatingIpAddress" json:"floating_ip_address,omitempty"` + Network string `protobuf:"bytes,6,opt,name=network" json:"network,omitempty"` + Port string `protobuf:"bytes,7,opt,name=port" json:"port,omitempty"` + Status FloatingIP_Status `protobuf:"varint,8,opt,name=status,enum=oaktreemodel.FloatingIP_Status" json:"status,omitempty"` + Properties map[string]string `protobuf:"bytes,99,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *FloatingIP) Reset() { *m = FloatingIP{} } +func (m *FloatingIP) String() string { return proto.CompactTextString(m) } +func (*FloatingIP) ProtoMessage() {} +func (*FloatingIP) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } + +func (m *FloatingIP) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *FloatingIP) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *FloatingIP) GetIsAttached() bool { + if m != nil { + return m.IsAttached + } + return false +} + +func (m *FloatingIP) GetFixedIpAddress() string { + if m != nil { + return m.FixedIpAddress + } + return "" +} + +func (m *FloatingIP) GetFloatingIpAddress() string { + if m != nil { + return m.FloatingIpAddress + } + return "" +} + +func (m *FloatingIP) GetNetwork() string { + if m != nil { + return m.Network + } + return "" +} + +func (m *FloatingIP) GetPort() string { + if m != nil { + return m.Port + } + return "" +} + +func (m *FloatingIP) GetStatus() FloatingIP_Status { + if m != nil { + return m.Status + } + return FloatingIP_active +} + +func (m *FloatingIP) GetProperties() map[string]string { + if m != nil { + return m.Properties + } + return nil +} + +type FloatingIPList struct { + FloatingIps []*FloatingIP `protobuf:"bytes,1,rep,name=floating_ips,json=floatingIps" json:"floating_ips,omitempty"` +} + +func (m *FloatingIPList) Reset() { *m = FloatingIPList{} } +func (m *FloatingIPList) String() string { return proto.CompactTextString(m) } +func (*FloatingIPList) ProtoMessage() {} +func (*FloatingIPList) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} } + +func (m *FloatingIPList) GetFloatingIps() []*FloatingIP { + if m != nil { + return m.FloatingIps + } + return nil +} + +func init() { + proto.RegisterType((*FloatingIP)(nil), "oaktreemodel.FloatingIP") + proto.RegisterType((*FloatingIPList)(nil), "oaktreemodel.FloatingIPList") + proto.RegisterEnum("oaktreemodel.FloatingIP_Status", FloatingIP_Status_name, FloatingIP_Status_value) +} + +func init() { proto.RegisterFile("oaktreemodel/floating_ip.proto", fileDescriptor2) } + +var fileDescriptor2 = []byte{ + // 404 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x41, 0x6f, 0xd3, 0x40, + 0x10, 0x85, 0x59, 0x27, 0x71, 0x93, 0x49, 0x15, 0xcc, 0x80, 0xd0, 0xd2, 0x03, 0xb5, 0x72, 0x32, + 0x17, 0x47, 0x0a, 0x42, 0x45, 0x54, 0x1c, 0x8a, 0x04, 0xa2, 0x52, 0x91, 0x2a, 0x73, 0xe3, 0x12, + 0x2d, 0xde, 0x6d, 0x58, 0x25, 0xf1, 0xac, 0x76, 0xa7, 0x2d, 0xfd, 0xc3, 0xfc, 0x0e, 0xc4, 0xc6, + 0x4d, 0x5c, 0xa4, 0xde, 0x76, 0xe6, 0x7d, 0xcf, 0x9a, 0xf7, 0x64, 0x78, 0x4d, 0x6a, 0xc5, 0xde, + 0x98, 0x0d, 0x69, 0xb3, 0x9e, 0x5d, 0xad, 0x49, 0xb1, 0x6d, 0x96, 0x0b, 0xeb, 0x4a, 0xe7, 0x89, + 0x09, 0x0f, 0xbb, 0xfa, 0xd1, 0xab, 0x07, 0x74, 0x4d, 0x9b, 0x0d, 0x35, 0x5b, 0x70, 0xfa, 0xa7, + 0x07, 0xf0, 0xa5, 0xb5, 0x9f, 0x5f, 0xe2, 0x1c, 0x86, 0x6b, 0xaa, 0x15, 0x5b, 0x6a, 0xa4, 0xc8, + 0x45, 0x31, 0x9e, 0xbf, 0x2c, 0xbb, 0xe6, 0xf2, 0xa2, 0x55, 0xab, 0x1d, 0x87, 0x13, 0x48, 0xac, + 0x96, 0x49, 0x2e, 0x8a, 0x51, 0x95, 0x58, 0x8d, 0xc7, 0x30, 0xb6, 0x61, 0xa1, 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b, 0x4c, 0xf6, 0x37, 0x5d, 0xd8, 0xc0, 0x78, 0x0a, 0x87, 0x9d, 0x72, 0x83, 0x14, + 0x31, 0x87, 0x7c, 0x2c, 0x47, 0x35, 0xde, 0xf7, 0x1d, 0x3e, 0x9d, 0xfc, 0x78, 0xb7, 0xb4, 0x5c, + 0x92, 0x33, 0x4d, 0x60, 0x55, 0xaf, 0x4a, 0xf2, 0xcb, 0xd9, 0x6e, 0x9a, 0x75, 0xbf, 0x71, 0xda, + 0x1d, 0x7e, 0xa6, 0xf1, 0xbf, 0x7b, 0xfb, 0x37, 0x00, 0x00, 0xff, 0xff, 0xa9, 0x51, 0xe6, 0xb4, + 0xc2, 0x02, 0x00, 0x00, +} diff --git a/glide.lock b/glide.lock new file mode 100644 index 0000000..4d8e3dd --- /dev/null +++ b/glide.lock @@ -0,0 +1,11 @@ +hash: 7028e5e73b29cfad12be34020a7e78fa28c547ee477b7a3dacf2a0471ed1bcce +updated: 2017-11-27T14:51:12.224751386-06:00 +imports: +- name: github.com/golang/protobuf + version: 1e59b77b52bf8e4b449a57e6f79f21226d571845 + subpackages: + - proto + - protoc-gen-go +- name: google.golang.org/grpc + version: 5a9f7b402fe85096d2e1d0383435ee1876e863d0 +testImports: [] diff --git a/glide.yaml b/glide.yaml new file mode 100644 index 0000000..dfebc9c --- /dev/null +++ b/glide.yaml @@ -0,0 +1,10 @@ +package: git.openstack.org/openstack/oaktreemodel +ignore: +- oaktreemodel +import: +- package: github.com/golang/protobuf + subpackages: + - proto + - protoc-gen-go +- package: google.golang.org/grpc + version: ^1.8.0 diff --git a/image.pb.go b/image.pb.go new file mode 100644 index 0000000..7009eb8 --- /dev/null +++ b/image.pb.go @@ -0,0 +1,393 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: oaktreemodel/image.proto + +package oaktreemodel + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +type DiskFormat_DiskFormatChoice int32 + +const ( + DiskFormat_qcow2 DiskFormat_DiskFormatChoice = 0 + DiskFormat_raw DiskFormat_DiskFormatChoice = 1 + DiskFormat_vhd DiskFormat_DiskFormatChoice = 2 + DiskFormat_iso DiskFormat_DiskFormatChoice = 3 + DiskFormat_vmdk DiskFormat_DiskFormatChoice = 4 + DiskFormat_vdi DiskFormat_DiskFormatChoice = 5 + DiskFormat_ami DiskFormat_DiskFormatChoice = 6 + DiskFormat_ari DiskFormat_DiskFormatChoice = 7 + DiskFormat_aki DiskFormat_DiskFormatChoice = 8 +) + +var DiskFormat_DiskFormatChoice_name = map[int32]string{ + 0: "qcow2", + 1: "raw", + 2: "vhd", + 3: "iso", + 4: "vmdk", + 5: "vdi", + 6: "ami", + 7: "ari", + 8: "aki", +} +var DiskFormat_DiskFormatChoice_value = map[string]int32{ + "qcow2": 0, + "raw": 1, + "vhd": 2, + "iso": 3, + "vmdk": 4, + "vdi": 5, + "ami": 6, + "ari": 7, + "aki": 8, +} + +func (x DiskFormat_DiskFormatChoice) String() string { + return proto.EnumName(DiskFormat_DiskFormatChoice_name, int32(x)) +} +func (DiskFormat_DiskFormatChoice) EnumDescriptor() ([]byte, []int) { + return fileDescriptor3, []int{0, 0} +} + +type ContainerFormat_ContainerFormatChoice int32 + +const ( + ContainerFormat_bare ContainerFormat_ContainerFormatChoice = 0 + ContainerFormat_docker ContainerFormat_ContainerFormatChoice = 1 + ContainerFormat_ovf ContainerFormat_ContainerFormatChoice = 2 + ContainerFormat_ova ContainerFormat_ContainerFormatChoice = 3 + ContainerFormat_ami ContainerFormat_ContainerFormatChoice = 4 + ContainerFormat_ari ContainerFormat_ContainerFormatChoice = 5 + ContainerFormat_aki ContainerFormat_ContainerFormatChoice = 6 +) + +var ContainerFormat_ContainerFormatChoice_name = map[int32]string{ + 0: "bare", + 1: "docker", + 2: "ovf", + 3: "ova", + 4: "ami", + 5: "ari", + 6: "aki", +} +var ContainerFormat_ContainerFormatChoice_value = map[string]int32{ + "bare": 0, + "docker": 1, + "ovf": 2, + "ova": 3, + "ami": 4, + "ari": 5, + "aki": 6, +} + +func (x ContainerFormat_ContainerFormatChoice) String() string { + return proto.EnumName(ContainerFormat_ContainerFormatChoice_name, int32(x)) +} +func (ContainerFormat_ContainerFormatChoice) EnumDescriptor() ([]byte, []int) { + return fileDescriptor3, []int{1, 0} +} + +type Image_Status int32 + +const ( + Image_active Image_Status = 0 + Image_queued Image_Status = 1 + Image_saving Image_Status = 2 + Image_deleted Image_Status = 3 + Image_killed Image_Status = 4 + Image_pending_delete Image_Status = 5 + Image_deactivated Image_Status = 6 +) + +var Image_Status_name = map[int32]string{ + 0: "active", + 1: "queued", + 2: "saving", + 3: "deleted", + 4: "killed", + 5: "pending_delete", + 6: "deactivated", +} +var Image_Status_value = map[string]int32{ + "active": 0, + "queued": 1, + "saving": 2, + "deleted": 3, + "killed": 4, + "pending_delete": 5, + "deactivated": 6, +} + +func (x Image_Status) String() string { + return proto.EnumName(Image_Status_name, int32(x)) +} +func (Image_Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor3, []int{2, 0} } + +type DiskFormat struct { +} + +func (m *DiskFormat) Reset() { *m = DiskFormat{} } +func (m *DiskFormat) String() string { return proto.CompactTextString(m) } +func (*DiskFormat) ProtoMessage() {} +func (*DiskFormat) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} } + +type ContainerFormat struct { +} + +func (m *ContainerFormat) Reset() { *m = ContainerFormat{} } +func (m *ContainerFormat) String() string { return proto.CompactTextString(m) } +func (*ContainerFormat) ProtoMessage() {} +func (*ContainerFormat) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} } + +type Image struct { + Location *Location `protobuf:"bytes,1,opt,name=location" json:"location,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` + MinRam uint32 `protobuf:"varint,4,opt,name=min_ram,json=minRam" json:"min_ram,omitempty"` + MinDisk uint64 `protobuf:"varint,5,opt,name=min_disk,json=minDisk" json:"min_disk,omitempty"` + Size uint64 `protobuf:"varint,6,opt,name=size" json:"size,omitempty"` + VirtualSize uint64 `protobuf:"varint,7,opt,name=virtual_size,json=virtualSize" json:"virtual_size,omitempty"` + ContainerFormat ContainerFormat_ContainerFormatChoice `protobuf:"varint,8,opt,name=container_format,json=containerFormat,enum=oaktreemodel.ContainerFormat_ContainerFormatChoice" json:"container_format,omitempty"` + DiskFormat DiskFormat_DiskFormatChoice `protobuf:"varint,9,opt,name=disk_format,json=diskFormat,enum=oaktreemodel.DiskFormat_DiskFormatChoice" json:"disk_format,omitempty"` + Checksum string `protobuf:"bytes,10,opt,name=checksum" json:"checksum,omitempty"` + CreatedAt string `protobuf:"bytes,11,opt,name=created_at,json=createdAt" json:"created_at,omitempty"` + UpdatedAt string `protobuf:"bytes,12,opt,name=updated_at,json=updatedAt" json:"updated_at,omitempty"` + Owner string `protobuf:"bytes,13,opt,name=owner" json:"owner,omitempty"` + IsPublic bool `protobuf:"varint,14,opt,name=is_public,json=isPublic" json:"is_public,omitempty"` + IsProtected bool `protobuf:"varint,15,opt,name=is_protected,json=isProtected" json:"is_protected,omitempty"` + Status Image_Status `protobuf:"varint,16,opt,name=status,enum=oaktreemodel.Image_Status" json:"status,omitempty"` + Locations []string `protobuf:"bytes,17,rep,name=locations" json:"locations,omitempty"` + DirectUrl string `protobuf:"bytes,18,opt,name=direct_url,json=directUrl" json:"direct_url,omitempty"` + Tags []string `protobuf:"bytes,19,rep,name=tags" json:"tags,omitempty"` + Properties map[string]string `protobuf:"bytes,99,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *Image) Reset() { *m = Image{} } +func (m *Image) String() string { return proto.CompactTextString(m) } +func (*Image) ProtoMessage() {} +func (*Image) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{2} } + +func (m *Image) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *Image) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Image) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Image) GetMinRam() uint32 { + if m != nil { + return m.MinRam + } + return 0 +} + +func (m *Image) GetMinDisk() uint64 { + if m != nil { + return m.MinDisk + } + return 0 +} + +func (m *Image) GetSize() uint64 { + if m != nil { + return m.Size + } + return 0 +} + +func (m *Image) GetVirtualSize() uint64 { + if m != nil { + return m.VirtualSize + } + return 0 +} + +func (m *Image) GetContainerFormat() ContainerFormat_ContainerFormatChoice { + if m != nil { + return m.ContainerFormat + } + return ContainerFormat_bare +} + +func (m *Image) GetDiskFormat() DiskFormat_DiskFormatChoice { + if m != nil { + return m.DiskFormat + } + return DiskFormat_qcow2 +} + +func (m *Image) GetChecksum() string { + if m != nil { + return m.Checksum + } + return "" +} + +func (m *Image) GetCreatedAt() string { + if m != nil { + return m.CreatedAt + } + return "" +} + +func (m *Image) GetUpdatedAt() string { + if m != nil { + return m.UpdatedAt + } + return "" +} + +func (m *Image) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *Image) GetIsPublic() bool { + if m != nil { + return m.IsPublic + } + return false +} + +func (m *Image) GetIsProtected() bool { + if m != nil { + return m.IsProtected + } + return false +} + +func (m *Image) GetStatus() Image_Status { + if m != nil { + return m.Status + } + return Image_active +} + +func (m *Image) GetLocations() []string { + if m != nil { + return m.Locations + } + return nil +} + +func (m *Image) GetDirectUrl() string { + if m != nil { + return m.DirectUrl + } + return "" +} + +func (m *Image) GetTags() []string { + if m != nil { + return m.Tags + } + return nil +} + +func (m *Image) GetProperties() map[string]string { + if m != nil { + return m.Properties + } + return nil +} + +type ImageList struct { + Images []*Image `protobuf:"bytes,1,rep,name=images" json:"images,omitempty"` +} + +func (m *ImageList) Reset() { *m = ImageList{} } +func (m *ImageList) String() string { return proto.CompactTextString(m) } +func (*ImageList) ProtoMessage() {} +func (*ImageList) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{3} } + +func (m *ImageList) GetImages() []*Image { + if m != nil { + return m.Images + } + return nil +} + +func init() { + proto.RegisterType((*DiskFormat)(nil), "oaktreemodel.DiskFormat") + proto.RegisterType((*ContainerFormat)(nil), "oaktreemodel.ContainerFormat") + proto.RegisterType((*Image)(nil), "oaktreemodel.Image") + proto.RegisterType((*ImageList)(nil), "oaktreemodel.ImageList") + proto.RegisterEnum("oaktreemodel.DiskFormat_DiskFormatChoice", DiskFormat_DiskFormatChoice_name, DiskFormat_DiskFormatChoice_value) + proto.RegisterEnum("oaktreemodel.ContainerFormat_ContainerFormatChoice", ContainerFormat_ContainerFormatChoice_name, ContainerFormat_ContainerFormatChoice_value) + proto.RegisterEnum("oaktreemodel.Image_Status", Image_Status_name, Image_Status_value) +} + +func init() { proto.RegisterFile("oaktreemodel/image.proto", fileDescriptor3) } + +var fileDescriptor3 = []byte{ + // 726 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x54, 0x5d, 0x6f, 0xdb, 0x36, + 0x14, 0xad, 0x2c, 0x59, 0x96, 0xae, 0xd2, 0x98, 0x63, 0xf7, 0xc1, 0x66, 0x1b, 0xa0, 0x79, 0x2f, + 0x1e, 0x06, 0x28, 0x80, 0x8b, 0x61, 0xc5, 0x86, 0x3d, 0x74, 0xd9, 0x06, 0x6c, 0xe8, 0x43, 0xa0, + 0x62, 0x2f, 0x7d, 0x98, 0xc1, 0x90, 0x8c, 0xc3, 0xe9, 0x83, 0x2e, 0x49, 0x29, 0xe8, 0xfe, 0xca, + 0xfe, 0x6c, 0x41, 0x4a, 0x72, 0xed, 0x20, 0x6f, 0xe7, 0x9e, 0x73, 0x48, 0xde, 0x7b, 0x7c, 0x2d, + 0x20, 0x8a, 0x56, 0x56, 0x0b, 0xd1, 0x28, 0x2e, 0xea, 0x4b, 0xd9, 0xd0, 0x9d, 0x28, 0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e7, 0x7b, + 0xd1, 0x72, 0xd9, 0xee, 0xb6, 0x83, 0x01, 0xcd, 0xf1, 0x12, 0x32, 0x2e, 0xfc, 0x95, 0xee, 0xa7, + 0x44, 0xf1, 0xea, 0x25, 0xa4, 0x7e, 0x9e, 0xd7, 0xd2, 0x58, 0xfc, 0x3d, 0xc4, 0xfe, 0x3b, 0x66, + 0x48, 0xe0, 0x07, 0x7f, 0xf6, 0xc8, 0xe0, 0xe5, 0x68, 0xf9, 0xf5, 0xc7, 0xb7, 0x3f, 0xec, 0xa4, + 0x2d, 0xd4, 0x5e, 0xb4, 0xc6, 0x52, 0x56, 0x15, 0x4a, 0xef, 0x2e, 0x0f, 0xd5, 0xe5, 0xf1, 0xc9, + 0x9f, 0x8f, 0x8b, 0x9b, 0xd8, 0x7f, 0xfc, 0x5e, 0x7c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x8f, + 0x35, 0x84, 0x41, 0x05, 0x00, 0x00, +} diff --git a/oaktree.pb.go b/oaktree.pb.go new file mode 100644 index 0000000..7c33ddd --- /dev/null +++ b/oaktree.pb.go @@ -0,0 +1,42 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: oaktreemodel/oaktree.proto + +package oaktreemodel + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func init() { proto.RegisterFile("oaktreemodel/oaktree.proto", fileDescriptor4) } + +var fileDescriptor4 = []byte{ + // 355 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0xdd, 0x4a, 0xfb, 0x30, + 0x14, 0xef, 0xff, 0x2f, 0x7e, 0x1d, 0x27, 0x4a, 0x1c, 0x3a, 0xab, 0x28, 0xc6, 0xfb, 0x0e, 0x14, + 0x11, 0x11, 0x91, 0xed, 0x62, 0x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6b, 0xa8, 0x38, 0x40, + 0x17, 0x00, 0xda, 0xc2, 0x8c, 0xbe, 0xf0, 0xad, 0x19, 0x52, 0x9b, 0x4b, 0x60, 0x9d, 0x50, 0x75, + 0x67, 0x8f, 0x89, 0xe8, 0x53, 0xf2, 0x98, 0xec, 0xb8, 0x5b, 0x47, 0x82, 0x03, 0x74, 0x03, 0x48, + 0x5b, 0x3a, 0x6b, 0x5f, 0x9f, 0xfd, 0x6f, 0xac, 0x6c, 0xaf, 0x1e, 0xd4, 0xab, 0xbd, 0x6e, 0xf3, + 0x84, 0xfe, 0xc1, 0x50, 0xcb, 0x70, 0x80, 0xee, 0x61, 0xf3, 0x4b, 0x3f, 0x0d, 0xf9, 0x3a, 0x1e, + 0xfe, 0x60, 0x59, 0xf4, 0x6c, 0x73, 0x08, 0x85, 0x64, 0x91, 0x98, 0xd0, 0x71, 0xa6, 0xe2, 0xe1, + 0xc8, 0x51, 0xb5, 0x6b, 0xf6, 0x9a, 0xf7, 0xf5, 0xbd, 0xef, 0xff, 0x7b, 0x38, 0x61, 0x5c, 0x95, + 0xb9, 0x92, 0x35, 0x3f, 0xa7, 0x66, 0x59, 0x79, 0x5e, 0x1e, 0xde, 0xfe, 0xcf, 0xf5, 0x5a, 0x57, + 0x8f, 0x0b, 0xe6, 0xf5, 0x1c, 0x7f, 0x04, 0x00, 0x00, 0xff, 0xff, 0x8c, 0x52, 0x47, 0x28, 0xfc, + 0x03, 0x00, 0x00, +} diff --git a/oaktreemodel/common.proto b/oaktreemodel/common.proto index b3d17a0..f7e768b 100644 --- a/oaktreemodel/common.proto +++ b/oaktreemodel/common.proto @@ -14,8 +14,9 @@ // limitations under the License. syntax = "proto3"; +option go_package = "git.openstack.org/openstack/oaktreemodel;oaktreemodel"; -package oaktree; +package oaktreemodel; message Project { oneof project { diff --git a/oaktreemodel/flavor.pb.go b/oaktreemodel/flavor.pb.go deleted file mode 100644 index f31d2b7..0000000 --- a/oaktreemodel/flavor.pb.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by protoc-gen-go. -// source: flavor.proto -// DO NOT EDIT! - -/* -Package oaktree is a generated protocol buffer package. - -It is generated from these files: - flavor.proto - -It has these top-level messages: - Flavor - FlavorList -*/ -package oaktree - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import oaktree1 "." - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type Flavor struct { - Location *oaktree1.Location `protobuf:"bytes,1,opt,name=location" json:"location,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` - IsPublic bool `protobuf:"varint,4,opt,name=is_public,json=isPublic" json:"is_public,omitempty"` - Disabled bool `protobuf:"varint,5,opt,name=disabled" json:"disabled,omitempty"` - Ram uint32 `protobuf:"varint,6,opt,name=ram" json:"ram,omitempty"` - Vcpus uint32 `protobuf:"varint,7,opt,name=vcpus" json:"vcpus,omitempty"` - Disk uint64 `protobuf:"varint,8,opt,name=disk" json:"disk,omitempty"` - Ephemeral uint32 `protobuf:"varint,9,opt,name=ephemeral" json:"ephemeral,omitempty"` - Swap uint64 `protobuf:"varint,10,opt,name=swap" json:"swap,omitempty"` - RxtxFactor float32 `protobuf:"fixed32,11,opt,name=rxtx_factor,json=rxtxFactor" json:"rxtx_factor,omitempty"` - Properties map[string]string `protobuf:"bytes,99,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *Flavor) Reset() { *m = Flavor{} } -func (m *Flavor) String() string { return proto.CompactTextString(m) } -func (*Flavor) ProtoMessage() {} -func (*Flavor) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -func (m *Flavor) GetLocation() *oaktree1.Location { - if m != nil { - return m.Location - } - return nil -} - -func (m *Flavor) GetProperties() map[string]string { - if m != nil { - return m.Properties - } - return nil -} - -type FlavorList struct { - Flavors []*Flavor `protobuf:"bytes,1,rep,name=flavors" json:"flavors,omitempty"` -} - -func (m *FlavorList) Reset() { *m = FlavorList{} } -func (m *FlavorList) String() string { return proto.CompactTextString(m) } -func (*FlavorList) ProtoMessage() {} -func (*FlavorList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -func (m *FlavorList) GetFlavors() []*Flavor { - if m != nil { - return m.Flavors - } - return nil -} - -func init() { - proto.RegisterType((*Flavor)(nil), "oaktree.Flavor") - proto.RegisterType((*FlavorList)(nil), "oaktree.FlavorList") -} - -func init() { proto.RegisterFile("flavor.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 334 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x5c, 0x51, 0x4d, 0x4f, 0xc2, 0x30, - 0x18, 0x0e, 0x1b, 0x1f, 0xdb, 0x0b, 0x8a, 0xbe, 0xf1, 0xd0, 0xa0, 0x09, 0x84, 0x93, 0x1e, 0xdc, - 0x41, 0x0f, 0x1a, 0x13, 0xe3, 0x49, 0x4e, 0x1c, 0x48, 0xff, 0x00, 0x29, 0xa3, 0xc4, 0x86, 0x6d, - 0x5d, 0xda, 0x82, 0xf0, 0x7b, 0xfc, 0xa3, 0xf6, 0x03, 0xd0, 0x70, 0x7b, 0x3e, 0xd3, 0xf6, 0x29, - 0xf4, 0x56, 0x05, 0xdb, 0x4a, 0x95, 0xd5, 0x4a, 0x1a, 0x89, 0x1d, 0xc9, 0xd6, 0x46, 0x71, 0x3e, - 0xe8, 0xe5, 0xb2, 0x2c, 0x65, 0x15, 0xe4, 0xf1, 0x4f, 0x0c, 0xed, 0x89, 0xcf, 0xe1, 0x23, 0x24, - 0x85, 0xcc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xa9, 0x83, 0xfe, 0x89, 0xac, 0xd8, 0xf0, 0xc3, 0xa8, - 0x81, 0xbc, 0x45, 0xaf, 0x8d, 0xf1, 0x0b, 0x40, 0x38, 0x64, 0x2a, 0xb4, 0xc1, 0x07, 0xe8, 0x84, - 0xaf, 0xd5, 0xb6, 0xed, 0xae, 0xd2, 0x3f, 0xbb, 0x0a, 0x3d, 0xfa, 0x8b, 0xb6, 0xff, 0xe5, 0xe7, - 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x22, 0xa6, 0x39, 0x8f, 0x0c, 0x02, 0x00, 0x00, -} diff --git a/oaktreemodel/flavor.proto b/oaktreemodel/flavor.proto index d35b364..18948fc 100644 --- a/oaktreemodel/flavor.proto +++ b/oaktreemodel/flavor.proto @@ -14,10 +14,11 @@ // limitations under the License. syntax = "proto3"; +option go_package = "git.openstack.org/openstack/oaktreemodel;oaktreemodel"; -import "common.proto"; +import "oaktreemodel/common.proto"; -package oaktree; +package oaktreemodel; message Flavor { Location location = 1; diff --git a/oaktreemodel/floating_ip.pb.go b/oaktreemodel/floating_ip.pb.go deleted file mode 100644 index 7bc6f1f..0000000 --- a/oaktreemodel/floating_ip.pb.go +++ /dev/null @@ -1,137 +0,0 @@ -// Code generated by protoc-gen-go. -// source: floating_ip.proto -// DO NOT EDIT! - -/* -Package oaktree is a generated protocol buffer package. - -It is generated from these files: - floating_ip.proto - -It has these top-level messages: - FloatingIP - FloatingIPList -*/ -package oaktree - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import oaktree1 "." - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type FloatingIP_Status int32 - -const ( - FloatingIP_active FloatingIP_Status = 0 - FloatingIP_down FloatingIP_Status = 1 - FloatingIP_error FloatingIP_Status = 2 -) - -var FloatingIP_Status_name = map[int32]string{ - 0: "active", - 1: "down", - 2: "error", -} -var FloatingIP_Status_value = map[string]int32{ - "active": 0, - "down": 1, - "error": 2, -} - -func (x FloatingIP_Status) String() string { - return proto.EnumName(FloatingIP_Status_name, int32(x)) -} -func (FloatingIP_Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} } - -type FloatingIP struct { - Location *oaktree1.Location `protobuf:"bytes,1,opt,name=location" json:"location,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` - IsAttached bool `protobuf:"varint,3,opt,name=is_attached,json=isAttached" json:"is_attached,omitempty"` - FixedIpAddress string `protobuf:"bytes,4,opt,name=fixed_ip_address,json=fixedIpAddress" json:"fixed_ip_address,omitempty"` - FloatingIpAddress string `protobuf:"bytes,5,opt,name=floating_ip_address,json=floatingIpAddress" json:"floating_ip_address,omitempty"` - Network string `protobuf:"bytes,6,opt,name=network" json:"network,omitempty"` - Port string `protobuf:"bytes,7,opt,name=port" json:"port,omitempty"` - Status FloatingIP_Status `protobuf:"varint,8,opt,name=status,enum=oaktree.FloatingIP_Status" json:"status,omitempty"` - Properties map[string]string `protobuf:"bytes,99,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *FloatingIP) Reset() { *m = FloatingIP{} } -func (m *FloatingIP) String() string { return proto.CompactTextString(m) } -func (*FloatingIP) ProtoMessage() {} -func (*FloatingIP) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -func (m *FloatingIP) GetLocation() *oaktree1.Location { - if m != nil { - return m.Location - } - return nil -} - -func (m *FloatingIP) GetProperties() map[string]string { - if m != nil { - return m.Properties - } - return nil -} - -type FloatingIPList struct { - FloatingIps []*FloatingIP `protobuf:"bytes,1,rep,name=floating_ips,json=floatingIps" json:"floating_ips,omitempty"` -} - -func (m *FloatingIPList) Reset() { *m = FloatingIPList{} } -func (m *FloatingIPList) String() string { return proto.CompactTextString(m) } -func (*FloatingIPList) ProtoMessage() {} -func (*FloatingIPList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -func (m *FloatingIPList) GetFloatingIps() []*FloatingIP { - if m != nil { - return m.FloatingIps - } - return nil -} - -func init() { - proto.RegisterType((*FloatingIP)(nil), "oaktree.FloatingIP") - proto.RegisterType((*FloatingIPList)(nil), "oaktree.FloatingIPList") - proto.RegisterEnum("oaktree.FloatingIP_Status", FloatingIP_Status_name, FloatingIP_Status_value) -} - -func init() { proto.RegisterFile("floating_ip.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 365 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x92, 0xc1, 0x8e, 0xda, 0x30, - 0x10, 0x86, 0x9b, 0x04, 0x42, 0x18, 0x50, 0x1a, 0x86, 0x1e, 0x2c, 0x2e, 0x45, 0xf4, 0x42, 0x0f, - 0xcd, 0x81, 0x4a, 0x55, 0x55, 0xa9, 0x07, 0x54, 0x75, 0xb5, 0x48, 0x1c, 0x50, 0xf6, 0x01, 0x90, - 0x37, 0x31, 0xbb, 0x16, 0x10, 0x47, 0xb6, 0x81, 0xe5, 0x49, 0xf7, 0x75, 0xd6, 0x38, 0xd9, 0x04, - 0xad, 0xb8, 0xcd, 0xfc, 0xf3, 0x8d, 0x3c, 0xff, 0x2f, 0xc3, 0x60, 0xb3, 0x13, 0x54, 0xf3, 0xfc, - 0x69, 0xcd, 0x8b, 0xb8, 0x90, 0x42, 0x0b, 0xec, 0x08, 0xba, 0xd5, 0x92, 0xb1, 0x51, 0x3f, 0x15, - 0xfb, 0xbd, 0xc8, 0x4b, 0x79, 0xf2, 0xea, 0x01, 0xdc, 0x55, 0xf0, 0x62, 0x85, 0x3f, 0x20, 0xd8, - 0x89, 0xd4, 0x74, 0x22, 0x27, 0xce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x69, 0xaa, 0xf9, 0x91, - 0x45, 0x9f, 0x30, 0x80, 0x56, 0x26, 0x4e, 0x79, 0xe4, 0x60, 0x17, 0xda, 0x4c, 0x4a, 0x21, 0x23, - 0x77, 0x72, 0x0f, 0x61, 0x73, 0xd3, 0x92, 0x2b, 0x8d, 0xbf, 0xa0, 0x7f, 0x15, 0xa9, 0x32, 0x2f, - 0x5e, 0x2c, 0x0c, 0x6f, 0x58, 0x48, 0x7a, 0x4d, 0xc0, 0xea, 0xd1, 0xb7, 0x5f, 0xe5, 0xe7, 0x5b, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x1d, 0x8d, 0x18, 0x49, 0x56, 0x02, 0x00, 0x00, -} diff --git a/oaktreemodel/floating_ip.proto b/oaktreemodel/floating_ip.proto index bca48ed..871176e 100644 --- a/oaktreemodel/floating_ip.proto +++ b/oaktreemodel/floating_ip.proto @@ -14,10 +14,11 @@ // limitations under the License. syntax = "proto3"; +option go_package = "git.openstack.org/openstack/oaktreemodel;oaktreemodel"; -import "common.proto"; +import "oaktreemodel/common.proto"; -package oaktree; +package oaktreemodel; message FloatingIP { Location location = 1; diff --git a/oaktreemodel/image.pb.go b/oaktreemodel/image.pb.go deleted file mode 100644 index 04e4cf5..0000000 --- a/oaktreemodel/image.pb.go +++ /dev/null @@ -1,284 +0,0 @@ -// Code generated by protoc-gen-go. -// source: image.proto -// DO NOT EDIT! - -/* -Package oaktree is a generated protocol buffer package. - -It is generated from these files: - image.proto - -It has these top-level messages: - DiskFormat - ContainerFormat - Image - ImageList -*/ -package oaktree - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import oaktree1 "." - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type DiskFormat_DiskFormatChoice int32 - -const ( - DiskFormat_qcow2 DiskFormat_DiskFormatChoice = 0 - DiskFormat_raw DiskFormat_DiskFormatChoice = 1 - DiskFormat_vhd DiskFormat_DiskFormatChoice = 2 - DiskFormat_iso DiskFormat_DiskFormatChoice = 3 - DiskFormat_vmdk DiskFormat_DiskFormatChoice = 4 - DiskFormat_vdi DiskFormat_DiskFormatChoice = 5 - DiskFormat_ami DiskFormat_DiskFormatChoice = 6 - DiskFormat_ari DiskFormat_DiskFormatChoice = 7 - DiskFormat_aki DiskFormat_DiskFormatChoice = 8 -) - -var DiskFormat_DiskFormatChoice_name = map[int32]string{ - 0: "qcow2", - 1: "raw", - 2: "vhd", - 3: "iso", - 4: "vmdk", - 5: "vdi", - 6: "ami", - 7: "ari", - 8: "aki", -} -var DiskFormat_DiskFormatChoice_value = map[string]int32{ - "qcow2": 0, - "raw": 1, - "vhd": 2, - "iso": 3, - "vmdk": 4, - "vdi": 5, - "ami": 6, - "ari": 7, - "aki": 8, -} - -func (x DiskFormat_DiskFormatChoice) String() string { - return proto.EnumName(DiskFormat_DiskFormatChoice_name, int32(x)) -} -func (DiskFormat_DiskFormatChoice) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{0, 0} -} - -type ContainerFormat_ContainerFormatChoice int32 - -const ( - ContainerFormat_bare ContainerFormat_ContainerFormatChoice = 0 - ContainerFormat_docker ContainerFormat_ContainerFormatChoice = 1 - ContainerFormat_ovf ContainerFormat_ContainerFormatChoice = 2 - ContainerFormat_ova ContainerFormat_ContainerFormatChoice = 3 - ContainerFormat_ami ContainerFormat_ContainerFormatChoice = 4 - ContainerFormat_ari ContainerFormat_ContainerFormatChoice = 5 - ContainerFormat_aki ContainerFormat_ContainerFormatChoice = 6 -) - -var ContainerFormat_ContainerFormatChoice_name = map[int32]string{ - 0: "bare", - 1: "docker", - 2: "ovf", - 3: "ova", - 4: "ami", - 5: "ari", - 6: "aki", -} -var ContainerFormat_ContainerFormatChoice_value = map[string]int32{ - "bare": 0, - "docker": 1, - "ovf": 2, - "ova": 3, - "ami": 4, - "ari": 5, - "aki": 6, -} - -func (x ContainerFormat_ContainerFormatChoice) String() string { - return proto.EnumName(ContainerFormat_ContainerFormatChoice_name, int32(x)) -} -func (ContainerFormat_ContainerFormatChoice) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{1, 0} -} - -type Image_Status int32 - -const ( - Image_active Image_Status = 0 - Image_queued Image_Status = 1 - Image_saving Image_Status = 2 - Image_deleted Image_Status = 3 - Image_killed Image_Status = 4 - Image_pending_delete Image_Status = 5 - Image_deactivated Image_Status = 6 -) - -var Image_Status_name = map[int32]string{ - 0: "active", - 1: "queued", - 2: "saving", - 3: "deleted", - 4: "killed", - 5: "pending_delete", - 6: "deactivated", -} -var Image_Status_value = map[string]int32{ - "active": 0, - "queued": 1, - "saving": 2, - "deleted": 3, - "killed": 4, - "pending_delete": 5, - "deactivated": 6, -} - -func (x Image_Status) String() string { - return proto.EnumName(Image_Status_name, int32(x)) -} -func (Image_Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} } - -type DiskFormat struct { -} - -func (m *DiskFormat) Reset() { *m = DiskFormat{} } -func (m *DiskFormat) String() string { return proto.CompactTextString(m) } -func (*DiskFormat) ProtoMessage() {} -func (*DiskFormat) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -type ContainerFormat struct { -} - -func (m *ContainerFormat) Reset() { *m = ContainerFormat{} } -func (m *ContainerFormat) String() string { return proto.CompactTextString(m) } -func (*ContainerFormat) ProtoMessage() {} -func (*ContainerFormat) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -type Image struct { - Location *oaktree1.Location `protobuf:"bytes,1,opt,name=location" json:"location,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` - MinRam uint32 `protobuf:"varint,4,opt,name=min_ram,json=minRam" json:"min_ram,omitempty"` - MinDisk uint64 `protobuf:"varint,5,opt,name=min_disk,json=minDisk" json:"min_disk,omitempty"` - Size uint64 `protobuf:"varint,6,opt,name=size" json:"size,omitempty"` - VirtualSize uint64 `protobuf:"varint,7,opt,name=virtual_size,json=virtualSize" json:"virtual_size,omitempty"` - ContainerFormat ContainerFormat_ContainerFormatChoice `protobuf:"varint,8,opt,name=container_format,json=containerFormat,enum=oaktree.ContainerFormat_ContainerFormatChoice" json:"container_format,omitempty"` - DiskFormat DiskFormat_DiskFormatChoice `protobuf:"varint,9,opt,name=disk_format,json=diskFormat,enum=oaktree.DiskFormat_DiskFormatChoice" json:"disk_format,omitempty"` - Checksum string `protobuf:"bytes,10,opt,name=checksum" json:"checksum,omitempty"` - CreatedAt string `protobuf:"bytes,11,opt,name=created_at,json=createdAt" json:"created_at,omitempty"` - UpdatedAt string `protobuf:"bytes,12,opt,name=updated_at,json=updatedAt" json:"updated_at,omitempty"` - Owner string `protobuf:"bytes,13,opt,name=owner" json:"owner,omitempty"` - IsPublic bool `protobuf:"varint,14,opt,name=is_public,json=isPublic" json:"is_public,omitempty"` - IsProtected bool `protobuf:"varint,15,opt,name=is_protected,json=isProtected" json:"is_protected,omitempty"` - Status Image_Status `protobuf:"varint,16,opt,name=status,enum=oaktree.Image_Status" json:"status,omitempty"` - Locations []string `protobuf:"bytes,17,rep,name=locations" json:"locations,omitempty"` - DirectUrl string `protobuf:"bytes,18,opt,name=direct_url,json=directUrl" json:"direct_url,omitempty"` - Tags []string `protobuf:"bytes,19,rep,name=tags" json:"tags,omitempty"` - Properties map[string]string `protobuf:"bytes,99,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *Image) Reset() { *m = Image{} } -func (m *Image) String() string { return proto.CompactTextString(m) } -func (*Image) ProtoMessage() {} -func (*Image) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } - -func (m *Image) GetLocation() *oaktree1.Location { - if m != nil { - return m.Location - } - return nil -} - -func (m *Image) GetProperties() map[string]string { - if m != nil { - return m.Properties - } - return nil -} - -type ImageList struct { - Images []*Image `protobuf:"bytes,1,rep,name=images" json:"images,omitempty"` -} - -func (m *ImageList) Reset() { *m = ImageList{} } -func (m *ImageList) String() string { return proto.CompactTextString(m) } -func (*ImageList) ProtoMessage() {} -func (*ImageList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } - -func (m *ImageList) GetImages() []*Image { - if m != nil { - return m.Images - } - return nil -} - -func init() { - proto.RegisterType((*DiskFormat)(nil), "oaktree.DiskFormat") - proto.RegisterType((*ContainerFormat)(nil), "oaktree.ContainerFormat") - proto.RegisterType((*Image)(nil), "oaktree.Image") - proto.RegisterType((*ImageList)(nil), "oaktree.ImageList") - proto.RegisterEnum("oaktree.DiskFormat_DiskFormatChoice", DiskFormat_DiskFormatChoice_name, DiskFormat_DiskFormatChoice_value) - proto.RegisterEnum("oaktree.ContainerFormat_ContainerFormatChoice", ContainerFormat_ContainerFormatChoice_name, ContainerFormat_ContainerFormatChoice_value) - proto.RegisterEnum("oaktree.Image_Status", Image_Status_name, Image_Status_value) -} - -func init() { proto.RegisterFile("image.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 676 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x54, 0x4b, 0x6f, 0xd3, 0x4c, - 0x14, 0xfd, 0xf2, 0x72, 0xec, 0xeb, 0x36, 0x71, 0xe7, 0xa3, 0x62, 0x28, 0x0f, 0x95, 0x08, 0x21, - 0x36, 0x64, 0x91, 0x6e, 0x10, 0x12, 0x48, 0xa8, 0x14, 0x09, 0xa9, 0x8b, 0xca, 0x15, 0x0b, 0xd8, - 0x44, 0x53, 0x7b, 0xda, 0x0e, 0x7e, 0x4c, 0x3a, 0x33, 0x76, 0x55, 0x96, 0xfc, 0x72, 0xee, 0x8c, - 0x1f, 0xa5, 0x11, 0x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8f, 0x71, 0xb2, 0xd9, 0x86, 0x97, 0x29, 0x46, 0xad, 0x9b, 0x00, 0x3c, - 0xbe, 0x39, 0x2e, 0x14, 0x77, 0x29, 0xed, 0x1f, 0x88, 0x47, 0x78, 0x04, 0x81, 0x9b, 0xe7, 0x54, - 0x68, 0x43, 0x5e, 0x83, 0xe7, 0x3e, 0x4e, 0x1a, 0xfb, 0xb4, 0x33, 0xcf, 0x1e, 0xce, 0x1c, 0xb7, - 0xea, 0x85, 0xe7, 0xbe, 0x52, 0x47, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x9f, 0xb3, 0x99, 0x9b, - 0xcb, 0x04, 0x00, 0x00, -} diff --git a/oaktreemodel/image.proto b/oaktreemodel/image.proto index d1adcb9..ba97ef0 100644 --- a/oaktreemodel/image.proto +++ b/oaktreemodel/image.proto @@ -14,10 +14,11 @@ // limitations under the License. syntax = "proto3"; +option go_package = "git.openstack.org/openstack/oaktreemodel;oaktreemodel"; -import "common.proto"; +import "oaktreemodel/common.proto"; -package oaktree; +package oaktreemodel; message DiskFormat { enum DiskFormatChoice { diff --git a/oaktreemodel/oaktree.pb.go b/oaktreemodel/oaktree.pb.go deleted file mode 100644 index ae5327a..0000000 --- a/oaktreemodel/oaktree.pb.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by protoc-gen-go. -// source: oaktree.proto -// DO NOT EDIT! - -/* -Package oaktree is a generated protocol buffer package. - -It is generated from these files: - oaktree.proto - -It has these top-level messages: -*/ -package oaktree - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "." -import _ "." -import _ "." -import _ "." -import _ "." - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -func init() { proto.RegisterFile("oaktree.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 324 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x92, 0xdd, 0x4a, 0xc3, 0x30, - 0x1c, 0xc5, 0xfd, 0xc2, 0xe9, 0x7f, 0x9d, 0xd3, 0x38, 0x26, 0x54, 0xf0, 0xc2, 0x7b, 0x2b, 0x58, - 0xc4, 0xab, 0x5d, 0x38, 0x71, 0x63, 0x4c, 0x58, 0xd1, 0x07, 0x18, 0xb1, 0xa4, 0x25, 0xac, 0x6d, - 0x4a, 0x9a, 0x0a, 0xbe, 0x8e, 0xef, 0xe6, 0x7b, 0x98, 0xa4, 0xe9, 0xb0, 0x6b, 0x94, 0x5d, 0xe6, - 0xe4, 0xfc, 0xce, 0x39, 0x84, 0x40, 0x8f, 0xe1, 0x95, 0xe0, 0x84, 0x78, 0x39, 0x67, 0x82, 0xa1, - 0x8e, 0x39, 0xba, 0x4e, 0xc8, 0xd2, 0x94, 0x65, 0x95, 0xec, 0x3a, 0x51, 0x82, 0x3f, 0x18, 0x37, - 0xa7, 0xb3, 0x28, 0x61, 0x58, 0xd0, 0x2c, 0x5e, 0xd2, 0xdc, 0x48, 0x5d, 0x9a, 0xe2, 0xd8, 0x84, - 0xb8, 0x83, 0x82, 0x84, 0x25, 0xa7, 0xe2, 0x73, 0x19, 0x73, 0x56, 0x1a, 0xcb, 0xdd, 0xf7, 0x01, - 0x74, 0x16, 0x55, 0x3a, 0xba, 0x85, 0xe3, 0x29, 0x11, 0x13, 0x1d, 0x8a, 0xfa, 0x5e, 0xbd, 0x61, - 0x42, 0x13, 0x41, 0xb8, 0xfb, 0x4b, 0xd0, 0x8e, 0xeb, 0x1d, 0x74, 0x0f, 0xdd, 0x17, 0x5a, 0x18, - 0xa2, 0x68, 0x23, 0xe7, 0x1b, 0x88, 0x32, 0x4b, 0xec, 0x01, 0x7a, 0xba, 0xa7, 0x9a, 0x3b, 0x0b, - 0xfe, 0x07, 0x6b, 0x97, 0x04, 0x47, 0xd0, 0xaf, 0xfa, 0x6a, 0xcd, 0xd2, 0x79, 0x61, 0x41, 0x4d, - 0xef, 0x0d, 0x1c, 0xc9, 0xde, 0x99, 0x7a, 0x93, 0x36, 0x77, 0xb2, 0x16, 0xb4, 0x41, 0xda, 0x7d, - 0x00, 0x05, 0xea, 0xa3, 0xa5, 0x08, 0x35, 0x01, 0xd3, 0x31, 0x82, 0x53, 0xd9, 0xf1, 0x66, 0x9e, - 0x7a, 0xaa, 0x5e, 0xba, 0x8d, 0x0e, 0xd7, 0x42, 0xc3, 0x28, 0xf1, 0x27, 0x40, 0x2a, 0xa8, 0x21, - 0x5b, 0xba, 0x5d, 0x7b, 0x80, 0xd9, 0xf0, 0x0c, 0x83, 0xcd, 0x0d, 0xaf, 0x65, 0x42, 0xb6, 0x8e, - 0x51, 0x66, 0x19, 0x33, 0x87, 0x61, 0x6b, 0x8b, 0xba, 0xb2, 0xec, 0xb9, 0xfa, 0x3b, 0xa8, 0xda, - 0x34, 0xf6, 0xe1, 0x92, 0xf1, 0xd8, 0x63, 0x39, 0xc9, 0x0a, 0x81, 0xc3, 0x95, 0x47, 0xb3, 0x88, - 0xe3, 0x1a, 0x1b, 0x3b, 0xe6, 0x0f, 0x06, 0xea, 0x53, 0x06, 0xbb, 0x5f, 0x7b, 0xfb, 0x8b, 0xc7, - 0xf9, 0xfb, 0xa1, 0xfe, 0xa3, 0xfe, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x4b, 0xfa, 0x83, - 0x0f, 0x03, 0x00, 0x00, -} diff --git a/oaktreemodel/oaktree.proto b/oaktreemodel/oaktree.proto index be73cf2..77f56cc 100644 --- a/oaktreemodel/oaktree.proto +++ b/oaktreemodel/oaktree.proto @@ -15,18 +15,19 @@ syntax = "proto3"; +option go_package = "git.openstack.org/openstack/oaktreemodel;oaktreemodel"; option java_multiple_files = true; -option java_package = "org.openstack.infra.oaktree"; +option java_package = "org.openstack.oaktreemodel"; option java_outer_classname = "OaktreeProto"; option objc_class_prefix = "OAK"; -import "common.proto"; -import "flavor.proto"; -import "floating_ip.proto"; -import "image.proto"; -import "security_group.proto"; +import "oaktreemodel/common.proto"; +import "oaktreemodel/flavor.proto"; +import "oaktreemodel/floating_ip.proto"; +import "oaktreemodel/image.proto"; +import "oaktreemodel/security_group.proto"; -package oaktree; +package oaktreemodel; service Oaktree { rpc GetFlavor (Filter) returns (Flavor) {} diff --git a/oaktreemodel/security_group.pb.go b/oaktreemodel/security_group.pb.go deleted file mode 100644 index f9ceb24..0000000 --- a/oaktreemodel/security_group.pb.go +++ /dev/null @@ -1,200 +0,0 @@ -// Code generated by protoc-gen-go. -// source: security_group.proto -// DO NOT EDIT! - -/* -Package oaktree is a generated protocol buffer package. - -It is generated from these files: - security_group.proto - -It has these top-level messages: - SecurityGroupRule - SecurityGroupRuleList - SecurityGroup - SecurityGroupList -*/ -package oaktree - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import oaktree1 "." - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type SecurityGroupRule_Direction int32 - -const ( - SecurityGroupRule_ingress SecurityGroupRule_Direction = 0 - SecurityGroupRule_egress SecurityGroupRule_Direction = 1 -) - -var SecurityGroupRule_Direction_name = map[int32]string{ - 0: "ingress", - 1: "egress", -} -var SecurityGroupRule_Direction_value = map[string]int32{ - "ingress": 0, - "egress": 1, -} - -func (x SecurityGroupRule_Direction) String() string { - return proto.EnumName(SecurityGroupRule_Direction_name, int32(x)) -} -func (SecurityGroupRule_Direction) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{0, 0} -} - -type SecurityGroupRule struct { - Location *oaktree1.Location `protobuf:"bytes,1,opt,name=location" json:"location,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` - Direction SecurityGroupRule_Direction `protobuf:"varint,3,opt,name=direction,enum=oaktree.SecurityGroupRule_Direction" json:"direction,omitempty"` - Ethertype string `protobuf:"bytes,4,opt,name=ethertype" json:"ethertype,omitempty"` - PortRangeMin uint32 `protobuf:"varint,5,opt,name=port_range_min,json=portRangeMin" json:"port_range_min,omitempty"` - PortRangeMax uint32 `protobuf:"varint,6,opt,name=port_range_max,json=portRangeMax" json:"port_range_max,omitempty"` - Protocol string `protobuf:"bytes,7,opt,name=protocol" json:"protocol,omitempty"` - RemoteIpPrefix string `protobuf:"bytes,8,opt,name=remote_ip_prefix,json=remoteIpPrefix" json:"remote_ip_prefix,omitempty"` - SecurityGroupId string `protobuf:"bytes,9,opt,name=security_group_id,json=securityGroupId" json:"security_group_id,omitempty"` - RemoteGroupId string `protobuf:"bytes,10,opt,name=remote_group_id,json=remoteGroupId" json:"remote_group_id,omitempty"` - Properties map[string]string `protobuf:"bytes,99,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *SecurityGroupRule) Reset() { *m = SecurityGroupRule{} } -func (m *SecurityGroupRule) String() string { return proto.CompactTextString(m) } -func (*SecurityGroupRule) ProtoMessage() {} -func (*SecurityGroupRule) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -func (m *SecurityGroupRule) GetLocation() *oaktree1.Location { - if m != nil { - return m.Location - } - return nil -} - -func (m *SecurityGroupRule) GetProperties() map[string]string { - if m != nil { - return m.Properties - } - return nil -} - -type SecurityGroupRuleList struct { - Rules []*SecurityGroupRule `protobuf:"bytes,1,rep,name=rules" json:"rules,omitempty"` -} - -func (m *SecurityGroupRuleList) Reset() { *m = SecurityGroupRuleList{} } -func (m *SecurityGroupRuleList) String() string { return proto.CompactTextString(m) } -func (*SecurityGroupRuleList) ProtoMessage() {} -func (*SecurityGroupRuleList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -func (m *SecurityGroupRuleList) GetRules() []*SecurityGroupRule { - if m != nil { - return m.Rules - } - return nil -} - -type SecurityGroup struct { - Location *oaktree1.Location `protobuf:"bytes,1,opt,name=location" json:"location,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"` - Rules []*SecurityGroupRule `protobuf:"bytes,5,rep,name=rules" json:"rules,omitempty"` - Properties map[string]string `protobuf:"bytes,99,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *SecurityGroup) Reset() { *m = SecurityGroup{} } -func (m *SecurityGroup) String() string { return proto.CompactTextString(m) } -func (*SecurityGroup) ProtoMessage() {} -func (*SecurityGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } - -func (m *SecurityGroup) GetLocation() *oaktree1.Location { - if m != nil { - return m.Location - } - return nil -} - -func (m *SecurityGroup) GetRules() []*SecurityGroupRule { - if m != nil { - return m.Rules - } - return nil -} - -func (m *SecurityGroup) GetProperties() map[string]string { - if m != nil { - return m.Properties - } - return nil -} - -type SecurityGroupList struct { - SecurityGroups []*SecurityGroup `protobuf:"bytes,1,rep,name=security_groups,json=securityGroups" json:"security_groups,omitempty"` -} - -func (m *SecurityGroupList) Reset() { *m = SecurityGroupList{} } -func (m *SecurityGroupList) String() string { return proto.CompactTextString(m) } -func (*SecurityGroupList) ProtoMessage() {} -func (*SecurityGroupList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } - -func (m *SecurityGroupList) GetSecurityGroups() []*SecurityGroup { - if m != nil { - return m.SecurityGroups - } - return nil -} - -func init() { - proto.RegisterType((*SecurityGroupRule)(nil), "oaktree.SecurityGroupRule") - proto.RegisterType((*SecurityGroupRuleList)(nil), "oaktree.SecurityGroupRuleList") - proto.RegisterType((*SecurityGroup)(nil), "oaktree.SecurityGroup") - proto.RegisterType((*SecurityGroupList)(nil), "oaktree.SecurityGroupList") - proto.RegisterEnum("oaktree.SecurityGroupRule_Direction", SecurityGroupRule_Direction_name, SecurityGroupRule_Direction_value) -} - -func init() { proto.RegisterFile("security_group.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 473 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x93, 0x6d, 0x8b, 0xd3, 0x40, - 0x10, 0xc7, 0xed, 0x73, 0x33, 0xbd, 0xa6, 0xed, 0x70, 0x4a, 0x28, 0xbe, 0x28, 0xa5, 0x1c, 0xc7, - 0x81, 0x45, 0xce, 0x37, 0x22, 0x88, 0x20, 0x3e, 0x50, 0x39, 0xe1, 0x58, 0x7d, 0x1f, 0x62, 0x3a, - 0xd6, 0xe5, 0x9a, 0xec, 0xb2, 0xbb, 0x95, 0xf6, 0xc3, 0xf9, 0x09, 0xfc, 0x52, 0x6e, 0x36, 0x69, - 0xfa, 0x70, 0x77, 0x22, 0xc8, 0xbd, 0x9b, 0xfc, 0xf7, 0x37, 0xbb, 0x33, 0xf3, 0x9f, 0xc0, 0xa9, - 0xa6, 0x78, 0xa5, 0xb8, 0xd9, 0x84, 0x0b, 0x25, 0x56, 0x72, 0x2a, 0x95, 0x30, 0x02, 0x5b, 0x22, - 0xba, 0x31, 0x8a, 0x68, 0x78, 0x12, 0x8b, 0x24, 0x11, 0x69, 0x2e, 0x8f, 0x7f, 0xd7, 0x61, 0xf0, - 0xa5, 0xe0, 0x3f, 0x66, 0x38, 0x5b, 0x2d, 0x09, 0x9f, 0x41, 0x7b, 0x29, 0xe2, 0xc8, 0x70, 0x91, - 0x06, 0x95, 0x51, 0xe5, 0xbc, 0x73, 0x39, 0x98, 0x16, 0xf9, 0xd3,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0xd4, - 0x6e, 0x68, 0xe3, 0x0c, 0xf6, 0x58, 0x16, 0xe2, 0x29, 0x34, 0x7e, 0x46, 0xcb, 0x15, 0x15, 0x5e, - 0xe6, 0x1f, 0xaf, 0xaa, 0x2f, 0x2b, 0xe3, 0x09, 0x78, 0xa5, 0x4d, 0xd8, 0x81, 0x16, 0x4f, 0x17, - 0x8a, 0xb4, 0xee, 0x3f, 0x42, 0x80, 0x26, 0xe5, 0x71, 0x65, 0x3c, 0x83, 0xc7, 0xb7, 0xaa, 0xba, - 0xe2, 0xda, 0xe0, 0x73, 0x68, 0x28, 0x1b, 0x6b, 0xfb, 0x58, 0xd6, 0xc4, 0xf0, 0xfe, 0x26, 0x58, - 0x0e, 0x8e, 0x7f, 0x55, 0xa1, 0x7b, 0x70, 0xf8, 0xbf, 0x4b, 0x89, 0x50, 0x4f, 0xa3, 0x84, 0xdc, - 0x3e, 0x7a, 0xcc, 0xc5, 0x38, 0x82, 0xce, 0x9c, 0x74, 0xac, 0xb8, 0x74, 0xb7, 0xe6, 0x6b, 0xb6, - 0x2f, 0xed, 0x0a, 0x6f, 0xfc, 0x63, 0xe1, 0xf8, 0xe1, 0x0e, 0xd3, 0xce, 0xee, 0x4e, 0x7b, 0x48, - 0xc3, 0xbe, 0x1e, 0xfd, 0xd7, 0xce, 0x86, 0x37, 0xd0, 0x3b, 0x5c, 0xd2, 0xad, 0x21, 0x4f, 0xee, - 0xe9, 0xcb, 0x3f, 0x58, 0x5d, 0xfd, 0xad, 0xe9, 0xfe, 0x8c, 0x17, 0x7f, 0x02, 0x00, 0x00, 0xff, - 0xff, 0x3e, 0xd8, 0xb9, 0x74, 0x64, 0x04, 0x00, 0x00, -} diff --git a/oaktreemodel/security_group.proto b/oaktreemodel/security_group.proto index 7fc7b2c..777ae75 100644 --- a/oaktreemodel/security_group.proto +++ b/oaktreemodel/security_group.proto @@ -14,10 +14,11 @@ // limitations under the License. syntax = "proto3"; +option go_package = "git.openstack.org/openstack/oaktreemodel;oaktreemodel"; -import "common.proto"; +import "oaktreemodel/common.proto"; -package oaktree; +package oaktreemodel; message SecurityGroupRule { enum Direction { diff --git a/playbooks/distcheck.yaml b/playbooks/distcheck.yaml new file mode 100644 index 0000000..8cfb3d6 --- /dev/null +++ b/playbooks/distcheck.yaml @@ -0,0 +1,21 @@ +- hosts: all + tasks: + + - name: Run make distcheck + shell: + executable: /bin/bash + chdir: '{{ zuul_work_dir|default(zuul.project.src_dir) }}' + cmd: | + set -ex + export GOPATH=$HOME/go + export PATH="$GOPATH/bin:$HOME/.local/bin:$PATH" + ./bootstrap.sh + ./configure + make + # Runs go build so we can make sure we did not do anything to make + # the go lib unbuildable. + make oaktree-go-stamp + # There should be no changes to files as a result of running make. + # Most likely cause of changes is forgetting to update go files. + git diff --stat --exit-code HEAD + make distcheck diff --git a/security_group.pb.go b/security_group.pb.go new file mode 100644 index 0000000..63fe47f --- /dev/null +++ b/security_group.pb.go @@ -0,0 +1,267 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: oaktreemodel/security_group.proto + +package oaktreemodel + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +type SecurityGroupRule_Direction int32 + +const ( + SecurityGroupRule_ingress SecurityGroupRule_Direction = 0 + SecurityGroupRule_egress SecurityGroupRule_Direction = 1 +) + +var SecurityGroupRule_Direction_name = map[int32]string{ + 0: "ingress", + 1: "egress", +} +var SecurityGroupRule_Direction_value = map[string]int32{ + "ingress": 0, + "egress": 1, +} + +func (x SecurityGroupRule_Direction) String() string { + return proto.EnumName(SecurityGroupRule_Direction_name, int32(x)) +} +func (SecurityGroupRule_Direction) EnumDescriptor() ([]byte, []int) { + return fileDescriptor5, []int{0, 0} +} + +type SecurityGroupRule struct { + Location *Location `protobuf:"bytes,1,opt,name=location" json:"location,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` + Direction SecurityGroupRule_Direction `protobuf:"varint,3,opt,name=direction,enum=oaktreemodel.SecurityGroupRule_Direction" json:"direction,omitempty"` + Ethertype string `protobuf:"bytes,4,opt,name=ethertype" json:"ethertype,omitempty"` + PortRangeMin uint32 `protobuf:"varint,5,opt,name=port_range_min,json=portRangeMin" json:"port_range_min,omitempty"` + PortRangeMax uint32 `protobuf:"varint,6,opt,name=port_range_max,json=portRangeMax" json:"port_range_max,omitempty"` + Protocol string `protobuf:"bytes,7,opt,name=protocol" json:"protocol,omitempty"` + RemoteIpPrefix string `protobuf:"bytes,8,opt,name=remote_ip_prefix,json=remoteIpPrefix" json:"remote_ip_prefix,omitempty"` + SecurityGroupId string `protobuf:"bytes,9,opt,name=security_group_id,json=securityGroupId" json:"security_group_id,omitempty"` + RemoteGroupId string `protobuf:"bytes,10,opt,name=remote_group_id,json=remoteGroupId" json:"remote_group_id,omitempty"` + Properties map[string]string `protobuf:"bytes,99,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *SecurityGroupRule) Reset() { *m = SecurityGroupRule{} } +func (m *SecurityGroupRule) String() string { return proto.CompactTextString(m) } +func (*SecurityGroupRule) ProtoMessage() {} +func (*SecurityGroupRule) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{0} } + +func (m *SecurityGroupRule) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *SecurityGroupRule) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *SecurityGroupRule) GetDirection() SecurityGroupRule_Direction { + if m != nil { + return m.Direction + } + return SecurityGroupRule_ingress +} + +func (m *SecurityGroupRule) GetEthertype() string { + if m != nil { + return m.Ethertype + } + return "" +} + +func (m *SecurityGroupRule) GetPortRangeMin() uint32 { + if m != nil { + return m.PortRangeMin + } + return 0 +} + +func (m *SecurityGroupRule) GetPortRangeMax() uint32 { + if m != nil { + return m.PortRangeMax + } + return 0 +} + +func (m *SecurityGroupRule) GetProtocol() string { + if m != nil { + return m.Protocol + } + return "" +} + +func (m *SecurityGroupRule) GetRemoteIpPrefix() string { + if m != nil { + return m.RemoteIpPrefix + } + return "" +} + +func (m *SecurityGroupRule) GetSecurityGroupId() string { + if m != nil { + return m.SecurityGroupId + } + return "" +} + +func (m *SecurityGroupRule) GetRemoteGroupId() string { + if m != nil { + return m.RemoteGroupId + } + return "" +} + +func (m *SecurityGroupRule) GetProperties() map[string]string { + if m != nil { + return m.Properties + } + return nil +} + +type SecurityGroupRuleList struct { + Rules []*SecurityGroupRule `protobuf:"bytes,1,rep,name=rules" json:"rules,omitempty"` +} + +func (m *SecurityGroupRuleList) Reset() { *m = SecurityGroupRuleList{} } +func (m *SecurityGroupRuleList) String() string { return proto.CompactTextString(m) } +func (*SecurityGroupRuleList) ProtoMessage() {} +func (*SecurityGroupRuleList) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{1} } + +func (m *SecurityGroupRuleList) GetRules() []*SecurityGroupRule { + if m != nil { + return m.Rules + } + return nil +} + +type SecurityGroup struct { + Location *Location `protobuf:"bytes,1,opt,name=location" json:"location,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"` + Rules []*SecurityGroupRule `protobuf:"bytes,5,rep,name=rules" json:"rules,omitempty"` + Properties map[string]string `protobuf:"bytes,99,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *SecurityGroup) Reset() { *m = SecurityGroup{} } +func (m *SecurityGroup) String() string { return proto.CompactTextString(m) } +func (*SecurityGroup) ProtoMessage() {} +func (*SecurityGroup) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{2} } + +func (m *SecurityGroup) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *SecurityGroup) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *SecurityGroup) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *SecurityGroup) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *SecurityGroup) GetRules() []*SecurityGroupRule { + if m != nil { + return m.Rules + } + return nil +} + +func (m *SecurityGroup) GetProperties() map[string]string { + if m != nil { + return m.Properties + } + return nil +} + +type SecurityGroupList struct { + SecurityGroups []*SecurityGroup `protobuf:"bytes,1,rep,name=security_groups,json=securityGroups" json:"security_groups,omitempty"` +} + +func (m *SecurityGroupList) Reset() { *m = SecurityGroupList{} } +func (m *SecurityGroupList) String() string { return proto.CompactTextString(m) } +func (*SecurityGroupList) ProtoMessage() {} +func (*SecurityGroupList) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{3} } + +func (m *SecurityGroupList) GetSecurityGroups() []*SecurityGroup { + if m != nil { + return m.SecurityGroups + } + return nil +} + +func init() { + proto.RegisterType((*SecurityGroupRule)(nil), "oaktreemodel.SecurityGroupRule") + proto.RegisterType((*SecurityGroupRuleList)(nil), "oaktreemodel.SecurityGroupRuleList") + proto.RegisterType((*SecurityGroup)(nil), "oaktreemodel.SecurityGroup") + proto.RegisterType((*SecurityGroupList)(nil), "oaktreemodel.SecurityGroupList") + proto.RegisterEnum("oaktreemodel.SecurityGroupRule_Direction", SecurityGroupRule_Direction_name, SecurityGroupRule_Direction_value) +} + +func init() { proto.RegisterFile("oaktreemodel/security_group.proto", fileDescriptor5) } + +var fileDescriptor5 = []byte{ + // 513 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0x5f, 0x8b, 0xd3, 0x4e, + 0x14, 0xfd, 0xa5, 0xff, 0xb6, 0xb9, 0xdd, 0xfe, 0xd9, 0xe1, 0xa7, 0xc4, 0x2a, 0x18, 0xcb, 0x22, + 0x51, 0x21, 0x85, 0xca, 0xa2, 0x28, 0xbe,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xa0, 0x5f, 0x6b, 0xfe, 0x95, 0x45, 0x25, 0xd0, 0xca, 0xc2, 0x14, + 0xcd, 0x8e, 0xda, 0xd4, 0x9c, 0x89, 0x0b, 0xbd, 0x18, 0x55, 0x24, 0x99, 0x30, 0xd2, 0xc5, 0xd6, + 0x55, 0xa1, 0x9d, 0x85, 0xf6, 0x9f, 0x58, 0x20, 0x6f, 0x7f, 0x13, 0xe4, 0x93, 0x6b, 0x66, 0xff, + 0x65, 0x88, 0x9f, 0xf6, 0x9e, 0xbe, 0x89, 0xe6, 0x14, 0x86, 0xf5, 0xed, 0xdd, 0x86, 0x74, 0xf7, + 0x3a, 0x87, 0x83, 0xda, 0x62, 0xab, 0xd7, 0xcf, 0x3e, 0x9f, 0xcc, 0x99, 0xf6, 0xb9, 0xc0, 0x4c, + 0xe9, 0x30, 0x5a, 0xf8, 0x5c, 0xce, 0xa7, 0x65, 0x35, 0xad, 0x2a, 0xbd, 0xac, 0x16, 0x5f, 0x3a, + 0xe6, 0xc1, 0x3d, 0xfd, 0x15, 0x00, 0x00, 0xff, 0xff, 0x03, 0xbf, 0x23, 0x4b, 0xe4, 0x04, 0x00, + 0x00, +} diff --git a/setup.cfg b/setup.cfg index 94ee4d5..d545b5a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,3 +21,9 @@ classifier = [wheel] universal = 1 + +[build_sphinx] +source-dir = doc/source +build-dir = doc/build +all_files = 1 +warning-is-error = 1 diff --git a/test-requirements.txt b/test-requirements.txt index 55f27c9..0a4033b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,13 +5,3 @@ hacking<0.11,>=0.10.0 grpcio-tools - -coverage>=3.6 -discover -python-subunit>=0.0.18 -sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 -oslosphinx>=2.5.0 # Apache-2.0 -oslotest>=1.10.0 # Apache-2.0 -testrepository>=0.0.18 -testscenarios>=0.4 -testtools>=1.4.0 diff --git a/install_proto3.sh b/tools/install-proto3.sh similarity index 67% rename from install_proto3.sh rename to tools/install-proto3.sh index 3b1fd33..e87b553 100755 --- a/install_proto3.sh +++ b/tools/install-proto3.sh @@ -14,29 +14,27 @@ # See the License for the specific language governing permissions and # limitations under the License. -if [ -z $GOPATH ]; then - echo "oaktreemodel requires a golang environment." - echo "Please set GOPATH and make sure GOPATH/bin is in your PATH." - exit 1 -fi +export GOPATH=${GOPATH:-$HOME} +[[ ":$PATH:" != *":$GOPATH/bin:"* ]] && export PATH=$GOPATH/bin:$PATH + GRPCDIR=$GOPATH/src/github.com/grpc/grpc GRPCVER=$(curl -L http://grpc.io/release) -mkdir -p $(dirname $GRPCDIR) -git clone -b $GRPCVER https://github.com/grpc/grpc $GRPCDIR -pushd $GRPCDIR -git submodule update --init +mkdir -p $(dirname $GRPCDIR) +# TODO(mordred) Can we get this added to zuul required-projects? +git clone --recursive -b $GRPCVER https://github.com/grpc/grpc $GRPCDIR +pushd $GRPCDIR make + if [ $(id -u) = '0' ] ; then SUDO= else SUDO=sudo fi -$SUDO make install -cd third_party/protobuf -$SUDO make install -popd +$SUDO make install $PREFIX_ARG +pushd third_party/protobuf +$SUDO make install +popd # third_party/protobuf -go get google.golang.org/grpc -go get -u github.com/golang/protobuf/{proto,protoc-gen-go} +popd # $GRPCDIR diff --git a/tools/test-setup.sh b/tools/test-setup.sh new file mode 100755 index 0000000..b409ac4 --- /dev/null +++ b/tools/test-setup.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# Copyright (c) 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +BASEDIR=$(dirname $0) +export GOPATH=${GOPATH:-$HOME} +mkdir -p $GOPATH/bin +[[ ":$PATH:" != *":$GOPATH/bin:"* ]] && export PATH=$GOPATH/bin:$PATH + +if ! type glide ; then + curl https://glide.sh/get | sh +fi + +if ! protoc --version | grep -q 3\. ; then + echo "Protobuf v3 required - installing" + $BASEDIR/install-proto3.sh +fi + +if [ -z $VIRTUAL_ENV ]; then + python3 -m pip install --user pbr +else + python3 -m pip install pbr +fi + +glide install diff --git a/tox_install_python.sh b/tools/tox-install-python.sh similarity index 100% rename from tox_install_python.sh rename to tools/tox-install-python.sh diff --git a/tox.ini b/tox.ini index 0179283..887667d 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,12 @@ [tox] minversion = 1.6 -envlist = py34,py27,pypy,pep8 +envlist = py35,pypy,pep8 skipsdist = True [testenv] +basepython = python3 usedevelop = True -install_command = {toxinidir}/tox_install_python.sh {opts} {packages} +install_command = {toxinidir}/tools/tox-install-python.sh {opts} {packages} setenv = VIRTUAL_ENV={envdir} deps = -r{toxinidir}/test-requirements.txt @@ -15,13 +16,19 @@ commands = python setup.py test --slowest --testr-args='{posargs}' commands = flake8 [testenv:venv] +deps = + -r{toxinidir}/test-requirements.txt + -r{toxinidir}/doc/requirements.txt commands = {posargs} [testenv:cover] commands = python setup.py test --coverage --testr-args='{posargs}' [testenv:docs] -commands = python setup.py build_sphinx +deps = + -r{toxinidir}/test-requirements.txt + -r{toxinidir}/doc/requirements.txt +commands = sphinx-build -b html {toxinidir}/doc/source {toxinidir}/doc/build/html [testenv:debug] commands = oslo_debug_helper {posargs}