Skip to content

Add Provisioning YAML File #180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 1120
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions gen/xyz/openbmc_project/Provisioning/Provisioning/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Generated file; do not modify.

sdbusplus_current_path = 'xyz/openbmc_project/Provisioning/Provisioning'

generated_sources += custom_target(
'xyz/openbmc_project/Provisioning/Provisioning__cpp'.underscorify(),
input: [
'../../../../../yaml/xyz/openbmc_project/Provisioning/Provisioning.interface.yaml',
],
output: [
'common.hpp',
'server.hpp',
'server.cpp',
'aserver.hpp',
'client.hpp',
],
depend_files: sdbusplusplus_depfiles,
command: [
sdbuspp_gen_meson_prog,
'--command',
'cpp',
'--output',
meson.current_build_dir(),
'--tool',
sdbusplusplus_prog,
'--directory',
meson.current_source_dir() / '../../../../../yaml',
'xyz/openbmc_project/Provisioning/Provisioning',
],
install: should_generate_cpp,
install_dir: [
get_option('includedir') / sdbusplus_current_path,
get_option('includedir') / sdbusplus_current_path,
false,
get_option('includedir') / sdbusplus_current_path,
get_option('includedir') / sdbusplus_current_path,
],
build_by_default: should_generate_cpp,
)

29 changes: 29 additions & 0 deletions gen/xyz/openbmc_project/Provisioning/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated file; do not modify.
subdir('Provisioning')

sdbusplus_current_path = 'xyz/openbmc_project/Provisioning'

generated_markdown += custom_target(
'xyz/openbmc_project/Provisioning/Provisioning__markdown'.underscorify(),
input: [
'../../../../yaml/xyz/openbmc_project/Provisioning/Provisioning.interface.yaml',
],
output: ['Provisioning.md'],
depend_files: sdbusplusplus_depfiles,
command: [
sdbuspp_gen_meson_prog,
'--command',
'markdown',
'--output',
meson.current_build_dir(),
'--tool',
sdbusplusplus_prog,
'--directory',
meson.current_source_dir() / '../../../../yaml',
'xyz/openbmc_project/Provisioning/Provisioning',
],
install: should_generate_markdown,
install_dir: [inst_markdown_dir / sdbusplus_current_path],
build_by_default: should_generate_markdown,
)

1 change: 1 addition & 0 deletions gen/xyz/openbmc_project/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ subdir('Object')
subdir('ObjectMapper')
subdir('PFR')
subdir('PLDM')
subdir('Provisioning')
subdir('ScheduledTime')
subdir('Sensor')
subdir('Smbios')
Expand Down
30 changes: 30 additions & 0 deletions yaml/xyz/openbmc_project/Provisioning/Provisioning.interface.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: xyz.openbmc_project.Provisioning
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think 'name' is a recognized field at this level?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I wonder if this should be under Network. The upstream maintainer would have final say anyway I guess.

description: >
Interface to represent the provisioning status of the BMC. Provides a
property to indicate whether the BMC is provisioned, and methods to initiate
provisioning and check the peer BMC connection.
properties:
- name: ProvisioningState
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'State' sounds like it should be an enum. If it's just a bool, how just about something like 'Provisioned'?

type: boolean
flags:
- readonly
default: false
description: >
True means the BMC is in a provisioned state.

methods:
- name: StartProvisioning
description: >
Starts the provisioning process and updates the ProvisioningState
accordingly.
parameters: []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can just leave off this field if there are no parameters


- name: CheckPeerBMCConnection
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raviteja-b Is this the interface you were thinking RBMC manager would call? I don't think so, because the API I was thinking of checks if authentication is also good between the BMCs which means provisioning already has to have been completed on each.

description: >
Performs a check to determine if the peer BMC is reachable and
available for provisioning.
parameters: []
returns:
- type: boolean
description: >
True if the peer BMC is reachable; false otherwise.