-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge branch 'feature/vic-machine-service' [full ci] #6665
Commits on Nov 20, 2017
-
Define an OpenAPI document for vic-machine
Use an OpenAPI (Swagger) document to define a preliminary API for vic-machine based on the vic-machine API design document (#6116). This document is expected to evolve as implementation proceeds.
Configuration menu - View commit details
-
Copy full SHA for c24e8bc - Browse repository at this point
Copy the full SHA c24e8bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for ddbcdbb - Browse repository at this point
Copy the full SHA ddbcdbbView commit details -
Define REST API handlers for listing VCHs
Introduce a pair of handlers for listing information about VCHs, optionally scoped to a compute resource or datacenter. Include basic authentication and error handling, which should be improved on as development continues.
Configuration menu - View commit details
-
Copy full SHA for b1b9dc1 - Browse repository at this point
Copy the full SHA b1b9dc1View commit details -
Define REST API handlers for inspecting VCHs
Introduce a pair of handlers for accessing information about the VCH with a given identifier within a vSphere target or named datacenter. There are ways in which this work is incomplete, marked by TODO: - Malformed managed object references are ignored - Malformed or unexpected PKI material is ignored
Configuration menu - View commit details
-
Copy full SHA for 859f94f - Browse repository at this point
Copy the full SHA 859f94fView commit details -
Define REST API handlers for creating VCHs
Introduce a pair of handlers for deploying new VCHs, as described by a JSON object, within a vSphere target or datacenter.
Configuration menu - View commit details
-
Copy full SHA for c7c130a - Browse repository at this point
Copy the full SHA c7c130aView commit details -
Update the vendored version of tylerb/graceful
This was a mechanical change using the following commands: gvt delete github.com/tylerb/graceful gvt fetch -revision 4654dfbb6ad53cb5e27f37d99b02e16c1872fbbb \ https://github.com/tylerb/graceful This is needed to pick up the fix for tylerstillwater/graceful#85
Configuration menu - View commit details
-
Copy full SHA for d7d9e24 - Browse repository at this point
Copy the full SHA d7d9e24View commit details -
Expose the vic-machine API via HTTPS
Notes: * To disable HTTPS for testing, invoke the server with --scheme http * To configure https, use --tls-port, --tls-certificate, and --tls-key
Configuration menu - View commit details
-
Copy full SHA for 62ba099 - Browse repository at this point
Copy the full SHA 62ba099View commit details -
Implement VCH certificate endpoint (#6406)
Implement VCH certificate endpoint
Configuration menu - View commit details
-
Copy full SHA for 0050cf3 - Browse repository at this point
Copy the full SHA 0050cf3View commit details -
live streaming VCH creation log to VCH datastore folder (#6403)
* clean up after rebase * integration test added to 6-04 * integration test md file modified * integration test md file change
Configuration menu - View commit details
-
Copy full SHA for bdecd92 - Browse repository at this point
Copy the full SHA bdecd92View commit details -
Clean up service dependencies and gitignore
This could be squashed into "Define an OpenAPI document for vic-machine" before merging to master.
Configuration menu - View commit details
-
Copy full SHA for 6793f7e - Browse repository at this point
Copy the full SHA 6793f7eView commit details -
Alphabetize imports in bufferedPipe.go
Organize the the imports in bufferedPipe.go in alphabetical order. Without this change, `make goimports` (run as a part of CI) fails.
Configuration menu - View commit details
-
Copy full SHA for 66d4ac8 - Browse repository at this point
Copy the full SHA 66d4ac8View commit details -
Rename bufferedPipe.go to buffered_pipe.go
Rename bufferedPipe.go and bufferedPipe_test.go (camel case) to buffered_pipe.go and buffered_pipe_test.go (snake case), which better follow the naming conventions of the repository.
Configuration menu - View commit details
-
Copy full SHA for 516a961 - Browse repository at this point
Copy the full SHA 516a961View commit details -
Fix minor issues in error handler util
Switch from pointer receiver to value receiver and add missing methods for wrappedError to ensure error handling code works as designed. Introduce unit tests to verify behavior.
Configuration menu - View commit details
-
Copy full SHA for d9c60aa - Browse repository at this point
Copy the full SHA d9c60aaView commit details -
Vendor github.com/rs/cors v1.1
To include the correct set of CORS headers on each response, we need to add an appropriate middleware. This change vendors the middleware recommended by go-swagger and its transitive dependencies. This was a mechanical change using the following command: gvt fetch -tag v1.1 github.com/rs/cors See also: go-swagger/go-swagger#481
Configuration menu - View commit details
-
Copy full SHA for 0121c62 - Browse repository at this point
Copy the full SHA 0121c62View commit details -
Include appropriate CORS headers
Because the vSphere H5 client plugin and the vic-machine-server will be served from different hosts, the H5 client plugin will be making cross- origin requests. As these would normally be prevented by the browser's same-origin policy, the service must support responding to all requests (including preflight requests) with the appropriate CORS headers.
Configuration menu - View commit details
-
Copy full SHA for ded1e3f - Browse repository at this point
Copy the full SHA ded1e3fView commit details -
Define end-to-end test for version endpoint
Introduce a single-test robot suite for the version endpoint as well as a utility resource for use by this suite and others within the group.
Configuration menu - View commit details
-
Copy full SHA for edf7a0a - Browse repository at this point
Copy the full SHA edf7a0aView commit details -
Define end-to-end tests for VCH listing endpoint
Introduce a robot suite for the VCH listing endpoints leveraging the group-scoped keywords introduced for other API tests. Test the successful operation of the endpoints as well as common error cases.
Configuration menu - View commit details
-
Copy full SHA for ecd4a8f - Browse repository at this point
Copy the full SHA ecd4a8fView commit details -
Implement REST API handler for getting VCH creation logs (#6524)
* vch log API handler stub added * vch log handler stub added * VCH log handler implemented * whitespaces * whitespace * whitespace * cleaned up integration test temp files * log API handler implemented, integration test added * remove log file download function from logger * whitespace * make the log files automatically sort by timestamp * .log filename suffix added to log files; sort files based on timestamp * sort log files based on timestamp * modified error message for finding VCH from ID * remove unused package declaration * fixed error code when provided VCH ID does not exist * VCH-log integration test md modified * 404 test for log API handler added after log file's removed * log handler integration test refactored * use status code constants from http package; minor code improvements in log API handler * minor bug fixes * const declaration * minor bug fix in common.go
Configuration menu - View commit details
-
Copy full SHA for a296fc2 - Browse repository at this point
Copy the full SHA a296fc2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 127de67 - Browse repository at this point
Copy the full SHA 127de67View commit details -
Update create API to stream a creation log to the VCH's datastore fol…
…der (#6545) * create API updated to include log streaming to datastore feature * comment added for const in create API handler * Const name change in create API handler
Configuration menu - View commit details
-
Copy full SHA for dab9b09 - Browse repository at this point
Copy the full SHA dab9b09View commit details -
--container-store option removed from vic-machine CLI (#6586)
* removed container store from cli and vch data * goimports
Configuration menu - View commit details
-
Copy full SHA for d30bb16 - Browse repository at this point
Copy the full SHA d30bb16View commit details -
Use trace.NewOperation pattern in vic-machine service API handlers (#…
…6563) * trace.NewOperation pattern used for vic-machine service API * whitespace * whitespace * clean up trace.op pattern in API handler functions * bug fix: validateTarget takes in context since used by buildData
Configuration menu - View commit details
-
Copy full SHA for b4bacb0 - Browse repository at this point
Copy the full SHA b4bacb0View commit details -
Correct comment in vic-machine-server Dockerfile
Fix a minor copy & paste error in the vic-machine-server Dockerfile.
Configuration menu - View commit details
-
Copy full SHA for 2e09165 - Browse repository at this point
Copy the full SHA 2e09165View commit details -
syslog support added to VCH create and inspect API (#6582)
* syslog support added to VCH create API * syslog addr added to inspect output * syslog_addr format changed in swagger * use status code in http package * empty syslog_addr string checking * swagger format changed for syslog_addr * roll back in swagger: only tcp and udp are accepted
Configuration menu - View commit details
-
Copy full SHA for 7c2d3b5 - Browse repository at this point
Copy the full SHA 7c2d3b5View commit details -
Properly extract CPU speed in VCH creation handler
Because JSON and Go have different models for inheritance, properly interpreting the structure of the API parameters can be confusing. In this case, we need to reference the nested units variable from the "subclass" instead of the units variable in the parent, which will always have its zero value (the empty string).
Configuration menu - View commit details
-
Copy full SHA for ccee5c4 - Browse repository at this point
Copy the full SHA ccee5c4View commit details -
Always process ops credentials in VCH creation API
This change moves the logic which processes operations credentials up a level so that they will always be processed, even if no endpoint settings are provided.
Configuration menu - View commit details
-
Copy full SHA for 9728cdd - Browse repository at this point
Copy the full SHA 9728cddView commit details -
Propagate validation in VCH creation API
As a part of handling a VCH creation API request, we pass the desired VCH configuration to the validator code. When the validator returns an error, we should report it to the user.
Configuration menu - View commit details
-
Copy full SHA for c79fea1 - Browse repository at this point
Copy the full SHA c79fea1View commit details -
Avoid a panic when a managed object is omitted
This change ensures that omitted (i.e., nil) managed objects are correctly handled in calls to the VCH creation API. This allows for a more minimal set of fields to be supplied.
Configuration menu - View commit details
-
Copy full SHA for 942bc67 - Browse repository at this point
Copy the full SHA 942bc67View commit details -
Run pprof as a part of VCH Management API
To allow for profiling and debugging of the VCH Management API, run pprof on localhost:6060 by default. Different settings may be passed via command-line arguments or environment variables.
Configuration menu - View commit details
-
Copy full SHA for e19fa6e - Browse repository at this point
Copy the full SHA e19fa6eView commit details -
Accept session clone ticket via request header (#6587)
This change allows the vic-machine-server to accept a vSphere session clone ticket in the X-VMWARE-TICKET header of incoming requests. This ticket is used by govmomi to clone the user's session to allow the vic-machine-server govmomi client to make vSphere requests on the user's behalf.
Configuration menu - View commit details
-
Copy full SHA for 7e65ed3 - Browse repository at this point
Copy the full SHA 7e65ed3View commit details -
VCH Creation API: Properly propogate proxy settings
Previously, the API handler for VCH creation was dropping the processed proxy settings. With this change, they are processed as they would be during CLI-based creation.
Configuration menu - View commit details
-
Copy full SHA for f0937ed - Browse repository at this point
Copy the full SHA f0937edView commit details -
VCH Creation API: Replace magic number with constant
A previous change replaced most http status codes with the appropriate constants. This replaces a lingering instance.
Configuration menu - View commit details
-
Copy full SHA for 4034617 - Browse repository at this point
Copy the full SHA 4034617View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2499ca0 - Browse repository at this point
Copy the full SHA 2499ca0View commit details -
VCH APIs: Represent disk sizes using base 10
For consistency with the rest of the product (and other products which deal with storage size), represent disk size using base 10 (KB, MB, GB, etc.) instead of base 2 (KiB, MiB, GiB, etc.).
Configuration menu - View commit details
-
Copy full SHA for a228ed9 - Browse repository at this point
Copy the full SHA a228ed9View commit details -
VCH Inspect API: Properly parse datastore paths
Volume store locations are returned as a URL with a scheme of "ds", a host as the name of the datastore, and a path as a vSphere datastore path (which is prefixed by the name of the datastore in brackets). To return a value in the format that the user expects (i.e., in the format that was provided), we extract the actual path portion from the vSphere path so that the datastore name is not repeated in both the host and the path.
Configuration menu - View commit details
-
Copy full SHA for b21a85f - Browse repository at this point
Copy the full SHA b21a85fView commit details -
Implement tests for the VCH Creation API
Implement a suite of positive and negative tests for API-based VCH creation. These tests are not intended to be exhaustive; we can use unit tests for that.
Configuration menu - View commit details
-
Copy full SHA for 87aa511 - Browse repository at this point
Copy the full SHA 87aa511View commit details -
Clean up VCH Management API robot tests
Refactor and clean up the robot test group for the VCH Management API.
Configuration menu - View commit details
-
Copy full SHA for 9258cd3 - Browse repository at this point
Copy the full SHA 9258cd3View commit details -
Revert change to PUBLIC_NETWORK variable
In "Implement tests for the VCH Creation API", a change was made to the way that the PUBLIC_NETWORK environment variable was quoted. This worked for robot test group 23, but broke several others. This commit reverts the global change and handles the quoting issue in a localized way.
Configuration menu - View commit details
-
Copy full SHA for 54582a9 - Browse repository at this point
Copy the full SHA 54582a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for c3db32a - Browse repository at this point
Copy the full SHA c3db32aView commit details -
creation log API output to text/plain (#6640)
error output is formatted to string as well.
Configuration menu - View commit details
-
Copy full SHA for 90dc241 - Browse repository at this point
Copy the full SHA 90dc241View commit details -
Minor adjustments to formatting
Make minor adjustments to formatting suggested during review of the merge commit for the VCH creation API feature branch.
Configuration menu - View commit details
-
Copy full SHA for da68a2c - Browse repository at this point
Copy the full SHA da68a2cView commit details -
Include issue numbers with TODOs
Include issue numbers with all TODOs added as a part of the initial VCH creation API project, as suggested during review of the merge commit for the VCH creation API feature branch.
Configuration menu - View commit details
-
Copy full SHA for 462eceb - Browse repository at this point
Copy the full SHA 462ecebView commit details -
Clarify comment in common code for API handlers
Clarify an unclear comment identified during review of the merge commit for the VCH creation API feature branch.
Configuration menu - View commit details
-
Copy full SHA for d03c730 - Browse repository at this point
Copy the full SHA d03c730View commit details -
Cleanup build process for vic-machine-server
Remove the serviceapi target as a dependency for the appliance.iso and ensure all generated code is cleaned up.
Configuration menu - View commit details
-
Copy full SHA for 861d880 - Browse repository at this point
Copy the full SHA 861d880View commit details -
Implement API handler for VCH deletion
Introduce a pair of handlers for deleting VCHs within a vSphere target or datacenter. By default, deletion includes the VCH and powered off containers. Deletion may optionally include powered on containers and/or volume stores as well. If any containers remain, the VCH is not deleted. If the VCH is not deleted, the response includes a non-2xx status code. Define a suite of end-to-end tests which verify the intended deletion behavior. End-to-end tests do not attempt to verify the behavior of concurrent operations.
Configuration menu - View commit details
-
Copy full SHA for fa7814d - Browse repository at this point
Copy the full SHA fa7814dView commit details -
VCH Management API: Remove registry blacklist
Registry blacklist functionality was designed, but has not been fully implemented in the engine. Remove references to it from the API.
Configuration menu - View commit details
-
Copy full SHA for 53d7623 - Browse repository at this point
Copy the full SHA 53d7623View commit details -
VCH Creation API: Stop writing key files to disk
When creating a VCH via the API, we should not write key/certificate files to the API server's disk. This change introduces the behavior as a flag so that it could be exposed as an option for the CLI at some point in the future, but does not expose it at this time.
Configuration menu - View commit details
-
Copy full SHA for d240ad2 - Browse repository at this point
Copy the full SHA d240ad2View commit details -
Handle routing destinations in API like CLI
The vic-machine CLI has differing requirements for gateway routing information, depending on the type of network. According to the CLI help: - a client gateway must specify one or more routing destinations - a public gateway must not specify any routing destinations - a management gateway must specify one or more routing destinations - a container gateway must specify exactly one routing destination This does not seem to be enforced in code, and may simply be more of a suggestion about how these gateways should be used than a requirement. Update the parsing for client, public, and management to support all zero or more routing destinations in all cases; defer to the existing ProcessNetwork code to ensure consistent validation behavior now and in the future. Additionally update the parsing for container to provide a clear error message if the expected routing destination is not supplied.
Configuration menu - View commit details
-
Copy full SHA for e18d292 - Browse repository at this point
Copy the full SHA e18d292View commit details -
Handle static addresses in the API like CLI
The vic-machine CLI requires that static addresses are specified as a CIDR, which allows the static address and subnet mask to be supplied in a compact way on the command line. This pattern does not allow for static addresses to be expressed in terms of a hostname. Update the API to match this convention. We may wish to allow for more flexibility in the API in the future, but there's value in at least starting with consistent behavior.
Configuration menu - View commit details
-
Copy full SHA for 76bbd59 - Browse repository at this point
Copy the full SHA 76bbd59View commit details -
Handle IP ranges in the API like in the CLI
The vic-machine CLI allows IP ranges to be expressed in CIDR notation or as simple ranges in some places, but requires that CIDR notation be used in others. Initially there was a hope of making the API behave more consistently, but that requires changes to underlying logic (some of which is not well covered by existing tests). For now, be consistent with the CLI.
Configuration menu - View commit details
-
Copy full SHA for 1e922a8 - Browse repository at this point
Copy the full SHA 1e922a8View commit details -
Support container network trust level in VCH API
The vic-machine CLI supports specifying a "trust level" for each container network using the --container-network-firewall option. Support the same functionality in the API. Additionally, fix a small bug with the way ip ranges are returned by the inspect API.
Configuration menu - View commit details
-
Copy full SHA for ee0b3a3 - Browse repository at this point
Copy the full SHA ee0b3a3View commit details -
List client address for accessing services in API
Use the client network address, not the public network address, when displaying the admin portal URI and the docker host information as a part of API responses. Additionally, eliminate code duplication.
Configuration menu - View commit details
-
Copy full SHA for 26fb427 - Browse repository at this point
Copy the full SHA 26fb427View commit details -
Include ISO files in server docker image
Additionally, move the binary to a subdirectory of opt to allow the ISO files to be packaged with it. See also: * http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/opt.html
Configuration menu - View commit details
-
Copy full SHA for 959bcd4 - Browse repository at this point
Copy the full SHA 959bcd4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d6656b - Browse repository at this point
Copy the full SHA 1d6656bView commit details -
Support request logging for VCH Management API
Log each request and response to a configurable destination. Use trace.Operation to associate the request and response information with the logs for the handler to allow for easy debugging, even when there are several requests being handled concurrently. Adjust logging in server's main.go to avoid printing to stdout. Relies on external configuration for log rotation.
Configuration menu - View commit details
-
Copy full SHA for d9e6b91 - Browse repository at this point
Copy the full SHA d9e6b91View commit details -
Update logging within packages used by vic-machine
For each conceptual vic-machine operation, create a trace.Operation with an operation-local logger. Emit log messages using the log methods on the operation instead of logrus global methods. This will write to the vic-machine.log using the global trace.Logger and to the user using the operation-local logger. This ensures that both the CLI and API can print log messages to both a local file and the user (via a TTY, if the CLI, and the datastore). * In the CLI, use the operation-local logger to print to the console (using the default Logrus TTY formatting) and write to both the datastore and vic-machine.log file with the global trace.Logger (using VIC's custom log formatter). * In the API, use the the operation-local logger to write to the datastore and write to the server's console with the global trace.Logger. In both cases, use VIC's custom log formatter. Update code in packages used by vic-machine to accept a context, coerce/convert it into a trace.Operation, and use its log methods. Improve readability of logs for concurrent operations by including a operation/context in trace.Begin calls when one is available. Retain configuration for the global logrus logger in vic-machine so that we "fail ugly" (i.e., have lines with mismatched log formats) on the CLI if something uses the old pattern, but don't lose information. Update tests which parse log messages to understand this new format instead of or, where necessary, in addition to old format(s).
Configuration menu - View commit details
-
Copy full SHA for dc30dd0 - Browse repository at this point
Copy the full SHA dc30dd0View commit details