From 09796298eac2e31b9b2648243f62f218887804f6 Mon Sep 17 00:00:00 2001 From: Adam Reese <adam@reese.io> Date: Mon, 29 Feb 2016 10:01:55 -0800 Subject: [PATCH] ref(expansion): move python code out of cmd --- cmd/expandybird/expander/expander_test.go | 2 +- cmd/expandybird/main.go | 2 +- cmd/expandybird/service/service_test.go | 4 ++-- {cmd/expandybird/expansion => expansion}/expansion.py | 0 {cmd/expandybird/expansion => expansion}/expansion_test.py | 0 {cmd/expandybird/expansion => expansion}/file_expander.py | 0 {cmd/expandybird/expansion => expansion}/sandbox_loader.py | 0 {cmd/expandybird/expansion => expansion}/schema_validation.py | 0 .../expansion => expansion}/schema_validation_test.py | 0 .../expansion => expansion}/schema_validation_utils.py | 0 10 files changed, 4 insertions(+), 4 deletions(-) rename {cmd/expandybird/expansion => expansion}/expansion.py (100%) rename {cmd/expandybird/expansion => expansion}/expansion_test.py (100%) rename {cmd/expandybird/expansion => expansion}/file_expander.py (100%) rename {cmd/expandybird/expansion => expansion}/sandbox_loader.py (100%) rename {cmd/expandybird/expansion => expansion}/schema_validation.py (100%) rename {cmd/expandybird/expansion => expansion}/schema_validation_test.py (100%) rename {cmd/expandybird/expansion => expansion}/schema_validation_utils.py (100%) diff --git a/cmd/expandybird/expander/expander_test.go b/cmd/expandybird/expander/expander_test.go index dcd27f557..efde69559 100644 --- a/cmd/expandybird/expander/expander_test.go +++ b/cmd/expandybird/expander/expander_test.go @@ -37,7 +37,7 @@ var importFileNames = []string{ var validFileName = "../test/ValidContent.yaml" var outputFileName = "../test/ExpectedOutput.yaml" var archiveFileName = "../test/TestArchive.tar" -var expanderName = "../expansion/expansion.py" +var expanderName = "../../../expansion/expansion.py" type ExpanderTestCase struct { Description string diff --git a/cmd/expandybird/main.go b/cmd/expandybird/main.go index ecbdaf0c7..d067bbe5b 100644 --- a/cmd/expandybird/main.go +++ b/cmd/expandybird/main.go @@ -33,7 +33,7 @@ import ( var port = flag.Int("port", 8080, "Port to listen on") // path to expansion binary -var expansionBinary = flag.String("expansion_binary", "../expansion/expansion.py", +var expansionBinary = flag.String("expansion_binary", "../../../expansion/expansion.py", "The path to the expansion binary that will be used to expand the template.") func main() { diff --git a/cmd/expandybird/service/service_test.go b/cmd/expandybird/service/service_test.go index 9acdf1d74..1af7a4d35 100644 --- a/cmd/expandybird/service/service_test.go +++ b/cmd/expandybird/service/service_test.go @@ -26,8 +26,8 @@ import ( "reflect" "testing" - "github.com/kubernetes/deployment-manager/pkg/common" "github.com/kubernetes/deployment-manager/cmd/expandybird/expander" + "github.com/kubernetes/deployment-manager/pkg/common" "github.com/kubernetes/deployment-manager/pkg/util" restful "github.com/emicklei/go-restful" @@ -112,7 +112,7 @@ var ServiceWrapperTestCases = []ServiceWrapperTestCase{ } func TestServiceWrapper(t *testing.T) { - backend := expander.NewExpander("../expansion/expansion.py") + backend := expander.NewExpander("../../../expansion/expansion.py") wrapper := NewService(NewExpansionHandler(backend)) container := restful.NewContainer() container.ServeMux = http.NewServeMux() diff --git a/cmd/expandybird/expansion/expansion.py b/expansion/expansion.py similarity index 100% rename from cmd/expandybird/expansion/expansion.py rename to expansion/expansion.py diff --git a/cmd/expandybird/expansion/expansion_test.py b/expansion/expansion_test.py similarity index 100% rename from cmd/expandybird/expansion/expansion_test.py rename to expansion/expansion_test.py diff --git a/cmd/expandybird/expansion/file_expander.py b/expansion/file_expander.py similarity index 100% rename from cmd/expandybird/expansion/file_expander.py rename to expansion/file_expander.py diff --git a/cmd/expandybird/expansion/sandbox_loader.py b/expansion/sandbox_loader.py similarity index 100% rename from cmd/expandybird/expansion/sandbox_loader.py rename to expansion/sandbox_loader.py diff --git a/cmd/expandybird/expansion/schema_validation.py b/expansion/schema_validation.py similarity index 100% rename from cmd/expandybird/expansion/schema_validation.py rename to expansion/schema_validation.py diff --git a/cmd/expandybird/expansion/schema_validation_test.py b/expansion/schema_validation_test.py similarity index 100% rename from cmd/expandybird/expansion/schema_validation_test.py rename to expansion/schema_validation_test.py diff --git a/cmd/expandybird/expansion/schema_validation_utils.py b/expansion/schema_validation_utils.py similarity index 100% rename from cmd/expandybird/expansion/schema_validation_utils.py rename to expansion/schema_validation_utils.py -- GitLab