)]}'
{"Makefile":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"50febe4a5033658e4c6a5c2e2242795a84f391c0","unresolved":false,"context_lines":[{"line_number":26,"context_line":"TEST_FLAGS          :\u003d"},{"line_number":27,"context_line":"COVER_FLAGS         :\u003d"},{"line_number":28,"context_line":"COVER_PROFILE       :\u003d cover.out"},{"line_number":29,"context_line":"COVER_PKG           :\u003d $(shell go list ./... | tail -n+2 | grep -v -E \"/testutil\" | paste -sd\",\" -)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":".PHONY: get-modules"},{"line_number":32,"context_line":"get-modules:"}],"source_content_type":"application/octet-stream","patch_set":26,"id":"3fa7e38b_a34d1f3c","line":29,"updated":"2019-10-28 17:50:18.000000000","message":"I don\u0027t think this is necessary for this change. This is being approached in a different fashion here: https://review.opendev.org/#/c/689051/2/tools/coverage_check\n\nRemoving this now will prevent merge conflicts in the future","commit_id":"0647ef8048b79c05363e8419df82132f85819fcc"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"b5efc10b22e7f7622988f0c17e58f4184a5960f5","unresolved":false,"context_lines":[{"line_number":26,"context_line":"TEST_FLAGS          :\u003d"},{"line_number":27,"context_line":"COVER_FLAGS         :\u003d"},{"line_number":28,"context_line":"COVER_PROFILE       :\u003d cover.out"},{"line_number":29,"context_line":"COVER_PKG           :\u003d $(shell go list ./... | tail -n+2 | grep -v -E \"/testutil\" | paste -sd\",\" -)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":".PHONY: get-modules"},{"line_number":32,"context_line":"get-modules:"}],"source_content_type":"application/octet-stream","patch_set":26,"id":"3fa7e38b_6d99496b","line":29,"in_reply_to":"3fa7e38b_a34d1f3c","updated":"2019-10-29 12:25:07.000000000","message":"Done","commit_id":"0647ef8048b79c05363e8419df82132f85819fcc"}],"cmd/bootstrap/bootstrap.go":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"05e73a52ccbe715fea72db418347bf0e7fc50244","unresolved":false,"context_lines":[{"line_number":13,"context_line":"\tbootstrapRootCmd :\u003d \u0026cobra.Command{"},{"line_number":14,"context_line":"\t\tUse:   \"bootstrap\","},{"line_number":15,"context_line":"\t\tShort: \"bootstraps airshipctl\","},{"line_number":16,"context_line":"\t\tRun: func(cmd *cobra.Command, args []string) {"},{"line_number":17,"context_line":"\t\t\tout :\u003d cmd.OutOrStdout()"},{"line_number":18,"context_line":"\t\t\tfmt.Fprintf(out, \"Under construction\\n\")"},{"line_number":19,"context_line":"\t\t},"},{"line_number":20,"context_line":"\t}"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"\tremoteDirectCmd :\u003d NewRemoteDirectCommand(bootstrapRootCmd, rootSettings)"}],"source_content_type":"text/x-go","patch_set":4,"id":"3fa7e38b_6d24e9af","line":19,"range":{"start_line":16,"start_character":0,"end_line":19,"end_character":4},"updated":"2019-09-25 13:55:54.000000000","message":"This function won\u0027t be needed once this change is merged, please delete it","commit_id":"f94f139b0d83c8e3c3edd74cadb6dea39c4aecad"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"6dd99c090f56c475bfcdfb9c2ff2a7877dc7c743","unresolved":false,"context_lines":[{"line_number":13,"context_line":"\tbootstrapRootCmd :\u003d \u0026cobra.Command{"},{"line_number":14,"context_line":"\t\tUse:   \"bootstrap\","},{"line_number":15,"context_line":"\t\tShort: \"bootstraps airshipctl\","},{"line_number":16,"context_line":"\t\tRun: func(cmd *cobra.Command, args []string) {"},{"line_number":17,"context_line":"\t\t\tout :\u003d cmd.OutOrStdout()"},{"line_number":18,"context_line":"\t\t\tfmt.Fprintf(out, \"Under construction\\n\")"},{"line_number":19,"context_line":"\t\t},"},{"line_number":20,"context_line":"\t}"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"\tremoteDirectCmd :\u003d NewRemoteDirectCommand(bootstrapRootCmd, rootSettings)"}],"source_content_type":"text/x-go","patch_set":4,"id":"3fa7e38b_42d3f7d5","line":19,"range":{"start_line":16,"start_character":0,"end_line":19,"end_character":4},"in_reply_to":"3fa7e38b_6d24e9af","updated":"2019-09-25 15:01:58.000000000","message":"Done","commit_id":"f94f139b0d83c8e3c3edd74cadb6dea39c4aecad"}],"cmd/bootstrap/bootstrap_remotedirect.go":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"f68736c069fd808a847a9cff3fb683dae34e36c8","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"\tredfish \"github.com/Nordix/go-redfish/client\""},{"line_number":10,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/environment\""},{"line_number":11,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/log\""},{"line_number":12,"context_line":"\talog \"opendev.org/airship/airshipctl/pkg/log\""},{"line_number":13,"context_line":"\tredfish_utils \"opendev.org/airship/airshipctl/pkg/remote/redfish\""},{"line_number":14,"context_line":")"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_b3b85fc8","line":12,"range":{"start_line":11,"start_character":0,"end_line":12,"end_character":46},"updated":"2019-09-19 18:52:58.000000000","message":"Why is this imported twice? Remove the second line","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"e199053258003aee911556f795a7da133b8ea024","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"\tredfish \"github.com/Nordix/go-redfish/client\""},{"line_number":10,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/environment\""},{"line_number":11,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/log\""},{"line_number":12,"context_line":"\talog \"opendev.org/airship/airshipctl/pkg/log\""},{"line_number":13,"context_line":"\tredfish_utils \"opendev.org/airship/airshipctl/pkg/remote/redfish\""},{"line_number":14,"context_line":")"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_724f3692","line":12,"range":{"start_line":11,"start_character":0,"end_line":12,"end_character":46},"in_reply_to":"3fa7e38b_b3b85fc8","updated":"2019-09-20 13:10:35.000000000","message":"Done","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"f68736c069fd808a847a9cff3fb683dae34e36c8","unresolved":false,"context_lines":[{"line_number":96,"context_line":"\t\treturn err"},{"line_number":97,"context_line":"\t}"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"\talog.Debug(\"Successfully loaded virtualmedia\\n\")"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"\t/* Set system\u0027s bootsource to selected media */"},{"line_number":102,"context_line":"\terr \u003d redfish_utils.SetSystemBootSourceForMediaType(ctx, api, systemId, vMediaType)"}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_33fa2f75","line":99,"range":{"start_line":99,"start_character":33,"end_line":99,"end_character":45},"updated":"2019-09-19 18:52:58.000000000","message":"virtual media","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"e199053258003aee911556f795a7da133b8ea024","unresolved":false,"context_lines":[{"line_number":96,"context_line":"\t\treturn err"},{"line_number":97,"context_line":"\t}"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"\talog.Debug(\"Successfully loaded virtualmedia\\n\")"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"\t/* Set system\u0027s bootsource to selected media */"},{"line_number":102,"context_line":"\terr \u003d redfish_utils.SetSystemBootSourceForMediaType(ctx, api, systemId, vMediaType)"}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_d25f0a3f","line":99,"range":{"start_line":99,"start_character":33,"end_line":99,"end_character":45},"in_reply_to":"3fa7e38b_33fa2f75","updated":"2019-09-20 13:10:35.000000000","message":"Done","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":27046,"name":"Rodolfo Pacheco","email":"jezogwza@gmail.com","username":"jezogwza2723"},"change_message_id":"8a673edb85579c55dbb730e9a2abb9aa78bd6779","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"\t/* TODO: Wait for ephemeral node to boot */"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"\t// ?? where to get IP address ??"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"\treturn nil"},{"line_number":119,"context_line":"}"}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_3568da1f","line":116,"range":{"start_line":116,"start_character":1,"end_line":116,"end_character":33},"updated":"2019-09-19 15:02:40.000000000","message":"You should have that from the Document of the Ephemeral Host , given the Cluster . Povide the context is for an Ephemeral Host.. We can discuss this in the design call\n\nFeels that there should be a validation aspect of this that is common for Smash and/or Redfish rght. Basically would mean after the Host has rebooted lets go check this is ready for us. Can I reach k8s on the host with the information I have. The information that was encapsulated int the iso cloud confg.","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"e199053258003aee911556f795a7da133b8ea024","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"\t/* TODO: Wait for ephemeral node to boot */"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"\t// ?? where to get IP address ??"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"\treturn nil"},{"line_number":119,"context_line":"}"}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_9259925b","line":116,"range":{"start_line":116,"start_character":1,"end_line":116,"end_character":33},"in_reply_to":"3fa7e38b_3568da1f","updated":"2019-09-20 13:10:35.000000000","message":"Done","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"f68736c069fd808a847a9cff3fb683dae34e36c8","unresolved":false,"context_lines":[{"line_number":128,"context_line":"func NewRemoteDirectCommand(parent *cobra.Command, rootSettings *environment.AirshipCTLSettings) *cobra.Command {"},{"line_number":129,"context_line":"\tsettings :\u003d \u0026RemoteDirectSettings{AirshipCTLSettings: rootSettings}"},{"line_number":130,"context_line":"\tremoteDirect :\u003d \u0026cobra.Command{"},{"line_number":131,"context_line":"\t\tUse:   \"remotedirect [-]\","},{"line_number":132,"context_line":"\t\tShort: \"Bootstrap ephemeral node\","},{"line_number":133,"context_line":"\t\tRunE: func(cmd *cobra.Command, args []string) error {"},{"line_number":134,"context_line":""}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_13c1332f","line":131,"range":{"start_line":131,"start_character":22,"end_line":131,"end_character":26},"updated":"2019-09-19 18:52:58.000000000","message":"What does this mean?","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"e199053258003aee911556f795a7da133b8ea024","unresolved":false,"context_lines":[{"line_number":128,"context_line":"func NewRemoteDirectCommand(parent *cobra.Command, rootSettings *environment.AirshipCTLSettings) *cobra.Command {"},{"line_number":129,"context_line":"\tsettings :\u003d \u0026RemoteDirectSettings{AirshipCTLSettings: rootSettings}"},{"line_number":130,"context_line":"\tremoteDirect :\u003d \u0026cobra.Command{"},{"line_number":131,"context_line":"\t\tUse:   \"remotedirect [-]\","},{"line_number":132,"context_line":"\t\tShort: \"Bootstrap ephemeral node\","},{"line_number":133,"context_line":"\t\tRunE: func(cmd *cobra.Command, args []string) error {"},{"line_number":134,"context_line":""}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_723416fc","line":131,"range":{"start_line":131,"start_character":22,"end_line":131,"end_character":26},"in_reply_to":"3fa7e38b_13c1332f","updated":"2019-09-20 13:10:35.000000000","message":"Done","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"f68736c069fd808a847a9cff3fb683dae34e36c8","unresolved":false,"context_lines":[{"line_number":132,"context_line":"\t\tShort: \"Bootstrap ephemeral node\","},{"line_number":133,"context_line":"\t\tRunE: func(cmd *cobra.Command, args []string) error {"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"\t\t\tlog.Init(settings.Debug, cmd.OutOrStderr())"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"\t\t\t// TODO: Get config from yaml configurations and remove from CLI"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_d3e07bcf","line":135,"updated":"2019-09-19 18:52:58.000000000","message":"This line isn\u0027t needed - the logger is already initialized from root","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"e199053258003aee911556f795a7da133b8ea024","unresolved":false,"context_lines":[{"line_number":132,"context_line":"\t\tShort: \"Bootstrap ephemeral node\","},{"line_number":133,"context_line":"\t\tRunE: func(cmd *cobra.Command, args []string) error {"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"\t\t\tlog.Init(settings.Debug, cmd.OutOrStderr())"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"\t\t\t// TODO: Get config from yaml configurations and remove from CLI"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_d224eac8","line":135,"in_reply_to":"3fa7e38b_d3e07bcf","updated":"2019-09-20 13:10:35.000000000","message":"Done","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":27046,"name":"Rodolfo Pacheco","email":"jezogwza@gmail.com","username":"jezogwza2723"},"change_message_id":"8a673edb85579c55dbb730e9a2abb9aa78bd6779","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"\t\t\tlog.Init(settings.Debug, cmd.OutOrStderr())"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"\t\t\t// TODO: Get config from yaml configurations and remove from CLI"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"\t\t\t// Trigger remotedirect based on remote type"},{"line_number":140,"context_line":"\t\t\tswitch settings.RemoteConfig.RemoteType {"}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_b5f36a73","line":137,"updated":"2019-09-19 15:02:40.000000000","message":"Will have this as at least a method  settings.GetCurrentContext() (Cluster, Context, etc..)\nCould also reach it by using settngs.Config...","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"e199053258003aee911556f795a7da133b8ea024","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"\t\t\tlog.Init(settings.Debug, cmd.OutOrStderr())"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"\t\t\t// TODO: Get config from yaml configurations and remove from CLI"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"\t\t\t// Trigger remotedirect based on remote type"},{"line_number":140,"context_line":"\t\t\tswitch settings.RemoteConfig.RemoteType {"}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_78d5d742","line":137,"in_reply_to":"3fa7e38b_b5f36a73","updated":"2019-09-20 13:10:35.000000000","message":"Sure. updated TODO comment for later ref.","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":27046,"name":"Rodolfo Pacheco","email":"jezogwza@gmail.com","username":"jezogwza2723"},"change_message_id":"8a673edb85579c55dbb730e9a2abb9aa78bd6779","unresolved":false,"context_lines":[{"line_number":137,"context_line":"\t\t\t// TODO: Get config from yaml configurations and remove from CLI"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"\t\t\t// Trigger remotedirect based on remote type"},{"line_number":140,"context_line":"\t\t\tswitch settings.RemoteConfig.RemoteType {"},{"line_number":141,"context_line":"\t\t\tcase AIRSHIP_REMOTE_TYPE_REDFISH:"},{"line_number":142,"context_line":"\t\t\t\talog.Debug(\"Remote type redfish\")"},{"line_number":143,"context_line":"\t\t\t\terr :\u003d RedfishRemoteDirect(settings.RemoteConfig)"},{"line_number":144,"context_line":"\t\t\t\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_15891ec9","line":141,"range":{"start_line":140,"start_character":3,"end_line":141,"end_character":36},"updated":"2019-09-19 15:02:40.000000000","message":"What if this case is inside a wrapper func. Mainly because of the comment for teh validation. \ni.e. func exec (...)\n  switch ...\n       redfish or smash \n  After ..\n  Validate ...","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"e199053258003aee911556f795a7da133b8ea024","unresolved":false,"context_lines":[{"line_number":137,"context_line":"\t\t\t// TODO: Get config from yaml configurations and remove from CLI"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"\t\t\t// Trigger remotedirect based on remote type"},{"line_number":140,"context_line":"\t\t\tswitch settings.RemoteConfig.RemoteType {"},{"line_number":141,"context_line":"\t\t\tcase AIRSHIP_REMOTE_TYPE_REDFISH:"},{"line_number":142,"context_line":"\t\t\t\talog.Debug(\"Remote type redfish\")"},{"line_number":143,"context_line":"\t\t\t\terr :\u003d RedfishRemoteDirect(settings.RemoteConfig)"},{"line_number":144,"context_line":"\t\t\t\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_38cf5fb1","line":141,"range":{"start_line":140,"start_character":3,"end_line":141,"end_character":36},"in_reply_to":"3fa7e38b_15891ec9","updated":"2019-09-20 13:10:35.000000000","message":"Done","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"f68736c069fd808a847a9cff3fb683dae34e36c8","unresolved":false,"context_lines":[{"line_number":142,"context_line":"\t\t\t\talog.Debug(\"Remote type redfish\")"},{"line_number":143,"context_line":"\t\t\t\terr :\u003d RedfishRemoteDirect(settings.RemoteConfig)"},{"line_number":144,"context_line":"\t\t\t\tif err !\u003d nil {"},{"line_number":145,"context_line":"\t\t\t\t\talog.Print(err)"},{"line_number":146,"context_line":"\t\t\t\t\talog.Fatal(\"Redfish remote direct failed\")"},{"line_number":147,"context_line":"\t\t\t\t\treturn err"},{"line_number":148,"context_line":"\t\t\t\t}"},{"line_number":149,"context_line":"\t\t\tcase AIRSHIP_REMOTE_TYPE_SMASH:"},{"line_number":150,"context_line":"\t\t\t\talog.Debug(\"Remote type smash\")"}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_13d613f3","line":147,"range":{"start_line":145,"start_character":0,"end_line":147,"end_character":15},"updated":"2019-09-19 18:52:58.000000000","message":"This should probably be something along the lines of\n\nlog.Fatalf(\"Redfish remote direct failed: %s\", err.Error())\n\nThe call to log.Fatalf will end the program, so the return statement is unnecessary.","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"e199053258003aee911556f795a7da133b8ea024","unresolved":false,"context_lines":[{"line_number":142,"context_line":"\t\t\t\talog.Debug(\"Remote type redfish\")"},{"line_number":143,"context_line":"\t\t\t\terr :\u003d RedfishRemoteDirect(settings.RemoteConfig)"},{"line_number":144,"context_line":"\t\t\t\tif err !\u003d nil {"},{"line_number":145,"context_line":"\t\t\t\t\talog.Print(err)"},{"line_number":146,"context_line":"\t\t\t\t\talog.Fatal(\"Redfish remote direct failed\")"},{"line_number":147,"context_line":"\t\t\t\t\treturn err"},{"line_number":148,"context_line":"\t\t\t\t}"},{"line_number":149,"context_line":"\t\t\tcase AIRSHIP_REMOTE_TYPE_SMASH:"},{"line_number":150,"context_line":"\t\t\t\talog.Debug(\"Remote type smash\")"}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_d8c5eb8f","line":147,"range":{"start_line":145,"start_character":0,"end_line":147,"end_character":15},"in_reply_to":"3fa7e38b_13d613f3","updated":"2019-09-20 13:10:35.000000000","message":"Done","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"f68736c069fd808a847a9cff3fb683dae34e36c8","unresolved":false,"context_lines":[{"line_number":150,"context_line":"\t\t\t\talog.Debug(\"Remote type smash\")"},{"line_number":151,"context_line":"\t\t\t\terr :\u003d SmashRemoteDirect(settings.RemoteConfig)"},{"line_number":152,"context_line":"\t\t\t\tif err !\u003d nil {"},{"line_number":153,"context_line":"\t\t\t\t\talog.Print(err)"},{"line_number":154,"context_line":"\t\t\t\t\talog.Fatal(\"Smash remote direct failed\")"},{"line_number":155,"context_line":"\t\t\t\t\treturn err"},{"line_number":156,"context_line":"\t\t\t\t}"},{"line_number":157,"context_line":"\t\t\tdefault:"},{"line_number":158,"context_line":"\t\t\t\talog.Print(\"Invalid Remote Type\")"}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_9303e373","line":155,"range":{"start_line":153,"start_character":0,"end_line":155,"end_character":15},"updated":"2019-09-19 18:52:58.000000000","message":"Same issue here - use log.Fatalf","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"e199053258003aee911556f795a7da133b8ea024","unresolved":false,"context_lines":[{"line_number":150,"context_line":"\t\t\t\talog.Debug(\"Remote type smash\")"},{"line_number":151,"context_line":"\t\t\t\terr :\u003d SmashRemoteDirect(settings.RemoteConfig)"},{"line_number":152,"context_line":"\t\t\t\tif err !\u003d nil {"},{"line_number":153,"context_line":"\t\t\t\t\talog.Print(err)"},{"line_number":154,"context_line":"\t\t\t\t\talog.Fatal(\"Smash remote direct failed\")"},{"line_number":155,"context_line":"\t\t\t\t\treturn err"},{"line_number":156,"context_line":"\t\t\t\t}"},{"line_number":157,"context_line":"\t\t\tdefault:"},{"line_number":158,"context_line":"\t\t\t\talog.Print(\"Invalid Remote Type\")"}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_98bf73fa","line":155,"range":{"start_line":153,"start_character":0,"end_line":155,"end_character":15},"in_reply_to":"3fa7e38b_9303e373","updated":"2019-09-20 13:10:35.000000000","message":"Done","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"05e73a52ccbe715fea72db418347bf0e7fc50244","unresolved":false,"context_lines":[{"line_number":21,"context_line":"}"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"const ("},{"line_number":24,"context_line":"\tAIRSHIP_REMOTE_TYPE_REDFISH string \u003d \"redfish\""},{"line_number":25,"context_line":"\tAIRSHIP_REMOTE_TYPE_SMASH   string \u003d \"smash\""},{"line_number":26,"context_line":")"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-go","patch_set":4,"id":"3fa7e38b_cd8e3d78","line":24,"range":{"start_line":24,"start_character":1,"end_line":24,"end_character":28},"updated":"2019-09-25 13:55:54.000000000","message":"Conventional Go code uses MixedCase for constants, could we switch to that?","commit_id":"f94f139b0d83c8e3c3edd74cadb6dea39c4aecad"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"6dd99c090f56c475bfcdfb9c2ff2a7877dc7c743","unresolved":false,"context_lines":[{"line_number":21,"context_line":"}"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"const ("},{"line_number":24,"context_line":"\tAIRSHIP_REMOTE_TYPE_REDFISH string \u003d \"redfish\""},{"line_number":25,"context_line":"\tAIRSHIP_REMOTE_TYPE_SMASH   string \u003d \"smash\""},{"line_number":26,"context_line":")"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-go","patch_set":4,"id":"3fa7e38b_e2db03ea","line":24,"range":{"start_line":24,"start_character":1,"end_line":24,"end_character":28},"in_reply_to":"3fa7e38b_cd8e3d78","updated":"2019-09-25 15:01:58.000000000","message":"Done","commit_id":"f94f139b0d83c8e3c3edd74cadb6dea39c4aecad"},{"author":{"_account_id":27046,"name":"Rodolfo Pacheco","email":"jezogwza@gmail.com","username":"jezogwza2723"},"change_message_id":"621308416b97fc72eaf41c920c611af6183aaa52","unresolved":false,"context_lines":[{"line_number":180,"context_line":"\t\t\t\talog.Fatal(err)"},{"line_number":181,"context_line":"\t\t\t}"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"\t\t\t/*"},{"line_number":184,"context_line":"\t\t\t *\tTODO: Validate Ephemeral Node is Reachable. Check for"},{"line_number":185,"context_line":"\t\t\t *\t\t\t -  hardware errors"},{"line_number":186,"context_line":"\t\t\t *\t\t\t -  Network validation"},{"line_number":187,"context_line":"\t\t\t *\t\t\t -  Check credentials"},{"line_number":188,"context_line":"\t\t\t */"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"\t\t\talog.Print(\"Remote direct successfully completed\")"},{"line_number":191,"context_line":"\t\t\treturn nil"}],"source_content_type":"text/x-go","patch_set":4,"id":"3fa7e38b_c78e1c78","line":188,"range":{"start_line":183,"start_character":3,"end_line":188,"end_character":6},"updated":"2019-09-25 12:20:55.000000000","message":"Do you have a position on how to deal with the time gap between delivering the remote request and the time to validate. I am now thinking that we might want to have remote direct essentially end with the acknowledgment that the redfish/smash accepted the request to reboot. And then perhaps teh validate is a separate function one can try multiple times, which keeps remotedirect simple","commit_id":"f94f139b0d83c8e3c3edd74cadb6dea39c4aecad"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"f0c2114b132325e307dbb4def250a6f71d8d8965","unresolved":false,"context_lines":[{"line_number":180,"context_line":"\t\t\t\talog.Fatal(err)"},{"line_number":181,"context_line":"\t\t\t}"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"\t\t\t/*"},{"line_number":184,"context_line":"\t\t\t *\tTODO: Validate Ephemeral Node is Reachable. Check for"},{"line_number":185,"context_line":"\t\t\t *\t\t\t -  hardware errors"},{"line_number":186,"context_line":"\t\t\t *\t\t\t -  Network validation"},{"line_number":187,"context_line":"\t\t\t *\t\t\t -  Check credentials"},{"line_number":188,"context_line":"\t\t\t */"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"\t\t\talog.Print(\"Remote direct successfully completed\")"},{"line_number":191,"context_line":"\t\t\treturn nil"}],"source_content_type":"text/x-go","patch_set":4,"id":"3fa7e38b_e7fc78b6","line":188,"range":{"start_line":183,"start_character":3,"end_line":188,"end_character":6},"in_reply_to":"3fa7e38b_c78e1c78","updated":"2019-09-25 12:27:50.000000000","message":"Mika Koskimaki has another patchset for validation coming. Lets see in that patchset if that approach is reasonable or not. otherwise we can separate that functionality later.","commit_id":"f94f139b0d83c8e3c3edd74cadb6dea39c4aecad"},{"author":{"_account_id":24580,"name":"James Gu","email":"james.gu@microsoft.com","username":"jamesgu"},"change_message_id":"dee4b5caaa66098e8966ebaf931150d320a5f1c8","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"\t// TODO: Remove CLI flags after reading configuration from config documents"},{"line_number":53,"context_line":"\t// \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":54,"context_line":"\tflags.StringVarP(\u0026cmdSetting.RemoteConfig.RemoteURL,"},{"line_number":55,"context_line":"\t\t\"remote-url\","},{"line_number":56,"context_line":"\t\t\"\","},{"line_number":57,"context_line":"\t\t\"http://localhost:8000\","}],"source_content_type":"text/x-go","patch_set":5,"id":"3fa7e38b_49abec73","line":54,"updated":"2019-09-27 17:21:53.000000000","message":"Does the url come from the command args or from the manifests?","commit_id":"7e46bf7915f0c9b7fbc28260c30357ec41fb5004"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"cd5753b5676e0ca5fce72cab06fa43d3daeb1660","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"\t// TODO: Remove CLI flags after reading configuration from config documents"},{"line_number":53,"context_line":"\t// \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":54,"context_line":"\tflags.StringVarP(\u0026cmdSetting.RemoteConfig.RemoteURL,"},{"line_number":55,"context_line":"\t\t\"remote-url\","},{"line_number":56,"context_line":"\t\t\"\","},{"line_number":57,"context_line":"\t\t\"http://localhost:8000\","}],"source_content_type":"text/x-go","patch_set":5,"id":"3fa7e38b_3bfb44c1","line":54,"in_reply_to":"3fa7e38b_49abec73","updated":"2019-09-30 09:04:10.000000000","message":"yes .. right now the configuration is coming from CLI args. when config module is ready then this configuration will be removed from cli args.","commit_id":"7e46bf7915f0c9b7fbc28260c30357ec41fb5004"},{"author":{"_account_id":24580,"name":"James Gu","email":"james.gu@microsoft.com","username":"jamesgu"},"change_message_id":"dee4b5caaa66098e8966ebaf931150d320a5f1c8","unresolved":false,"context_lines":[{"line_number":69,"context_line":"\t\t\"\","},{"line_number":70,"context_line":"\t\t\"[Temporary. Will be removed] Remote ISO path for ephemeral node\")"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"\tflags.StringVarP(\u0026cmdSetting.RemoteConfig.RemoteType,"},{"line_number":73,"context_line":"\t\t\"remote-type\","},{"line_number":74,"context_line":"\t\t\"\","},{"line_number":75,"context_line":"\t\t\"redfish\","}],"source_content_type":"text/x-go","patch_set":5,"id":"3fa7e38b_29beb0b3","line":72,"updated":"2019-09-27 17:21:53.000000000","message":"Is the type coming from the annotation, instead of the cmdline arg?","commit_id":"7e46bf7915f0c9b7fbc28260c30357ec41fb5004"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"cd5753b5676e0ca5fce72cab06fa43d3daeb1660","unresolved":false,"context_lines":[{"line_number":69,"context_line":"\t\t\"\","},{"line_number":70,"context_line":"\t\t\"[Temporary. Will be removed] Remote ISO path for ephemeral node\")"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"\tflags.StringVarP(\u0026cmdSetting.RemoteConfig.RemoteType,"},{"line_number":73,"context_line":"\t\t\"remote-type\","},{"line_number":74,"context_line":"\t\t\"\","},{"line_number":75,"context_line":"\t\t\"redfish\","}],"source_content_type":"text/x-go","patch_set":5,"id":"3fa7e38b_9b291838","line":72,"in_reply_to":"3fa7e38b_29beb0b3","updated":"2019-09-30 09:04:10.000000000","message":"yes .. it will come from annotation when we are able to read yaml documents and when the schema of those documents is finalized.","commit_id":"7e46bf7915f0c9b7fbc28260c30357ec41fb5004"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"91c88259a209c1e4bbbcbec39cca0685b3164527","unresolved":false,"context_lines":[{"line_number":75,"context_line":"\t\t\"redfish\","},{"line_number":76,"context_line":"\t\t\"Remote type e.g. redfish, smash etc.\")"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"\t_ \u003d cmd.MarkFlagRequired(\"eph-node-id\")"},{"line_number":79,"context_line":"\t_ \u003d cmd.MarkFlagRequired(\"iso-path\")"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"}"}],"source_content_type":"text/x-go","patch_set":5,"id":"3fa7e38b_b5c3d588","line":78,"range":{"start_line":78,"start_character":1,"end_line":78,"end_character":5},"updated":"2019-09-27 14:16:12.000000000","message":"These errors need a log.Fatal. If we silently ignore these errors, then someone changing/deleting a flag may run into some nasty errors","commit_id":"7e46bf7915f0c9b7fbc28260c30357ec41fb5004"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"cd5753b5676e0ca5fce72cab06fa43d3daeb1660","unresolved":false,"context_lines":[{"line_number":75,"context_line":"\t\t\"redfish\","},{"line_number":76,"context_line":"\t\t\"Remote type e.g. redfish, smash etc.\")"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"\t_ \u003d cmd.MarkFlagRequired(\"eph-node-id\")"},{"line_number":79,"context_line":"\t_ \u003d cmd.MarkFlagRequired(\"iso-path\")"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"}"}],"source_content_type":"text/x-go","patch_set":5,"id":"3fa7e38b_bbbe54d2","line":78,"range":{"start_line":78,"start_character":1,"end_line":78,"end_character":5},"in_reply_to":"3fa7e38b_b5c3d588","updated":"2019-09-30 09:04:10.000000000","message":"Done","commit_id":"7e46bf7915f0c9b7fbc28260c30357ec41fb5004"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"27bb5df66ad8cfee8b0f840067e3eb4a30b555d7","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/environment\""},{"line_number":12,"context_line":"\talog \"opendev.org/airship/airshipctl/pkg/log\""},{"line_number":13,"context_line":"\tredfish_utils \"opendev.org/airship/airshipctl/pkg/remote/redfish\""},{"line_number":14,"context_line":")"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"// RemoteDirect settings for remotedirect command"}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_990d60ea","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":66},"updated":"2019-10-03 18:27:38.000000000","message":"confusing naming convention here, especially sitting next to line 9","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":7769,"name":"Pentheus","display_name":"Alan Meadows","email":"alan.meadows@gmail.com","username":"alanmeadows"},"change_message_id":"4afce1cb698e6ff44f2bdafbaa573fa93fbfe7d0","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/environment\""},{"line_number":12,"context_line":"\talog \"opendev.org/airship/airshipctl/pkg/log\""},{"line_number":13,"context_line":"\tredfish_utils \"opendev.org/airship/airshipctl/pkg/remote/redfish\""},{"line_number":14,"context_line":")"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"// RemoteDirect settings for remotedirect command"}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_b9ae1c96","line":13,"updated":"2019-10-03 17:14:39.000000000","message":"minor nit, this name redfish_utils for pkg/remote/redfish really confuses me ;-)","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"4165283580478037e5f176890127bdcdde6c930a","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/environment\""},{"line_number":12,"context_line":"\talog \"opendev.org/airship/airshipctl/pkg/log\""},{"line_number":13,"context_line":"\tredfish_utils \"opendev.org/airship/airshipctl/pkg/remote/redfish\""},{"line_number":14,"context_line":")"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"// RemoteDirect settings for remotedirect command"}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_618e8a28","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":66},"in_reply_to":"3fa7e38b_990d60ea","updated":"2019-10-07 12:37:36.000000000","message":"I was planning to fix this in the next commits when I will move redfish lib to airshipctl. But let me see what I can do in this commit.","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":7769,"name":"Pentheus","display_name":"Alan Meadows","email":"alan.meadows@gmail.com","username":"alanmeadows"},"change_message_id":"ced4c3076be7b167e2828483e247657fa65be0a2","unresolved":false,"context_lines":[{"line_number":25,"context_line":"\tAirshipRemoteTypeSmash   string \u003d \"smash\""},{"line_number":26,"context_line":")"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"type RemoteDirectConfig struct {"},{"line_number":29,"context_line":"\t// remote type"},{"line_number":30,"context_line":"\tRemoteType string"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_be9cc25d","line":28,"updated":"2019-10-03 16:29:39.000000000","message":"A high level feedback item here is I expect most of this code to live in pkg/bootstrap -- cmd/bootstrap* should be as thin as possible - a mere client of pkg/bootstrap (which may use pkg/remote as a lower level library itself).","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"4165283580478037e5f176890127bdcdde6c930a","unresolved":false,"context_lines":[{"line_number":25,"context_line":"\tAirshipRemoteTypeSmash   string \u003d \"smash\""},{"line_number":26,"context_line":")"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"type RemoteDirectConfig struct {"},{"line_number":29,"context_line":"\t// remote type"},{"line_number":30,"context_line":"\tRemoteType string"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_81914649","line":28,"in_reply_to":"3fa7e38b_be9cc25d","updated":"2019-10-07 12:37:36.000000000","message":"agree. will fix.","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":7769,"name":"Pentheus","display_name":"Alan Meadows","email":"alan.meadows@gmail.com","username":"alanmeadows"},"change_message_id":"70572f2936ebe48f1151e1c6d9c4d1f7a35519a1","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"type RemoteDirectConfig struct {"},{"line_number":29,"context_line":"\t// remote type"},{"line_number":30,"context_line":"\tRemoteType string"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"\t// remote URL"},{"line_number":33,"context_line":"\tRemoteURL string"}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_3e721213","line":30,"updated":"2019-10-03 17:07:54.000000000","message":"I\u0027d expect this struct to define a few validation methods that could be used without involving a redfish client library, like whether the url, type, and iso path are valid for what the struct supports.  While the redfish client itself may support url validation, its not clear at what point it would error on invalid input. It may make sense just to have all of that done upfront with strongly typed validation errors offline rather than pass preventable bad data to the redfish client.","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"4165283580478037e5f176890127bdcdde6c930a","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"type RemoteDirectConfig struct {"},{"line_number":29,"context_line":"\t// remote type"},{"line_number":30,"context_line":"\tRemoteType string"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"\t// remote URL"},{"line_number":33,"context_line":"\tRemoteURL string"}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_419b4e65","line":30,"in_reply_to":"3fa7e38b_3e721213","updated":"2019-10-07 12:37:36.000000000","message":"initially this commit was more like a structural commit and more validations and enhancements can come later. but now expectations are getting higher. But i\u0027ll fix this if you say.","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"27bb5df66ad8cfee8b0f840067e3eb4a30b555d7","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"\t// TODO: Remove CLI flags after reading configuration from config documents"},{"line_number":53,"context_line":"\t// \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":54,"context_line":"\tflags.StringVarP(\u0026cmdSetting.RemoteConfig.RemoteURL,"},{"line_number":55,"context_line":"\t\t\"remote-url\","},{"line_number":56,"context_line":"\t\t\"\","},{"line_number":57,"context_line":"\t\t\"http://localhost:8000\","}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_196c109b","line":54,"range":{"start_line":54,"start_character":7,"end_line":54,"end_character":17},"updated":"2019-10-03 18:27:38.000000000","message":"If a flag such as this doesn\u0027t have a shorthand, use StringVar in its place","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"4165283580478037e5f176890127bdcdde6c930a","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"\t// TODO: Remove CLI flags after reading configuration from config documents"},{"line_number":53,"context_line":"\t// \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":54,"context_line":"\tflags.StringVarP(\u0026cmdSetting.RemoteConfig.RemoteURL,"},{"line_number":55,"context_line":"\t\t\"remote-url\","},{"line_number":56,"context_line":"\t\t\"\","},{"line_number":57,"context_line":"\t\t\"http://localhost:8000\","}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_e1a11a97","line":54,"range":{"start_line":54,"start_character":7,"end_line":54,"end_character":17},"in_reply_to":"3fa7e38b_196c109b","updated":"2019-10-07 12:37:36.000000000","message":"will fix","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"27bb5df66ad8cfee8b0f840067e3eb4a30b555d7","unresolved":false,"context_lines":[{"line_number":176,"context_line":"}"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"// New Bootstrap remote direct subcommand"},{"line_number":179,"context_line":"func NewRemoteDirectCommand(parent *cobra.Command, rootSettings *environment.AirshipCTLSettings) *cobra.Command {"},{"line_number":180,"context_line":"\tsettings :\u003d \u0026RemoteDirectSettings{AirshipCTLSettings: rootSettings}"},{"line_number":181,"context_line":"\tremoteDirect :\u003d \u0026cobra.Command{"},{"line_number":182,"context_line":"\t\tUse:   \"remotedirect\","}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_7ef5ea82","line":179,"range":{"start_line":179,"start_character":28,"end_line":179,"end_character":49},"updated":"2019-10-03 18:27:38.000000000","message":"this arg is unecessary - cobra commands have a builtin \"Parent\" method","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"4165283580478037e5f176890127bdcdde6c930a","unresolved":false,"context_lines":[{"line_number":176,"context_line":"}"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"// New Bootstrap remote direct subcommand"},{"line_number":179,"context_line":"func NewRemoteDirectCommand(parent *cobra.Command, rootSettings *environment.AirshipCTLSettings) *cobra.Command {"},{"line_number":180,"context_line":"\tsettings :\u003d \u0026RemoteDirectSettings{AirshipCTLSettings: rootSettings}"},{"line_number":181,"context_line":"\tremoteDirect :\u003d \u0026cobra.Command{"},{"line_number":182,"context_line":"\t\tUse:   \"remotedirect\","}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_019d5656","line":179,"range":{"start_line":179,"start_character":28,"end_line":179,"end_character":49},"in_reply_to":"3fa7e38b_7ef5ea82","updated":"2019-10-07 12:37:36.000000000","message":"will fix","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":7185,"name":"Dmitry Ukov","email":"dukov@mirantis.com","username":"dukov"},"change_message_id":"3a629dc8c4ff0712f431d7eb9fffc17a37647bd0","unresolved":false,"context_lines":[{"line_number":63,"context_line":"\t\t\t/* TODO: Get config from settings.GetCurrentContext() and remove cli arguments */"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"\t\t\t/* Trigger remotedirect based on remote type */"},{"line_number":66,"context_line":"\t\t\terr :\u003d remote.DoRemoteDirect(settings.RemoteConfig)"},{"line_number":67,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":68,"context_line":"\t\t\t\talog.Fatal(err)"},{"line_number":69,"context_line":"\t\t\t}"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"\t\t\talog.Print(\"Remote direct successfully completed\")"},{"line_number":72,"context_line":"\t\t\treturn nil"},{"line_number":73,"context_line":"\t\t},"},{"line_number":74,"context_line":"\t}"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-go","patch_set":21,"id":"3fa7e38b_72de5611","line":72,"range":{"start_line":66,"start_character":0,"end_line":72,"end_character":13},"updated":"2019-10-23 15:54:17.000000000","message":"I guess it\u0027s better to rework it like:\n\nreturn remote.DoRemoteDirect(settings.RemoteConfig)\n\nthis will save a few lines of code","commit_id":"f12e3def8fdebca0b292cda86496fb6cb8cef99f"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"61a3ca554e53d3e91d5374e54889c3e9c6b433fe","unresolved":false,"context_lines":[{"line_number":63,"context_line":"\t\t\t/* TODO: Get config from settings.GetCurrentContext() and remove cli arguments */"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"\t\t\t/* Trigger remotedirect based on remote type */"},{"line_number":66,"context_line":"\t\t\terr :\u003d remote.DoRemoteDirect(settings.RemoteConfig)"},{"line_number":67,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":68,"context_line":"\t\t\t\talog.Fatal(err)"},{"line_number":69,"context_line":"\t\t\t}"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"\t\t\talog.Print(\"Remote direct successfully completed\")"},{"line_number":72,"context_line":"\t\t\treturn nil"},{"line_number":73,"context_line":"\t\t},"},{"line_number":74,"context_line":"\t}"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-go","patch_set":21,"id":"3fa7e38b_b37930c6","line":72,"range":{"start_line":66,"start_character":0,"end_line":72,"end_character":13},"in_reply_to":"3fa7e38b_72de5611","updated":"2019-10-24 07:43:28.000000000","message":"this is top level for error handling. I have to handle error here and stop if there is error. I cannot just return from here. how will you print the log message then?","commit_id":"f12e3def8fdebca0b292cda86496fb6cb8cef99f"},{"author":{"_account_id":7185,"name":"Dmitry Ukov","email":"dukov@mirantis.com","username":"dukov"},"change_message_id":"b1934fb99a2b65639b5e11e99cc53ccfe7ec45e3","unresolved":false,"context_lines":[{"line_number":63,"context_line":"\t\t\t/* TODO: Get config from settings.GetCurrentContext() and remove cli arguments */"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"\t\t\t/* Trigger remotedirect based on remote type */"},{"line_number":66,"context_line":"\t\t\terr :\u003d remote.DoRemoteDirect(settings.RemoteConfig)"},{"line_number":67,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":68,"context_line":"\t\t\t\talog.Fatal(err)"},{"line_number":69,"context_line":"\t\t\t}"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"\t\t\talog.Print(\"Remote direct successfully completed\")"},{"line_number":72,"context_line":"\t\t\treturn nil"},{"line_number":73,"context_line":"\t\t},"},{"line_number":74,"context_line":"\t}"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-go","patch_set":21,"id":"3fa7e38b_d67050dd","line":72,"range":{"start_line":66,"start_character":0,"end_line":72,"end_character":13},"in_reply_to":"3fa7e38b_b37930c6","updated":"2019-10-24 08:43:28.000000000","message":"Log message print can be moved inside DoRemoteDirect. Error will be handled by main function and cobra itself see main.go\n\n        if err !\u003d nil {\n                fmt.Fprintln(os.Stdout, err)\n                os.Exit(1)\n        }","commit_id":"f12e3def8fdebca0b292cda86496fb6cb8cef99f"}],"cmd/bootstrap/bootstrap_remotedirect_test.go":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"27bb5df66ad8cfee8b0f840067e3eb4a30b555d7","unresolved":false,"context_lines":[{"line_number":55,"context_line":"\t}"},{"line_number":56,"context_line":")"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"func getBootstrapRemoteDirectCmd(t *testing.T) *cobra.Command {"},{"line_number":59,"context_line":"\t_ \u003d t"},{"line_number":60,"context_line":"\treturn NewRemoteDirectCommand(nil, nil)"},{"line_number":61,"context_line":"}"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"func TestRemoteDirect(t *testing.T) {"},{"line_number":64,"context_line":"\ttests :\u003d []*testutil.CmdTest{"}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_5e5eee45","line":61,"range":{"start_line":58,"start_character":0,"end_line":61,"end_character":1},"updated":"2019-10-03 18:27:38.000000000","message":"This function doesn\u0027t need to exist. Just use NewRemoteDirectCommand inline","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"4165283580478037e5f176890127bdcdde6c930a","unresolved":false,"context_lines":[{"line_number":55,"context_line":"\t}"},{"line_number":56,"context_line":")"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"func getBootstrapRemoteDirectCmd(t *testing.T) *cobra.Command {"},{"line_number":59,"context_line":"\t_ \u003d t"},{"line_number":60,"context_line":"\treturn NewRemoteDirectCommand(nil, nil)"},{"line_number":61,"context_line":"}"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"func TestRemoteDirect(t *testing.T) {"},{"line_number":64,"context_line":"\ttests :\u003d []*testutil.CmdTest{"}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_c1a65eac","line":61,"range":{"start_line":58,"start_character":0,"end_line":61,"end_character":1},"in_reply_to":"3fa7e38b_5e5eee45","updated":"2019-10-07 12:37:36.000000000","message":"will fix.","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":7769,"name":"Pentheus","display_name":"Alan Meadows","email":"alan.meadows@gmail.com","username":"alanmeadows"},"change_message_id":"70572f2936ebe48f1151e1c6d9c4d1f7a35519a1","unresolved":false,"context_lines":[{"line_number":170,"context_line":"\tlocalRDCfg :\u003d rDCfg"},{"line_number":171,"context_line":"\tlocalRDCfg.IsoPath \u003d \"bogus/path/to.iso\""},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"\trealErr :\u003d fmt.Errorf(\"Invalid remote boot path\")"},{"line_number":174,"context_line":"\thttpResp :\u003d \u0026http.Response{"},{"line_number":175,"context_line":"\t\tStatusCode: 500,"},{"line_number":176,"context_line":"\t}"}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_3e55321e","line":173,"updated":"2019-10-03 17:07:54.000000000","message":"We need to push for strongly typed errors everywhere.  I understand we are currently consuming the Nordix redfish library and this may be more feedback on that then this code but given this is a consumer, I am putting it here.  However, anyone who leverages a third-party package should be responsible for turning its string-based error messages to strongly typed errors for consumers to switch on. I really want to see every pkg/* implement: \n  - an errors.go file containing all strongly typed errors for that pkg.\n  - strongly typed error types for each type of error, and only return those to external package consumers.","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"4165283580478037e5f176890127bdcdde6c930a","unresolved":false,"context_lines":[{"line_number":170,"context_line":"\tlocalRDCfg :\u003d rDCfg"},{"line_number":171,"context_line":"\tlocalRDCfg.IsoPath \u003d \"bogus/path/to.iso\""},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"\trealErr :\u003d fmt.Errorf(\"Invalid remote boot path\")"},{"line_number":174,"context_line":"\thttpResp :\u003d \u0026http.Response{"},{"line_number":175,"context_line":"\t\tStatusCode: 500,"},{"line_number":176,"context_line":"\t}"}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_81baa6bd","line":173,"in_reply_to":"3fa7e38b_3e55321e","updated":"2019-10-07 12:37:36.000000000","message":"will fix.","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"}],"pkg/error/error.go":[{"author":{"_account_id":7185,"name":"Dmitry Ukov","email":"dukov@mirantis.com","username":"dukov"},"change_message_id":"3a629dc8c4ff0712f431d7eb9fffc17a37647bd0","unresolved":false,"context_lines":[{"line_number":13,"context_line":"\treturn ae.Message"},{"line_number":14,"context_line":"}"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"// NewAirshipError is a helper function used"},{"line_number":17,"context_line":"// to create a new AirshipError object."},{"line_number":18,"context_line":"func NewAirshipError(msg string) error {"},{"line_number":19,"context_line":"\treturn \u0026AirshipError{Message: msg}"},{"line_number":20,"context_line":"}"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"// NewAirshipErrorf is same as NewAirshipError"},{"line_number":23,"context_line":"// except it allows to format the error."},{"line_number":24,"context_line":"func NewAirshipErrorf(msg string) error {"},{"line_number":25,"context_line":"\treturn \u0026AirshipError{Message: msg}"},{"line_number":26,"context_line":"}"}],"source_content_type":"text/x-go","patch_set":21,"id":"3fa7e38b_120cc292","line":26,"range":{"start_line":16,"start_character":0,"end_line":26,"end_character":1},"updated":"2019-10-23 15:54:17.000000000","message":"Not sure that we need fabrics for AirshipError\nWe can put AirshipError{...} directly. We do not even need to create pointer object i guess","commit_id":"f12e3def8fdebca0b292cda86496fb6cb8cef99f"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"61a3ca554e53d3e91d5374e54889c3e9c6b433fe","unresolved":false,"context_lines":[{"line_number":13,"context_line":"\treturn ae.Message"},{"line_number":14,"context_line":"}"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"// NewAirshipError is a helper function used"},{"line_number":17,"context_line":"// to create a new AirshipError object."},{"line_number":18,"context_line":"func NewAirshipError(msg string) error {"},{"line_number":19,"context_line":"\treturn \u0026AirshipError{Message: msg}"},{"line_number":20,"context_line":"}"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"// NewAirshipErrorf is same as NewAirshipError"},{"line_number":23,"context_line":"// except it allows to format the error."},{"line_number":24,"context_line":"func NewAirshipErrorf(msg string) error {"},{"line_number":25,"context_line":"\treturn \u0026AirshipError{Message: msg}"},{"line_number":26,"context_line":"}"}],"source_content_type":"text/x-go","patch_set":21,"id":"3fa7e38b_9370aa0a","line":26,"range":{"start_line":16,"start_character":0,"end_line":26,"end_character":1},"in_reply_to":"3fa7e38b_120cc292","updated":"2019-10-24 07:43:28.000000000","message":"removed the New* functions but please see this for pointer receivers.\nhttps://stackoverflow.com/a/50333850/1739110","commit_id":"f12e3def8fdebca0b292cda86496fb6cb8cef99f"},{"author":{"_account_id":7185,"name":"Dmitry Ukov","email":"dukov@mirantis.com","username":"dukov"},"change_message_id":"b1934fb99a2b65639b5e11e99cc53ccfe7ec45e3","unresolved":false,"context_lines":[{"line_number":13,"context_line":"\treturn ae.Message"},{"line_number":14,"context_line":"}"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"// NewAirshipError is a helper function used"},{"line_number":17,"context_line":"// to create a new AirshipError object."},{"line_number":18,"context_line":"func NewAirshipError(msg string) error {"},{"line_number":19,"context_line":"\treturn \u0026AirshipError{Message: msg}"},{"line_number":20,"context_line":"}"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"// NewAirshipErrorf is same as NewAirshipError"},{"line_number":23,"context_line":"// except it allows to format the error."},{"line_number":24,"context_line":"func NewAirshipErrorf(msg string) error {"},{"line_number":25,"context_line":"\treturn \u0026AirshipError{Message: msg}"},{"line_number":26,"context_line":"}"}],"source_content_type":"text/x-go","patch_set":21,"id":"3fa7e38b_1924dbae","line":26,"range":{"start_line":16,"start_character":0,"end_line":26,"end_character":1},"in_reply_to":"3fa7e38b_9370aa0a","updated":"2019-10-24 08:43:28.000000000","message":"That\u0027s fair regarding pointers since this seems like a generic error with dynamically created message.","commit_id":"f12e3def8fdebca0b292cda86496fb6cb8cef99f"}],"pkg/remote/redfish/redfish.go":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"5a03c7dd88a7e5af9a7adaa711264d83c4a6c142","unresolved":false,"context_lines":[{"line_number":108,"context_line":"\tvar api redfishApi.RedfishAPI \u003d redfishClient.NewAPIClient(cfg).DefaultApi"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"\turl, err :\u003d url.Parse(remoteURL)"},{"line_number":111,"context_line":"\tif err !\u003d nil {"},{"line_number":112,"context_line":"\t\treturn RedfishRemoteDirect{}, NewRedfishErrorf(\"Invalid URL format\")"},{"line_number":113,"context_line":"\t}"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-go","patch_set":18,"id":"3fa7e38b_9f24b20e","line":111,"range":{"start_line":111,"start_character":4,"end_line":111,"end_character":7},"updated":"2019-10-15 16:57:01.000000000","message":"It would probably be helpful to the user to add this error\u0027s message to the RedfishError for context","commit_id":"d9125f2c758f458478bec37f0eb8437d687ec06a"},{"author":{"_account_id":7185,"name":"Dmitry Ukov","email":"dukov@mirantis.com","username":"dukov"},"change_message_id":"3a629dc8c4ff0712f431d7eb9fffc17a37647bd0","unresolved":false,"context_lines":[{"line_number":87,"context_line":"\tisoPath string,"},{"line_number":88,"context_line":") (RedfishRemoteDirect, error) {"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"\tif len(remoteURL) \u003d\u003d 0 {"},{"line_number":91,"context_line":"\t\treturn RedfishRemoteDirect{},"},{"line_number":92,"context_line":"\t\t\tNewRedfishConfigErrorf(\"redfish remote url empty\")"},{"line_number":93,"context_line":"\t}"}],"source_content_type":"text/x-go","patch_set":21,"id":"3fa7e38b_4d293ff0","line":90,"range":{"start_line":90,"start_character":4,"end_line":90,"end_character":23},"updated":"2019-10-23 15:54:17.000000000","message":"why do not use just remoteURL\u003d\u003d\"\" ?","commit_id":"f12e3def8fdebca0b292cda86496fb6cb8cef99f"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"61a3ca554e53d3e91d5374e54889c3e9c6b433fe","unresolved":false,"context_lines":[{"line_number":87,"context_line":"\tisoPath string,"},{"line_number":88,"context_line":") (RedfishRemoteDirect, error) {"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"\tif len(remoteURL) \u003d\u003d 0 {"},{"line_number":91,"context_line":"\t\treturn RedfishRemoteDirect{},"},{"line_number":92,"context_line":"\t\t\tNewRedfishConfigErrorf(\"redfish remote url empty\")"},{"line_number":93,"context_line":"\t}"}],"source_content_type":"text/x-go","patch_set":21,"id":"3fa7e38b_b693545c","line":90,"range":{"start_line":90,"start_character":4,"end_line":90,"end_character":23},"in_reply_to":"3fa7e38b_4d293ff0","updated":"2019-10-24 07:43:28.000000000","message":"Done","commit_id":"f12e3def8fdebca0b292cda86496fb6cb8cef99f"},{"author":{"_account_id":7185,"name":"Dmitry Ukov","email":"dukov@mirantis.com","username":"dukov"},"change_message_id":"3a629dc8c4ff0712f431d7eb9fffc17a37647bd0","unresolved":false,"context_lines":[{"line_number":92,"context_line":"\t\t\tNewRedfishConfigErrorf(\"redfish remote url empty\")"},{"line_number":93,"context_line":"\t}"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"\tif len(ephNodeID) \u003d\u003d 0 {"},{"line_number":96,"context_line":"\t\treturn RedfishRemoteDirect{},"},{"line_number":97,"context_line":"\t\t\tNewRedfishConfigErrorf(\"redfish ephemeral node id empty\")"},{"line_number":98,"context_line":"\t}"}],"source_content_type":"text/x-go","patch_set":21,"id":"3fa7e38b_0d334764","line":95,"range":{"start_line":95,"start_character":4,"end_line":95,"end_character":23},"updated":"2019-10-23 15:54:17.000000000","message":"ditto","commit_id":"f12e3def8fdebca0b292cda86496fb6cb8cef99f"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"61a3ca554e53d3e91d5374e54889c3e9c6b433fe","unresolved":false,"context_lines":[{"line_number":92,"context_line":"\t\t\tNewRedfishConfigErrorf(\"redfish remote url empty\")"},{"line_number":93,"context_line":"\t}"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"\tif len(ephNodeID) \u003d\u003d 0 {"},{"line_number":96,"context_line":"\t\treturn RedfishRemoteDirect{},"},{"line_number":97,"context_line":"\t\t\tNewRedfishConfigErrorf(\"redfish ephemeral node id empty\")"},{"line_number":98,"context_line":"\t}"}],"source_content_type":"text/x-go","patch_set":21,"id":"3fa7e38b_d68e1031","line":95,"range":{"start_line":95,"start_character":4,"end_line":95,"end_character":23},"in_reply_to":"3fa7e38b_0d334764","updated":"2019-10-24 07:43:28.000000000","message":"Done","commit_id":"f12e3def8fdebca0b292cda86496fb6cb8cef99f"},{"author":{"_account_id":7185,"name":"Dmitry Ukov","email":"dukov@mirantis.com","username":"dukov"},"change_message_id":"3a629dc8c4ff0712f431d7eb9fffc17a37647bd0","unresolved":false,"context_lines":[{"line_number":97,"context_line":"\t\t\tNewRedfishConfigErrorf(\"redfish ephemeral node id empty\")"},{"line_number":98,"context_line":"\t}"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"\tif len(isoPath) \u003d\u003d 0 {"},{"line_number":101,"context_line":"\t\treturn RedfishRemoteDirect{},"},{"line_number":102,"context_line":"\t\t\tNewRedfishConfigErrorf(\"redfish ephemeral node iso Path empty\")"},{"line_number":103,"context_line":"\t}"}],"source_content_type":"text/x-go","patch_set":21,"id":"3fa7e38b_cd3c4f32","line":100,"range":{"start_line":100,"start_character":4,"end_line":100,"end_character":21},"updated":"2019-10-23 15:54:17.000000000","message":"ditto","commit_id":"f12e3def8fdebca0b292cda86496fb6cb8cef99f"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"61a3ca554e53d3e91d5374e54889c3e9c6b433fe","unresolved":false,"context_lines":[{"line_number":97,"context_line":"\t\t\tNewRedfishConfigErrorf(\"redfish ephemeral node id empty\")"},{"line_number":98,"context_line":"\t}"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"\tif len(isoPath) \u003d\u003d 0 {"},{"line_number":101,"context_line":"\t\treturn RedfishRemoteDirect{},"},{"line_number":102,"context_line":"\t\t\tNewRedfishConfigErrorf(\"redfish ephemeral node iso Path empty\")"},{"line_number":103,"context_line":"\t}"}],"source_content_type":"text/x-go","patch_set":21,"id":"3fa7e38b_769ddc64","line":100,"range":{"start_line":100,"start_character":4,"end_line":100,"end_character":21},"in_reply_to":"3fa7e38b_cd3c4f32","updated":"2019-10-24 07:43:28.000000000","message":"Done","commit_id":"f12e3def8fdebca0b292cda86496fb6cb8cef99f"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"50febe4a5033658e4c6a5c2e2242795a84f391c0","unresolved":false,"context_lines":[{"line_number":29,"context_line":"}"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"// Top level function to handle Redfish remote direct"},{"line_number":32,"context_line":"func (cfg RedfishRemoteDirect) DoRemoteDirect() error {"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"\talog.Debugf(\"Using Redfish Endpoint: \u0027%s\u0027\\n\", cfg.RemoteURL.String())"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-go","patch_set":26,"id":"3fa7e38b_26013d6b","line":32,"updated":"2019-10-28 17:50:18.000000000","message":"remove the newlines in these log messages","commit_id":"0647ef8048b79c05363e8419df82132f85819fcc"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"b5efc10b22e7f7622988f0c17e58f4184a5960f5","unresolved":false,"context_lines":[{"line_number":29,"context_line":"}"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"// Top level function to handle Redfish remote direct"},{"line_number":32,"context_line":"func (cfg RedfishRemoteDirect) DoRemoteDirect() error {"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"\talog.Debugf(\"Using Redfish Endpoint: \u0027%s\u0027\\n\", cfg.RemoteURL.String())"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-go","patch_set":26,"id":"3fa7e38b_4d948d36","line":32,"in_reply_to":"3fa7e38b_26013d6b","updated":"2019-10-29 12:25:07.000000000","message":"Done","commit_id":"0647ef8048b79c05363e8419df82132f85819fcc"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"50febe4a5033658e4c6a5c2e2242795a84f391c0","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"\turl, err :\u003d url.Parse(remoteURL)"},{"line_number":114,"context_line":"\tif err !\u003d nil {"},{"line_number":115,"context_line":"\t\treturn RedfishRemoteDirect{}, NewRedfishConfigErrorf(\"Invalid URL format: %+v\", err)"},{"line_number":116,"context_line":"\t}"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"\tclient :\u003d RedfishRemoteDirect{"}],"source_content_type":"text/x-go","patch_set":26,"id":"3fa7e38b_660bb58d","line":115,"range":{"start_line":115,"start_character":77,"end_line":115,"end_character":78},"updated":"2019-10-28 17:50:18.000000000","message":"delete this","commit_id":"0647ef8048b79c05363e8419df82132f85819fcc"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"b5efc10b22e7f7622988f0c17e58f4184a5960f5","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"\turl, err :\u003d url.Parse(remoteURL)"},{"line_number":114,"context_line":"\tif err !\u003d nil {"},{"line_number":115,"context_line":"\t\treturn RedfishRemoteDirect{}, NewRedfishConfigErrorf(\"Invalid URL format: %+v\", err)"},{"line_number":116,"context_line":"\t}"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"\tclient :\u003d RedfishRemoteDirect{"}],"source_content_type":"text/x-go","patch_set":26,"id":"3fa7e38b_8d8e0525","line":115,"range":{"start_line":115,"start_character":77,"end_line":115,"end_character":78},"in_reply_to":"3fa7e38b_660bb58d","updated":"2019-10-29 12:25:07.000000000","message":"Done","commit_id":"0647ef8048b79c05363e8419df82132f85819fcc"}],"pkg/remote/redfish/redfish_api.go":[{"author":{"_account_id":7769,"name":"Pentheus","display_name":"Alan Meadows","email":"alan.meadows@gmail.com","username":"alanmeadows"},"change_message_id":"70572f2936ebe48f1151e1c6d9c4d1f7a35519a1","unresolved":false,"context_lines":[{"line_number":7,"context_line":"\tredfish \"github.com/Nordix/go-redfish/client\""},{"line_number":8,"context_line":")"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"type RedfishAPI interface {"},{"line_number":11,"context_line":"\tEjectVirtualMedia(ctx _context.Context,"},{"line_number":12,"context_line":"\t\tmanagerId string,"},{"line_number":13,"context_line":"\t\tvirtualMediaId string,"}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_79f424d0","line":10,"updated":"2019-10-03 17:07:54.000000000","message":"Can you explain why the interface defined here rather than within the third-party client and just consumed?","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"4165283580478037e5f176890127bdcdde6c930a","unresolved":false,"context_lines":[{"line_number":7,"context_line":"\tredfish \"github.com/Nordix/go-redfish/client\""},{"line_number":8,"context_line":")"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"type RedfishAPI interface {"},{"line_number":11,"context_line":"\tEjectVirtualMedia(ctx _context.Context,"},{"line_number":12,"context_line":"\t\tmanagerId string,"},{"line_number":13,"context_line":"\t\tvirtualMediaId string,"}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_32377e50","line":10,"in_reply_to":"3fa7e38b_79f424d0","updated":"2019-10-07 12:37:36.000000000","message":"Redfish client is autogenerated and it does not use interfaces. since the redfish library is going to be moved here so there is no point putting this interface there in library. when that lib is moved here .. things will look more organized.","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"}],"pkg/remote/redfish/redfish_test.go":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"50febe4a5033658e4c6a5c2e2242795a84f391c0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"package redfish"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"import ("},{"line_number":4,"context_line":"\t\"context\""}],"source_content_type":"text/x-go","patch_set":26,"id":"3fa7e38b_e6d7a5be","line":1,"range":{"start_line":1,"start_character":8,"end_line":1,"end_character":15},"updated":"2019-10-28 17:50:18.000000000","message":"This package can be black-box tested. I think we should prefer that whenever possible. Please change this to `redfish_test` and then test the `redfish` package as a consumer","commit_id":"0647ef8048b79c05363e8419df82132f85819fcc"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"50febe4a5033658e4c6a5c2e2242795a84f391c0","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"func getDefaultRedfishRemoteDirectObj(api redfishAPI.RedfishAPI) RedfishRemoteDirect {"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"\trDCfg, _ :\u003d NewRedfishRemoteDirectClient("},{"line_number":53,"context_line":"\t\tctx,"},{"line_number":54,"context_line":"\t\tdefaultURL,"},{"line_number":55,"context_line":"\t\tcomputerSystemID,"}],"source_content_type":"text/x-go","patch_set":26,"id":"3fa7e38b_86efd1af","line":52,"updated":"2019-10-28 17:50:18.000000000","message":"I know this is a test, but we should never be suppressing errors. This should be a test helper function, and should use a `require.NoError` or similar","commit_id":"0647ef8048b79c05363e8419df82132f85819fcc"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"218c5d4b04d7881384eaf447c2a34455b7306dfc","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"func getDefaultRedfishRemoteDirectObj(api redfishAPI.RedfishAPI) RedfishRemoteDirect {"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"\trDCfg, _ :\u003d NewRedfishRemoteDirectClient("},{"line_number":55,"context_line":"\t\tctx,"},{"line_number":56,"context_line":"\t\tdefaultURL,"},{"line_number":57,"context_line":"\t\tcomputerSystemID,"}],"source_content_type":"text/x-go","patch_set":27,"id":"3fa7e38b_499f9a01","line":54,"range":{"start_line":54,"start_character":7,"end_line":54,"end_character":9},"updated":"2019-10-29 18:45:26.000000000","message":"\u003e I know this is a test, but we should never be suppressing errors.\n \u003e This should be a test helper function, and should use a\n \u003e `require.NoError` or similar","commit_id":"f2faf6c489ba692cf90d3255d9c60aa235ceed6c"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"b00f5f8d328206dc4e64af2c641894f73d11b1cf","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"func getDefaultRedfishRemoteDirectObj(api redfishAPI.RedfishAPI) RedfishRemoteDirect {"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"\trDCfg, _ :\u003d NewRedfishRemoteDirectClient("},{"line_number":55,"context_line":"\t\tctx,"},{"line_number":56,"context_line":"\t\tdefaultURL,"},{"line_number":57,"context_line":"\t\tcomputerSystemID,"}],"source_content_type":"text/x-go","patch_set":27,"id":"3fa7e38b_e4db0b7a","line":54,"range":{"start_line":54,"start_character":7,"end_line":54,"end_character":9},"in_reply_to":"3fa7e38b_499f9a01","updated":"2019-10-29 19:24:02.000000000","message":"sorry. missed that before. fixed now.","commit_id":"f2faf6c489ba692cf90d3255d9c60aa235ceed6c"}],"pkg/remote/redfish/utils.go":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"f68736c069fd808a847a9cff3fb683dae34e36c8","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"\tif err !\u003d nil {"},{"line_number":22,"context_line":"\t\tlog.Fatal(err)"},{"line_number":23,"context_line":"\t\treturn \"\", err"},{"line_number":24,"context_line":"\t}"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"\telems :\u003d strings.Split(u.Path, \"/\")"}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_f3f3379d","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":16},"updated":"2019-09-19 18:52:58.000000000","message":"No need to return after a log.Fatal","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"e199053258003aee911556f795a7da133b8ea024","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"\tif err !\u003d nil {"},{"line_number":22,"context_line":"\t\tlog.Fatal(err)"},{"line_number":23,"context_line":"\t\treturn \"\", err"},{"line_number":24,"context_line":"\t}"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"\telems :\u003d strings.Split(u.Path, \"/\")"}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_7802b70b","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":16},"in_reply_to":"3fa7e38b_f3f3379d","updated":"2019-09-20 13:10:35.000000000","message":"Done","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"f68736c069fd808a847a9cff3fb683dae34e36c8","unresolved":false,"context_lines":[{"line_number":88,"context_line":"\t\treturn err"},{"line_number":89,"context_line":"\t}"},{"line_number":90,"context_line":"\tfor _, bootSource :\u003d range system.Boot.BootSourceOverrideTargetRedfishAllowableValues {"},{"line_number":91,"context_line":"\t\tif strings.ToLower(string(bootSource)) \u003d\u003d strings.ToLower(mediaType) {"},{"line_number":92,"context_line":"\t\t\t/* set boot source */"},{"line_number":93,"context_line":"\t\t\tsystemReq :\u003d redfish.ComputerSystem{}"},{"line_number":94,"context_line":"\t\t\tsystemReq.Boot.BootSourceOverrideTarget \u003d bootSource"}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_3328efe0","line":91,"updated":"2019-09-19 18:52:58.000000000","message":"Take a look at EqualFold - it\u0027s intended for exactly this.\n\nhttps://golang.org/pkg/strings/#EqualFold","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"e199053258003aee911556f795a7da133b8ea024","unresolved":false,"context_lines":[{"line_number":88,"context_line":"\t\treturn err"},{"line_number":89,"context_line":"\t}"},{"line_number":90,"context_line":"\tfor _, bootSource :\u003d range system.Boot.BootSourceOverrideTargetRedfishAllowableValues {"},{"line_number":91,"context_line":"\t\tif strings.ToLower(string(bootSource)) \u003d\u003d strings.ToLower(mediaType) {"},{"line_number":92,"context_line":"\t\t\t/* set boot source */"},{"line_number":93,"context_line":"\t\t\tsystemReq :\u003d redfish.ComputerSystem{}"},{"line_number":94,"context_line":"\t\t\tsystemReq.Boot.BootSourceOverrideTarget \u003d bootSource"}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_adfd53b2","line":91,"in_reply_to":"3fa7e38b_3328efe0","updated":"2019-09-20 13:10:35.000000000","message":"cool!","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"f68736c069fd808a847a9cff3fb683dae34e36c8","unresolved":false,"context_lines":[{"line_number":136,"context_line":"\tvMediaReq :\u003d redfish.InsertMediaRequestBody{}"},{"line_number":137,"context_line":"\tvMediaReq.Image \u003d isoPath"},{"line_number":138,"context_line":"\tvMediaReq.Inserted \u003d true"},{"line_number":139,"context_line":"\t_, httpResp, err :\u003d api.InsertVirtualMedia(ctx, managerId, vMediaId, vMediaReq)"},{"line_number":140,"context_line":"\tif err !\u003d nil {"},{"line_number":141,"context_line":"\t\tif httpResp.StatusCode \u003c 200 || httpResp.StatusCode \u003e\u003d 400 {"},{"line_number":142,"context_line":"\t\t\treturn err"},{"line_number":143,"context_line":"\t\t}"},{"line_number":144,"context_line":"\t}"},{"line_number":145,"context_line":"\treturn nil"},{"line_number":146,"context_line":"}"}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_131db3bc","line":144,"range":{"start_line":139,"start_character":0,"end_line":144,"end_character":2},"updated":"2019-09-19 18:52:58.000000000","message":"It seems like this chunk of code is repeated quite a bit - It probably needs either a function or a struct to attach to.","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"e199053258003aee911556f795a7da133b8ea024","unresolved":false,"context_lines":[{"line_number":136,"context_line":"\tvMediaReq :\u003d redfish.InsertMediaRequestBody{}"},{"line_number":137,"context_line":"\tvMediaReq.Image \u003d isoPath"},{"line_number":138,"context_line":"\tvMediaReq.Inserted \u003d true"},{"line_number":139,"context_line":"\t_, httpResp, err :\u003d api.InsertVirtualMedia(ctx, managerId, vMediaId, vMediaReq)"},{"line_number":140,"context_line":"\tif err !\u003d nil {"},{"line_number":141,"context_line":"\t\tif httpResp.StatusCode \u003c 200 || httpResp.StatusCode \u003e\u003d 400 {"},{"line_number":142,"context_line":"\t\t\treturn err"},{"line_number":143,"context_line":"\t\t}"},{"line_number":144,"context_line":"\t}"},{"line_number":145,"context_line":"\treturn nil"},{"line_number":146,"context_line":"}"}],"source_content_type":"text/x-go","patch_set":2,"id":"3fa7e38b_8d07371d","line":144,"range":{"start_line":139,"start_character":0,"end_line":144,"end_character":2},"in_reply_to":"3fa7e38b_131db3bc","updated":"2019-09-20 13:10:35.000000000","message":"Done","commit_id":"9d8ca53aa0e1ea5bc01881555aafc9e9a55c23f8"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"05e73a52ccbe715fea72db418347bf0e7fc50244","unresolved":false,"context_lines":[{"line_number":59,"context_line":"\t// \t\t\t string instead of boolean which fails unmarshalling."},{"line_number":60,"context_line":"\t//       Uncomment this code after the bug is fixed."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"\t/*"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"\t\tvMediaList, _, err :\u003d api.ListManagerVirtualMedia(ctx, managerId)"},{"line_number":65,"context_line":"\t\tif err !\u003d nil {"},{"line_number":66,"context_line":"\t\t\treturn \"\", \"\", err"},{"line_number":67,"context_line":"\t\t}"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"\t\tfor _, vMediaRef :\u003d range vMediaList.Members {"},{"line_number":71,"context_line":"\t\t\t\tvMediaId, _ :\u003d GetRedfishResourceIDFromURL(vMediaRef.OdataId)"},{"line_number":72,"context_line":"\t\t\t\tvMedia, _, err :\u003d api.GetManagerVirtualMedia(ctx, managerId, vMediaId)"},{"line_number":73,"context_line":"\t\t\t\tif err !\u003d nil {"},{"line_number":74,"context_line":"\t\t\t\t\treturn \"\", \"\", err"},{"line_number":75,"context_line":"\t\t\t\t}"},{"line_number":76,"context_line":"\t\t\t\tfor _, vMediaType :\u003d range vMedia.MediaTypes {"},{"line_number":77,"context_line":"\t\t\t\t\tif strings.ToLower(vMediaType) \u003d\u003d strings.ToLower(\"CD\") {"},{"line_number":78,"context_line":"\t\t\t\t\t\treturn vMediaId, vMediaType, nil"},{"line_number":79,"context_line":"\t\t\t\t\t}"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"\t\t\t\t\tif strings.ToLower(vMediaType) \u003d\u003d strings.ToLower(\"DVD\") {"},{"line_number":82,"context_line":"\t\t\t\t\t\treturn vMediaId, vMediaType, nil"},{"line_number":83,"context_line":"\t\t\t\t\t}"},{"line_number":84,"context_line":"\t\t\t\t}"},{"line_number":85,"context_line":"\t\t\t}"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"\t\t\treturn \"\", \"\", fmt.Errorf(\"Unable to find CD/DVD virtual Media for Manager[%s]\", managerId)"},{"line_number":89,"context_line":"\t*/"},{"line_number":90,"context_line":"}"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"// This function walks through the bootsources of a system and sets the bootsource"}],"source_content_type":"text/x-go","patch_set":4,"id":"3fa7e38b_cd9b9d70","line":89,"range":{"start_line":62,"start_character":0,"end_line":89,"end_character":3},"updated":"2019-09-25 13:55:54.000000000","message":"Could you either finish this or delete it before we merge?","commit_id":"f94f139b0d83c8e3c3edd74cadb6dea39c4aecad"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"6dd99c090f56c475bfcdfb9c2ff2a7877dc7c743","unresolved":false,"context_lines":[{"line_number":59,"context_line":"\t// \t\t\t string instead of boolean which fails unmarshalling."},{"line_number":60,"context_line":"\t//       Uncomment this code after the bug is fixed."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"\t/*"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"\t\tvMediaList, _, err :\u003d api.ListManagerVirtualMedia(ctx, managerId)"},{"line_number":65,"context_line":"\t\tif err !\u003d nil {"},{"line_number":66,"context_line":"\t\t\treturn \"\", \"\", err"},{"line_number":67,"context_line":"\t\t}"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"\t\tfor _, vMediaRef :\u003d range vMediaList.Members {"},{"line_number":71,"context_line":"\t\t\t\tvMediaId, _ :\u003d GetRedfishResourceIDFromURL(vMediaRef.OdataId)"},{"line_number":72,"context_line":"\t\t\t\tvMedia, _, err :\u003d api.GetManagerVirtualMedia(ctx, managerId, vMediaId)"},{"line_number":73,"context_line":"\t\t\t\tif err !\u003d nil {"},{"line_number":74,"context_line":"\t\t\t\t\treturn \"\", \"\", err"},{"line_number":75,"context_line":"\t\t\t\t}"},{"line_number":76,"context_line":"\t\t\t\tfor _, vMediaType :\u003d range vMedia.MediaTypes {"},{"line_number":77,"context_line":"\t\t\t\t\tif strings.ToLower(vMediaType) \u003d\u003d strings.ToLower(\"CD\") {"},{"line_number":78,"context_line":"\t\t\t\t\t\treturn vMediaId, vMediaType, nil"},{"line_number":79,"context_line":"\t\t\t\t\t}"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"\t\t\t\t\tif strings.ToLower(vMediaType) \u003d\u003d strings.ToLower(\"DVD\") {"},{"line_number":82,"context_line":"\t\t\t\t\t\treturn vMediaId, vMediaType, nil"},{"line_number":83,"context_line":"\t\t\t\t\t}"},{"line_number":84,"context_line":"\t\t\t\t}"},{"line_number":85,"context_line":"\t\t\t}"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"\t\t\treturn \"\", \"\", fmt.Errorf(\"Unable to find CD/DVD virtual Media for Manager[%s]\", managerId)"},{"line_number":89,"context_line":"\t*/"},{"line_number":90,"context_line":"}"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"// This function walks through the bootsources of a system and sets the bootsource"}],"source_content_type":"text/x-go","patch_set":4,"id":"3fa7e38b_c2de07d9","line":89,"range":{"start_line":62,"start_character":0,"end_line":89,"end_character":3},"in_reply_to":"3fa7e38b_cd9b9d70","updated":"2019-09-25 15:01:58.000000000","message":"Done","commit_id":"f94f139b0d83c8e3c3edd74cadb6dea39c4aecad"},{"author":{"_account_id":7185,"name":"Dmitry Ukov","email":"dukov@mirantis.com","username":"dukov"},"change_message_id":"3a629dc8c4ff0712f431d7eb9fffc17a37647bd0","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"// This function walks through the list of manager\u0027s virtual media resources"},{"line_number":53,"context_line":"// and gets the ID of virtualmedia which has type \"CD\" or \"DVD\""},{"line_number":54,"context_line":"func GetVirtualMediaId(ctx context.Context, api *redfish.DefaultApiService, managerId string) (string, string, error) {"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"\treturn \"Cd\", \"CD\", nil"},{"line_number":57,"context_line":"}"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"// This function walks through the bootsources of a system and sets the bootsource"},{"line_number":60,"context_line":"// which is compatible with the given media type."}],"source_content_type":"text/x-go","patch_set":6,"id":"3fa7e38b_6386e368","line":57,"range":{"start_line":54,"start_character":0,"end_line":57,"end_character":1},"updated":"2019-10-23 15:54:17.000000000","message":"I guess this can be replaced with constant","commit_id":"1bc3355ea458732fc21600d507f9a6252d2148af"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"27bb5df66ad8cfee8b0f840067e3eb4a30b555d7","unresolved":false,"context_lines":[{"line_number":35,"context_line":"\t}"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"\telems :\u003d strings.Split(u.Path, \"/\")"},{"line_number":38,"context_line":"\tif len(elems) \u003c 1 {"},{"line_number":39,"context_line":"\t\treturn \"\", fmt.Errorf(\"Invalid URL\")"},{"line_number":40,"context_line":"\t}"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_99824000","line":38,"range":{"start_line":38,"start_character":4,"end_line":38,"end_character":18},"updated":"2019-10-03 18:27:38.000000000","message":"This will never evaluate to true","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"4165283580478037e5f176890127bdcdde6c930a","unresolved":false,"context_lines":[{"line_number":35,"context_line":"\t}"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"\telems :\u003d strings.Split(u.Path, \"/\")"},{"line_number":38,"context_line":"\tif len(elems) \u003c 1 {"},{"line_number":39,"context_line":"\t\treturn \"\", fmt.Errorf(\"Invalid URL\")"},{"line_number":40,"context_line":"\t}"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_32853ed0","line":38,"range":{"start_line":38,"start_character":4,"end_line":38,"end_character":18},"in_reply_to":"3fa7e38b_99824000","updated":"2019-10-07 12:37:36.000000000","message":"hmm .. yes","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"27bb5df66ad8cfee8b0f840067e3eb4a30b555d7","unresolved":false,"context_lines":[{"line_number":39,"context_line":"\t\treturn \"\", fmt.Errorf(\"Invalid URL\")"},{"line_number":40,"context_line":"\t}"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"\t// handle Trailing slash"},{"line_number":43,"context_line":"\tid :\u003d elems[len(elems)-1]"},{"line_number":44,"context_line":"\tif id \u003d\u003d \"\" {"},{"line_number":45,"context_line":"\t\tif len(elems) \u003c 2 {"}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_d98d182b","line":42,"updated":"2019-10-03 18:27:38.000000000","message":"Let\u0027s use TrimSuffix\n\nhttps://golang.org/pkg/strings/#TrimSuffix","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"4165283580478037e5f176890127bdcdde6c930a","unresolved":false,"context_lines":[{"line_number":39,"context_line":"\t\treturn \"\", fmt.Errorf(\"Invalid URL\")"},{"line_number":40,"context_line":"\t}"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"\t// handle Trailing slash"},{"line_number":43,"context_line":"\tid :\u003d elems[len(elems)-1]"},{"line_number":44,"context_line":"\tif id \u003d\u003d \"\" {"},{"line_number":45,"context_line":"\t\tif len(elems) \u003c 2 {"}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_d26b8a1c","line":42,"in_reply_to":"3fa7e38b_d98d182b","updated":"2019-10-07 12:37:36.000000000","message":"will fix","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"27bb5df66ad8cfee8b0f840067e3eb4a30b555d7","unresolved":false,"context_lines":[{"line_number":62,"context_line":"\treturn false"},{"line_number":63,"context_line":"}"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"// This function walks through the list of manager\u0027s virtual media resources"},{"line_number":66,"context_line":"// and gets the ID of virtualmedia which has type \"CD\" or \"DVD\""},{"line_number":67,"context_line":"func GetVirtualMediaId(ctx context.Context, api RedfishAPI, managerId string) (string, string, error) {"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"\treturn \"Cd\", \"CD\", nil"},{"line_number":70,"context_line":"}"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"// This function walks through the bootsources of a system and sets the bootsource"},{"line_number":73,"context_line":"// which is compatible with the given media type."}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_d9b678dd","line":70,"range":{"start_line":65,"start_character":0,"end_line":70,"end_character":1},"updated":"2019-10-03 18:27:38.000000000","message":"Could you explain this function? It doesn\u0027t seem very useful as is","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"4165283580478037e5f176890127bdcdde6c930a","unresolved":false,"context_lines":[{"line_number":62,"context_line":"\treturn false"},{"line_number":63,"context_line":"}"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"// This function walks through the list of manager\u0027s virtual media resources"},{"line_number":66,"context_line":"// and gets the ID of virtualmedia which has type \"CD\" or \"DVD\""},{"line_number":67,"context_line":"func GetVirtualMediaId(ctx context.Context, api RedfishAPI, managerId string) (string, string, error) {"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"\treturn \"Cd\", \"CD\", nil"},{"line_number":70,"context_line":"}"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"// This function walks through the bootsources of a system and sets the bootsource"},{"line_number":73,"context_line":"// which is compatible with the given media type."}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_325e9e76","line":70,"range":{"start_line":65,"start_character":0,"end_line":70,"end_character":1},"in_reply_to":"3fa7e38b_d9b678dd","updated":"2019-10-07 12:37:36.000000000","message":"I implemented this function in initial patchsets but I am not enabling it because of a bug in redfish emulator. I removed it based on your comment that there shouldn\u0027t be any commented code. i will add that functionality once that bug is fixed.","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"27bb5df66ad8cfee8b0f840067e3eb4a30b555d7","unresolved":false,"context_lines":[{"line_number":89,"context_line":"\t\t\tsystemReq :\u003d redfish.ComputerSystem{}"},{"line_number":90,"context_line":"\t\t\tsystemReq.Boot.BootSourceOverrideTarget \u003d bootSource"},{"line_number":91,"context_line":"\t\t\t_, httpResp, err :\u003d api.SetSystem(ctx, systemId, systemReq)"},{"line_number":92,"context_line":"\t\t\tif RedfishError(httpResp, err) !\u003d nil {"},{"line_number":93,"context_line":"\t\t\t\treturn err"},{"line_number":94,"context_line":"\t\t\t}"},{"line_number":95,"context_line":"\t\t\treturn nil"},{"line_number":96,"context_line":"\t\t}"},{"line_number":97,"context_line":"\t}"},{"line_number":98,"context_line":"\treturn fmt.Errorf(\"Unable to find Bootsource for mediaType[%s] on system[%s]\","}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_59cfe856","line":95,"range":{"start_line":92,"start_character":0,"end_line":95,"end_character":13},"updated":"2019-10-03 18:27:38.000000000","message":"just return the call to RedfishError","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"4165283580478037e5f176890127bdcdde6c930a","unresolved":false,"context_lines":[{"line_number":89,"context_line":"\t\t\tsystemReq :\u003d redfish.ComputerSystem{}"},{"line_number":90,"context_line":"\t\t\tsystemReq.Boot.BootSourceOverrideTarget \u003d bootSource"},{"line_number":91,"context_line":"\t\t\t_, httpResp, err :\u003d api.SetSystem(ctx, systemId, systemReq)"},{"line_number":92,"context_line":"\t\t\tif RedfishError(httpResp, err) !\u003d nil {"},{"line_number":93,"context_line":"\t\t\t\treturn err"},{"line_number":94,"context_line":"\t\t\t}"},{"line_number":95,"context_line":"\t\t\treturn nil"},{"line_number":96,"context_line":"\t\t}"},{"line_number":97,"context_line":"\t}"},{"line_number":98,"context_line":"\treturn fmt.Errorf(\"Unable to find Bootsource for mediaType[%s] on system[%s]\","}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_924e72bf","line":95,"range":{"start_line":92,"start_character":0,"end_line":95,"end_character":13},"in_reply_to":"3fa7e38b_59cfe856","updated":"2019-10-07 12:37:36.000000000","message":"will fix","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"27bb5df66ad8cfee8b0f840067e3eb4a30b555d7","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"\tresetReq.ResetType \u003d redfish.RESETTYPE_ON"},{"line_number":115,"context_line":"\t_, httpResp, err \u003d api.ResetSystem(ctx, systemId, resetReq)"},{"line_number":116,"context_line":"\tif RedfishError(httpResp, err) !\u003d nil {"},{"line_number":117,"context_line":"\t\treturn err"},{"line_number":118,"context_line":"\t}"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"\treturn nil"},{"line_number":121,"context_line":"}"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"// Insert the remote virtual media to the given virtual media id."}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_99332063","line":120,"range":{"start_line":116,"start_character":0,"end_line":120,"end_character":11},"updated":"2019-10-03 18:27:38.000000000","message":"just return the call to RedfishError","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"27bb5df66ad8cfee8b0f840067e3eb4a30b555d7","unresolved":false,"context_lines":[{"line_number":133,"context_line":"\tvMediaReq.Image \u003d isoPath"},{"line_number":134,"context_line":"\tvMediaReq.Inserted \u003d true"},{"line_number":135,"context_line":"\t_, httpResp, err :\u003d api.InsertVirtualMedia(ctx, managerId, vMediaId, vMediaReq)"},{"line_number":136,"context_line":"\tif RedfishError(httpResp, err) !\u003d nil {"},{"line_number":137,"context_line":"\t\treturn err"},{"line_number":138,"context_line":"\t}"},{"line_number":139,"context_line":"\treturn nil"},{"line_number":140,"context_line":"}"}],"source_content_type":"text/x-go","patch_set":14,"id":"3fa7e38b_19c89072","line":139,"range":{"start_line":136,"start_character":0,"end_line":139,"end_character":11},"updated":"2019-10-03 18:27:38.000000000","message":"just return a call to RedFishError","commit_id":"244619c6a7f239f6b725606fbc93717fb63da022"},{"author":{"_account_id":7185,"name":"Dmitry Ukov","email":"dukov@mirantis.com","username":"dukov"},"change_message_id":"3a629dc8c4ff0712f431d7eb9fffc17a37647bd0","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"// This function walks through the list of manager\u0027s virtual media resources"},{"line_number":42,"context_line":"// and gets the ID of virtualmedia which has type \"CD\" or \"DVD\""},{"line_number":43,"context_line":"func GetVirtualMediaId(ctx context.Context,"},{"line_number":44,"context_line":"\tapi redfishApi.RedfishAPI,"},{"line_number":45,"context_line":"\tmanagerId string,"},{"line_number":46,"context_line":") (string, string, error) {"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"\t// TODO: Sushy emulator has a bug which sends virtualMedia.inserted as"},{"line_number":49,"context_line":"\t// \t\t\t string instead of boolean which fails unmarshalling."},{"line_number":50,"context_line":"\t//       Uncomment this code after the bug is fixed."},{"line_number":51,"context_line":"\treturn \"Cd\", \"CD\", nil"},{"line_number":52,"context_line":"}"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"// This function walks through the bootsources of a system and sets the bootsource"},{"line_number":55,"context_line":"// which is compatible with the given media type."}],"source_content_type":"text/x-go","patch_set":21,"id":"3fa7e38b_6d643b22","line":52,"range":{"start_line":43,"start_character":0,"end_line":52,"end_character":1},"updated":"2019-10-23 15:54:17.000000000","message":"Comment is confusing.\nNot sure that we need function to return static triplet...","commit_id":"f12e3def8fdebca0b292cda86496fb6cb8cef99f"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"61a3ca554e53d3e91d5374e54889c3e9c6b433fe","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"// This function walks through the list of manager\u0027s virtual media resources"},{"line_number":42,"context_line":"// and gets the ID of virtualmedia which has type \"CD\" or \"DVD\""},{"line_number":43,"context_line":"func GetVirtualMediaId(ctx context.Context,"},{"line_number":44,"context_line":"\tapi redfishApi.RedfishAPI,"},{"line_number":45,"context_line":"\tmanagerId string,"},{"line_number":46,"context_line":") (string, string, error) {"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"\t// TODO: Sushy emulator has a bug which sends virtualMedia.inserted as"},{"line_number":49,"context_line":"\t// \t\t\t string instead of boolean which fails unmarshalling."},{"line_number":50,"context_line":"\t//       Uncomment this code after the bug is fixed."},{"line_number":51,"context_line":"\treturn \"Cd\", \"CD\", nil"},{"line_number":52,"context_line":"}"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"// This function walks through the bootsources of a system and sets the bootsource"},{"line_number":55,"context_line":"// which is compatible with the given media type."}],"source_content_type":"text/x-go","patch_set":21,"id":"3fa7e38b_854b8b5d","line":52,"range":{"start_line":43,"start_character":0,"end_line":52,"end_character":1},"in_reply_to":"3fa7e38b_6d643b22","updated":"2019-10-24 07:43:28.000000000","message":"this function is a placeholder .. right now it is just returning the triplet .. this function needs further implementation later. Updated the comment though.","commit_id":"f12e3def8fdebca0b292cda86496fb6cb8cef99f"},{"author":{"_account_id":7185,"name":"Dmitry Ukov","email":"dukov@mirantis.com","username":"dukov"},"change_message_id":"b1934fb99a2b65639b5e11e99cc53ccfe7ec45e3","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"// This function walks through the list of manager\u0027s virtual media resources"},{"line_number":42,"context_line":"// and gets the ID of virtualmedia which has type \"CD\" or \"DVD\""},{"line_number":43,"context_line":"func GetVirtualMediaId(ctx context.Context,"},{"line_number":44,"context_line":"\tapi redfishApi.RedfishAPI,"},{"line_number":45,"context_line":"\tmanagerId string,"},{"line_number":46,"context_line":") (string, string, error) {"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"\t// TODO: Sushy emulator has a bug which sends virtualMedia.inserted as"},{"line_number":49,"context_line":"\t// \t\t\t string instead of boolean which fails unmarshalling."},{"line_number":50,"context_line":"\t//       Uncomment this code after the bug is fixed."},{"line_number":51,"context_line":"\treturn \"Cd\", \"CD\", nil"},{"line_number":52,"context_line":"}"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"// This function walks through the bootsources of a system and sets the bootsource"},{"line_number":55,"context_line":"// which is compatible with the given media type."}],"source_content_type":"text/x-go","patch_set":21,"id":"3fa7e38b_f9553ffb","line":52,"range":{"start_line":43,"start_character":0,"end_line":52,"end_character":1},"in_reply_to":"3fa7e38b_854b8b5d","updated":"2019-10-24 08:43:28.000000000","message":"ok","commit_id":"f12e3def8fdebca0b292cda86496fb6cb8cef99f"},{"author":{"_account_id":7185,"name":"Dmitry Ukov","email":"dukov@mirantis.com","username":"dukov"},"change_message_id":"3a629dc8c4ff0712f431d7eb9fffc17a37647bd0","unresolved":false,"context_lines":[{"line_number":88,"context_line":"\t\treturn e"},{"line_number":89,"context_line":"\t}"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"\ttime.Sleep(2 * time.Second)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"\tresetReq.ResetType \u003d redfishClient.RESETTYPE_ON"},{"line_number":94,"context_line":"\t_, httpResp, err \u003d api.ResetSystem(ctx, systemId, resetReq)"}],"source_content_type":"text/x-go","patch_set":21,"id":"3fa7e38b_38719fa9","line":91,"range":{"start_line":91,"start_character":0,"end_line":91,"end_character":28},"updated":"2019-10-23 15:54:17.000000000","message":"Looks like hardcode to me. We should query HW status here instead or at least introduce globally defined constant","commit_id":"f12e3def8fdebca0b292cda86496fb6cb8cef99f"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"61a3ca554e53d3e91d5374e54889c3e9c6b433fe","unresolved":false,"context_lines":[{"line_number":88,"context_line":"\t\treturn e"},{"line_number":89,"context_line":"\t}"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"\ttime.Sleep(2 * time.Second)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"\tresetReq.ResetType \u003d redfishClient.RESETTYPE_ON"},{"line_number":94,"context_line":"\t_, httpResp, err \u003d api.ResetSystem(ctx, systemId, resetReq)"}],"source_content_type":"text/x-go","patch_set":21,"id":"3fa7e38b_b6cfd455","line":91,"range":{"start_line":91,"start_character":0,"end_line":91,"end_character":28},"in_reply_to":"3fa7e38b_38719fa9","updated":"2019-10-24 07:43:28.000000000","message":"moved to a constant right now. But i will fix it in later commits to check the status first.","commit_id":"f12e3def8fdebca0b292cda86496fb6cb8cef99f"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"50febe4a5033658e4c6a5c2e2242795a84f391c0","unresolved":false,"context_lines":[{"line_number":89,"context_line":"\tresetReq :\u003d redfishClient.ResetRequestBody{}"},{"line_number":90,"context_line":"\tresetReq.ResetType \u003d redfishClient.RESETTYPE_FORCE_OFF"},{"line_number":91,"context_line":"\t_, httpResp, err :\u003d api.ResetSystem(ctx, systemId, resetReq)"},{"line_number":92,"context_line":"\tif e :\u003d ScreenRedfishError(httpResp, err); e !\u003d nil {"},{"line_number":93,"context_line":"\t\treturn e"},{"line_number":94,"context_line":"\t}"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"\ttime.Sleep(SystemRebootDelay)"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-go","patch_set":26,"id":"3fa7e38b_06b44181","line":94,"range":{"start_line":92,"start_character":0,"end_line":94,"end_character":2},"updated":"2019-10-28 17:50:18.000000000","message":"if err !\u003d nil {\n\treturn ScreenRedfishError(httpResp, err)\n}","commit_id":"0647ef8048b79c05363e8419df82132f85819fcc"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"b5efc10b22e7f7622988f0c17e58f4184a5960f5","unresolved":false,"context_lines":[{"line_number":89,"context_line":"\tresetReq :\u003d redfishClient.ResetRequestBody{}"},{"line_number":90,"context_line":"\tresetReq.ResetType \u003d redfishClient.RESETTYPE_FORCE_OFF"},{"line_number":91,"context_line":"\t_, httpResp, err :\u003d api.ResetSystem(ctx, systemId, resetReq)"},{"line_number":92,"context_line":"\tif e :\u003d ScreenRedfishError(httpResp, err); e !\u003d nil {"},{"line_number":93,"context_line":"\t\treturn e"},{"line_number":94,"context_line":"\t}"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"\ttime.Sleep(SystemRebootDelay)"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-go","patch_set":26,"id":"3fa7e38b_0da2159b","line":94,"range":{"start_line":92,"start_character":0,"end_line":94,"end_character":2},"in_reply_to":"3fa7e38b_06b44181","updated":"2019-10-29 12:25:07.000000000","message":"Done","commit_id":"0647ef8048b79c05363e8419df82132f85819fcc"}],"pkg/remote/remote_direct.go":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"5a03c7dd88a7e5af9a7adaa711264d83c4a6c142","unresolved":false,"context_lines":[{"line_number":46,"context_line":"\t\t\tremoteConfig.EphemeralNodeId,"},{"line_number":47,"context_line":"\t\t\tremoteConfig.IsoPath)"},{"line_number":48,"context_line":"\t\tif err !\u003d nil {"},{"line_number":49,"context_line":"\t\t\talog.Debugf(\"redfish remotedirect client creation failed.\")"},{"line_number":50,"context_line":"\t\t\treturn err"},{"line_number":51,"context_line":"\t\t}"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"\t\terr \u003d client.DoRemoteDirect()"}],"source_content_type":"text/x-go","patch_set":18,"id":"3fa7e38b_7f577659","line":50,"range":{"start_line":49,"start_character":0,"end_line":50,"end_character":13},"updated":"2019-10-15 16:57:01.000000000","message":"Would it make sense to replace this with a call to RemoteDirectError or RedfishError?","commit_id":"d9125f2c758f458478bec37f0eb8437d687ec06a"},{"author":{"_account_id":7769,"name":"Pentheus","display_name":"Alan Meadows","email":"alan.meadows@gmail.com","username":"alanmeadows"},"change_message_id":"e71537307ac019742743ba279811758a552009c1","unresolved":false,"context_lines":[{"line_number":46,"context_line":"\t\t\tremoteConfig.EphemeralNodeId,"},{"line_number":47,"context_line":"\t\t\tremoteConfig.IsoPath)"},{"line_number":48,"context_line":"\t\tif err !\u003d nil {"},{"line_number":49,"context_line":"\t\t\talog.Debugf(\"redfish remotedirect client creation failed.\")"},{"line_number":50,"context_line":"\t\t\treturn err"},{"line_number":51,"context_line":"\t\t}"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"\t\terr \u003d client.DoRemoteDirect()"}],"source_content_type":"text/x-go","patch_set":18,"id":"3fa7e38b_29f6a95e","line":50,"range":{"start_line":49,"start_character":0,"end_line":50,"end_character":13},"in_reply_to":"3fa7e38b_006b8284","updated":"2019-10-15 21:37:32.000000000","message":"I don\u0027t know if this is exactly weighing in on the question but I personally don\u0027t think we want to get in the business of re-wrapping errors everywhere.  I think the basic mantra should be: try to create strongly typed errors for certain conditions that may be useful for callers to know.  For instance, to me strongly typed errors would be achieving something like returning RemoteDirectValidationError (input data is bad), RemoteDirectUnreachableError (you could retry), so on.  These are the types of strongly typed errors which I think give value here beyond one global RemoteDirectError / RedfishError.  I suppose these are a good place to start though.   Even when we have this though, I think all callers casing on err.(type) will have to be able to account for \"unknown\" errors anyways so there is no sense in re-wrapping every err encountered.","commit_id":"d9125f2c758f458478bec37f0eb8437d687ec06a"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"286dc150b089cdf34537412d9df7f5ee950c6e77","unresolved":false,"context_lines":[{"line_number":46,"context_line":"\t\t\tremoteConfig.EphemeralNodeId,"},{"line_number":47,"context_line":"\t\t\tremoteConfig.IsoPath)"},{"line_number":48,"context_line":"\t\tif err !\u003d nil {"},{"line_number":49,"context_line":"\t\t\talog.Debugf(\"redfish remotedirect client creation failed.\")"},{"line_number":50,"context_line":"\t\t\treturn err"},{"line_number":51,"context_line":"\t\t}"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"\t\terr \u003d client.DoRemoteDirect()"}],"source_content_type":"text/x-go","patch_set":18,"id":"3fa7e38b_006b8284","line":50,"range":{"start_line":49,"start_character":0,"end_line":50,"end_character":13},"in_reply_to":"3fa7e38b_7f577659","updated":"2019-10-15 18:25:26.000000000","message":"err is already ReadfishError. This was my question in meeting about error propagation. Do we need to wrap inner errors everywhere? Simple text wrapping will lose its type. Widely used way is to record the stack in err where error was originated and not wrap it in each layer. Do you want me to do something like that? If yes, then there are several of those small error libraries which do this thing. Can we use one of those? In this way you can also wrap the errors like from 3rd party libs to local error types. And later at top level unwind the err stack to see the source of error.","commit_id":"d9125f2c758f458478bec37f0eb8437d687ec06a"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"5a03c7dd88a7e5af9a7adaa711264d83c4a6c142","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"\t\terr \u003d client.DoRemoteDirect()"},{"line_number":54,"context_line":"\t\tif err !\u003d nil {"},{"line_number":55,"context_line":"\t\t\talog.Debugf(\"redfish remote direct failed: \\n %s\\n\", err)"},{"line_number":56,"context_line":"\t\t\treturn err"},{"line_number":57,"context_line":"\t\t}"},{"line_number":58,"context_line":"\tdefault:"},{"line_number":59,"context_line":"\t\treturn NewRemoteDirectErrorf(\"Invalid Remote Type\")"}],"source_content_type":"text/x-go","patch_set":18,"id":"3fa7e38b_9f527266","line":56,"range":{"start_line":55,"start_character":0,"end_line":56,"end_character":13},"updated":"2019-10-15 16:57:01.000000000","message":"same here","commit_id":"d9125f2c758f458478bec37f0eb8437d687ec06a"},{"author":{"_account_id":7185,"name":"Dmitry Ukov","email":"dukov@mirantis.com","username":"dukov"},"change_message_id":"3a629dc8c4ff0712f431d7eb9fffc17a37647bd0","unresolved":false,"context_lines":[{"line_number":50,"context_line":"\t\t\treturn err"},{"line_number":51,"context_line":"\t\t}"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"\t\terr \u003d client.DoRemoteDirect()"},{"line_number":54,"context_line":"\t\tif err !\u003d nil {"},{"line_number":55,"context_line":"\t\t\talog.Debugf(\"redfish remote direct failed: \\n %s\\n\", err)"},{"line_number":56,"context_line":"\t\t\treturn err"}],"source_content_type":"text/x-go","patch_set":21,"id":"3fa7e38b_7838779e","line":53,"range":{"start_line":53,"start_character":8,"end_line":53,"end_character":31},"updated":"2019-10-23 15:54:17.000000000","message":"i\u0027d define client as go interface with at leas one method: DoRemoteDirect().\n\nTherefore all remotedirect \u0027drivers\u0027  should implement this interface and in this case we cat move this out of switch section and unify all types of power management communications","commit_id":"f12e3def8fdebca0b292cda86496fb6cb8cef99f"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"61a3ca554e53d3e91d5374e54889c3e9c6b433fe","unresolved":false,"context_lines":[{"line_number":50,"context_line":"\t\t\treturn err"},{"line_number":51,"context_line":"\t\t}"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"\t\terr \u003d client.DoRemoteDirect()"},{"line_number":54,"context_line":"\t\tif err !\u003d nil {"},{"line_number":55,"context_line":"\t\t\talog.Debugf(\"redfish remote direct failed: \\n %s\\n\", err)"},{"line_number":56,"context_line":"\t\t\treturn err"}],"source_content_type":"text/x-go","patch_set":21,"id":"3fa7e38b_f6a9cc8f","line":53,"range":{"start_line":53,"start_character":8,"end_line":53,"end_character":31},"in_reply_to":"3fa7e38b_7838779e","updated":"2019-10-24 07:43:28.000000000","message":"done","commit_id":"f12e3def8fdebca0b292cda86496fb6cb8cef99f"},{"author":{"_account_id":7185,"name":"Dmitry Ukov","email":"dukov@mirantis.com","username":"dukov"},"change_message_id":"b1934fb99a2b65639b5e11e99cc53ccfe7ec45e3","unresolved":false,"context_lines":[{"line_number":63,"context_line":"\t\treturn NewRemoteDirectErrorf(\"invalid remote type\")"},{"line_number":64,"context_line":"\t}"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"\tif client \u003d\u003d nil {"},{"line_number":67,"context_line":"\t\treturn NewRemoteDirectErrorf(\"unable to create remotedirect client\")"},{"line_number":68,"context_line":"\t}"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"\terr \u003d client.DoRemoteDirect()"},{"line_number":71,"context_line":"\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":25,"id":"3fa7e38b_39d19758","line":68,"range":{"start_line":66,"start_character":0,"end_line":68,"end_character":2},"updated":"2019-10-24 08:43:28.000000000","message":"Minor comment.\nThere is only one case for client \u003d\u003d nil: when err \u003d\u003d nil as well (not sure that this is possible if client constructor is not buggy :))","commit_id":"24452af607ef7ce11c5e5579c0a80a2af86e036a"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"b2ab2da6e7fe82bf638e2d4a53bca421b683bffe","unresolved":false,"context_lines":[{"line_number":63,"context_line":"\t\treturn NewRemoteDirectErrorf(\"invalid remote type\")"},{"line_number":64,"context_line":"\t}"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"\tif client \u003d\u003d nil {"},{"line_number":67,"context_line":"\t\treturn NewRemoteDirectErrorf(\"unable to create remotedirect client\")"},{"line_number":68,"context_line":"\t}"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"\terr \u003d client.DoRemoteDirect()"},{"line_number":71,"context_line":"\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":25,"id":"3fa7e38b_658c4035","line":68,"range":{"start_line":66,"start_character":0,"end_line":68,"end_character":2},"in_reply_to":"3fa7e38b_39d19758","updated":"2019-10-24 11:47:47.000000000","message":"just wanted to have an extra check instead of null pointer exception later. It can be buggy constructor or error is not handled properly by any new remote type implementation. So, I would just let this check be there.","commit_id":"24452af607ef7ce11c5e5579c0a80a2af86e036a"},{"author":{"_account_id":7185,"name":"Dmitry Ukov","email":"dukov@mirantis.com","username":"dukov"},"change_message_id":"5ec40160a7fd289c17062f1512f0a6b683706315","unresolved":false,"context_lines":[{"line_number":63,"context_line":"\t\treturn NewRemoteDirectErrorf(\"invalid remote type\")"},{"line_number":64,"context_line":"\t}"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"\tif client \u003d\u003d nil {"},{"line_number":67,"context_line":"\t\treturn NewRemoteDirectErrorf(\"unable to create remotedirect client\")"},{"line_number":68,"context_line":"\t}"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"\terr \u003d client.DoRemoteDirect()"},{"line_number":71,"context_line":"\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":25,"id":"3fa7e38b_a5f79859","line":68,"range":{"start_line":66,"start_character":0,"end_line":68,"end_character":2},"in_reply_to":"3fa7e38b_658c4035","updated":"2019-10-24 12:08:50.000000000","message":"Fair enough","commit_id":"24452af607ef7ce11c5e5579c0a80a2af86e036a"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"50febe4a5033658e4c6a5c2e2242795a84f391c0","unresolved":false,"context_lines":[{"line_number":64,"context_line":"\t}"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"\tif client \u003d\u003d nil {"},{"line_number":67,"context_line":"\t\treturn NewRemoteDirectErrorf(\"unable to create remotedirect client\")"},{"line_number":68,"context_line":"\t}"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"\terr \u003d client.DoRemoteDirect()"}],"source_content_type":"text/x-go","patch_set":26,"id":"3fa7e38b_06ae8180","line":67,"range":{"start_line":67,"start_character":0,"end_line":67,"end_character":70},"updated":"2019-10-28 17:50:18.000000000","message":"This line is currently unreachable, and frankly, it should remain unreachable, as the above code handles the error cases. I think the switch case above should be refactored into its own function which returns (client, error), that way we never need to do a nil check, we just do error propagation.","commit_id":"0647ef8048b79c05363e8419df82132f85819fcc"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"b5efc10b22e7f7622988f0c17e58f4184a5960f5","unresolved":false,"context_lines":[{"line_number":64,"context_line":"\t}"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"\tif client \u003d\u003d nil {"},{"line_number":67,"context_line":"\t\treturn NewRemoteDirectErrorf(\"unable to create remotedirect client\")"},{"line_number":68,"context_line":"\t}"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"\terr \u003d client.DoRemoteDirect()"}],"source_content_type":"text/x-go","patch_set":26,"id":"3fa7e38b_4dcc8d33","line":67,"range":{"start_line":67,"start_character":0,"end_line":67,"end_character":70},"in_reply_to":"3fa7e38b_06ae8180","updated":"2019-10-29 12:25:07.000000000","message":"I knew this was unreachable but just for a safety net I had added that check so that if later other remote types are added which has some error then it won\u0027t cause a NPE. But removing it now.\nSwitch-case is moved to a separate function.","commit_id":"0647ef8048b79c05363e8419df82132f85819fcc"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"50febe4a5033658e4c6a5c2e2242795a84f391c0","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"\terr \u003d client.DoRemoteDirect()"},{"line_number":71,"context_line":"\tif err !\u003d nil {"},{"line_number":72,"context_line":"\t\talog.Debugf(\"remote direct failed: \\n %s\\n\", err)"},{"line_number":73,"context_line":"\t\treturn err"},{"line_number":74,"context_line":"\t}"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-go","patch_set":26,"id":"3fa7e38b_8673514e","line":72,"updated":"2019-10-28 17:50:18.000000000","message":"log messages shouldn\u0027t have new lines","commit_id":"0647ef8048b79c05363e8419df82132f85819fcc"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"b5efc10b22e7f7622988f0c17e58f4184a5960f5","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"\terr \u003d client.DoRemoteDirect()"},{"line_number":71,"context_line":"\tif err !\u003d nil {"},{"line_number":72,"context_line":"\t\talog.Debugf(\"remote direct failed: \\n %s\\n\", err)"},{"line_number":73,"context_line":"\t\treturn err"},{"line_number":74,"context_line":"\t}"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-go","patch_set":26,"id":"3fa7e38b_6dd149cc","line":72,"in_reply_to":"3fa7e38b_8673514e","updated":"2019-10-29 12:25:07.000000000","message":"Done","commit_id":"0647ef8048b79c05363e8419df82132f85819fcc"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"218c5d4b04d7881384eaf447c2a34455b7306dfc","unresolved":false,"context_lines":[{"line_number":42,"context_line":"// Get remotedirect client based on config"},{"line_number":43,"context_line":"func getRemoteDirectClient(remoteConfig RemoteDirectConfig) (RemoteDirectClient, error) {"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"\tvar client RemoteDirectClient"},{"line_number":46,"context_line":"\tvar err error"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"\tswitch remoteConfig.RemoteType {"},{"line_number":49,"context_line":"\tcase AirshipRemoteTypeRedfish:"}],"source_content_type":"text/x-go","patch_set":27,"id":"3fa7e38b_69eff686","line":46,"range":{"start_line":45,"start_character":0,"end_line":46,"end_character":14},"updated":"2019-10-29 18:45:26.000000000","message":"it\u0027s probably best to remove these declarations and let the switch cases handle them. The default case doesn\u0027t need a client, and should return nil instead","commit_id":"f2faf6c489ba692cf90d3255d9c60aa235ceed6c"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"b00f5f8d328206dc4e64af2c641894f73d11b1cf","unresolved":false,"context_lines":[{"line_number":42,"context_line":"// Get remotedirect client based on config"},{"line_number":43,"context_line":"func getRemoteDirectClient(remoteConfig RemoteDirectConfig) (RemoteDirectClient, error) {"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"\tvar client RemoteDirectClient"},{"line_number":46,"context_line":"\tvar err error"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"\tswitch remoteConfig.RemoteType {"},{"line_number":49,"context_line":"\tcase AirshipRemoteTypeRedfish:"}],"source_content_type":"text/x-go","patch_set":27,"id":"3fa7e38b_64839b57","line":46,"range":{"start_line":45,"start_character":0,"end_line":46,"end_character":14},"in_reply_to":"3fa7e38b_69eff686","updated":"2019-10-29 19:24:02.000000000","message":"we need these here to return client at the end.","commit_id":"f2faf6c489ba692cf90d3255d9c60aa235ceed6c"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"218c5d4b04d7881384eaf447c2a34455b7306dfc","unresolved":false,"context_lines":[{"line_number":56,"context_line":"\t\t\tremoteConfig.IsoPath)"},{"line_number":57,"context_line":"\t\tif err !\u003d nil {"},{"line_number":58,"context_line":"\t\t\talog.Debugf(\"redfish remotedirect client creation failed\")"},{"line_number":59,"context_line":"\t\t\treturn client, err"},{"line_number":60,"context_line":"\t\t}"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"\tdefault:"}],"source_content_type":"text/x-go","patch_set":27,"id":"3fa7e38b_892fd2f4","line":59,"updated":"2019-10-29 18:45:26.000000000","message":"In the case of an error, we should explicitly return (nil, err). Same for line 63","commit_id":"f2faf6c489ba692cf90d3255d9c60aa235ceed6c"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"b00f5f8d328206dc4e64af2c641894f73d11b1cf","unresolved":false,"context_lines":[{"line_number":56,"context_line":"\t\t\tremoteConfig.IsoPath)"},{"line_number":57,"context_line":"\t\tif err !\u003d nil {"},{"line_number":58,"context_line":"\t\t\talog.Debugf(\"redfish remotedirect client creation failed\")"},{"line_number":59,"context_line":"\t\t\treturn client, err"},{"line_number":60,"context_line":"\t\t}"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"\tdefault:"}],"source_content_type":"text/x-go","patch_set":27,"id":"3fa7e38b_a48c3380","line":59,"in_reply_to":"3fa7e38b_892fd2f4","updated":"2019-10-29 19:24:02.000000000","message":"Done","commit_id":"f2faf6c489ba692cf90d3255d9c60aa235ceed6c"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"218c5d4b04d7881384eaf447c2a34455b7306dfc","unresolved":false,"context_lines":[{"line_number":63,"context_line":"\t\treturn client, NewRemoteDirectErrorf(\"invalid remote type\")"},{"line_number":64,"context_line":"\t}"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"\treturn client, nil"},{"line_number":67,"context_line":"}"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"// Top level function to execute remote direct based on remote type"}],"source_content_type":"text/x-go","patch_set":27,"id":"3fa7e38b_09f68290","line":66,"range":{"start_line":66,"start_character":0,"end_line":66,"end_character":19},"updated":"2019-10-29 18:45:26.000000000","message":"This code is still unreachable. Please delete this line","commit_id":"f2faf6c489ba692cf90d3255d9c60aa235ceed6c"},{"author":{"_account_id":30797,"name":"kanwar saad bin liaqat","email":"kanwar.sbl@gmail.com","username":"ekanwli"},"change_message_id":"b00f5f8d328206dc4e64af2c641894f73d11b1cf","unresolved":false,"context_lines":[{"line_number":63,"context_line":"\t\treturn client, NewRemoteDirectErrorf(\"invalid remote type\")"},{"line_number":64,"context_line":"\t}"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"\treturn client, nil"},{"line_number":67,"context_line":"}"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"// Top level function to execute remote direct based on remote type"}],"source_content_type":"text/x-go","patch_set":27,"id":"3fa7e38b_a45e7310","line":66,"range":{"start_line":66,"start_character":0,"end_line":66,"end_character":19},"in_reply_to":"3fa7e38b_09f68290","updated":"2019-10-29 19:24:02.000000000","message":"it is not unreachable .. all cases are supposed to set client instead of each case returning client. client is returned only once at the end.","commit_id":"f2faf6c489ba692cf90d3255d9c60aa235ceed6c"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"7e5994ac65c143d1099014e5a03ae99ee84f1660","unresolved":false,"context_lines":[{"line_number":63,"context_line":"\t\treturn client, NewRemoteDirectErrorf(\"invalid remote type\")"},{"line_number":64,"context_line":"\t}"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"\treturn client, nil"},{"line_number":67,"context_line":"}"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"// Top level function to execute remote direct based on remote type"}],"source_content_type":"text/x-go","patch_set":27,"id":"3fa7e38b_dbba5e09","line":66,"range":{"start_line":66,"start_character":0,"end_line":66,"end_character":19},"in_reply_to":"3fa7e38b_a45e7310","updated":"2019-11-01 18:47:16.000000000","message":"You\u0027re right, my bad","commit_id":"f2faf6c489ba692cf90d3255d9c60aa235ceed6c"}]}
