Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Begin implementing run request handler...
Implementing background job class. Also implemented process to fix up warden protocol buffer classes.
- Loading branch information
1 parent
abf3fbe
commit 9f8960b
Showing
47 changed files
with
554 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "src/IronFoundry.Warden.Protocol/warden"] | ||
path = src/IronFoundry.Warden.Protocol/warden | ||
url = https://github.com/cloudfoundry/warden.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
Set-StrictMode -Version Latest | ||
|
||
$warden_proto_dir = '.\warden\warden-protocol\lib\warden\protocol\pb' | ||
$target_proto_dir = '.\pb' | ||
|
||
if (!(Test-Path $warden_proto_dir)) | ||
{ | ||
Write-Error "Directory '$warden_proto_dir' containing *.proto files does not exist, exiting." | ||
exit 1 | ||
} | ||
|
||
mkdir -ErrorAction SilentlyContinue $target_proto_dir | ||
|
||
$std_replace_text = "package IronFoundry.Warden.Protocol;`r`nimport `"info.proto`";`r`n" | ||
|
||
$warden_proto_files = Get-ChildItem $warden_proto_dir -File -Filter '*.proto' | ||
foreach ($proto_file in $warden_proto_files) | ||
{ | ||
$repl_text = $std_replace_text | ||
if ($proto_file.Name -eq 'info.proto') | ||
{ | ||
$repl_text = 'package IronFoundry.Warden.Protocol;' | ||
} | ||
elseif (($proto_file.Name -eq 'run.proto') -or ($proto_file.Name -eq 'spawn.proto')) | ||
{ | ||
$repl_text = "package IronFoundry.Warden.Protocol;`r`nimport `"info.proto`";`r`nimport `"resource_limits.proto`";`r`n" | ||
} | ||
(Get-Content -Path $proto_file.FullName) | ForEach-Object { | ||
$_ -replace 'package warden;', $repl_text | ||
} | Set-Content (Join-Path $target_proto_dir $proto_file.Name) | ||
} | ||
|
||
# Per-file tweaks | ||
# info.proto | ||
(Get-Content -Path .\pb\info.proto) | ForEach-Object { | ||
$_ -replace 'memory_stat', 'memory_stat_info' ` | ||
-replace 'cpu_stat', 'cpu_stat_info' ` | ||
-replace 'disk_stat', 'disk_stat_info' ` | ||
-replace 'bandwidth_stat', 'bandwidth_stat_info' | ||
} | Set-Content .\pb\info.proto | ||
|
||
# create.proto | ||
(Get-Content -Path .\pb\create.proto) | ForEach-Object { $_ -replace 'Mode mode', 'Mode bind_mount_mode' } | Set-Content .\pb\create.proto | ||
|
||
# message.proto | ||
(Get-Content -Path .\pb\message.proto) | ForEach-Object { $_ -replace 'Type type', 'Type message_type' } | Set-Content .\pb\message.proto | ||
|
||
# run.proto | ||
(Get-Content -Path .\pb\run.proto) | ForEach-Object { $_ -replace 'optional uint32 exit_status', 'required uint32 exit_status' } | Set-Content .\pb\run.proto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,8 @@ | |
// | ||
|
||
package IronFoundry.Warden.Protocol; | ||
import "info.proto"; | ||
|
||
|
||
message ListRequest { | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
// nodoc | ||
|
||
package IronFoundry.Warden.Protocol; | ||
import "info.proto"; | ||
|
||
|
||
message Message { | ||
enum Type { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,8 @@ | |
// | ||
|
||
package IronFoundry.Warden.Protocol; | ||
import "info.proto"; | ||
|
||
|
||
message PingRequest { | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.